1 | List listeners = new LinkedList();↵ | | 1 | List listeners = new LinkedList();↵
|
|
2 | String title;↵ | | 2 | String title;↵
|
|
3 | String filetype;↵ | | 3 | String filetype;↵
|
|
4 | /**↵ | | 4 | /**↵
|
5 | * Constructor for the FilePanel object.↵ | | 5 | * Constructor for the FilePanel object.↵
|
6 | */↵ | | 6 | */↵
|
7 | public FilePanel() {↵ | | 7 | public ReportFilePanel() {↵
|
8 | title = ""; //$NON-NLS-1$↵ | | 8 | title = "";↵
|
9 | init();↵ | | 9 | init();↵
|
10 | }↵ | | 10 | }↵
|
|
11 | public FilePanel(String title) {↵ | | 11 | public ReportFilePanel(String title) {↵
|
12 | this.title = title;↵ | | 12 | this.title = title;↵
|
13 | init();↵ | | 13 | init();↵
|
14 | }↵ | | 14 | }↵
|
|
15 | public FilePanel(String title, String filetype) {↵ | | 15 | public ReportFilePanel(String title, String filetype) {↵
|
16 | this(title);↵ | | 16 | this(title);↵
|
17 | this.filetype = filetype;↵ | | 17 | this.filetype = filetype;↵
|
18 | }↵ | | 18 | }↵
|
|
19 | /**↵ | | 19 | /**↵
|
20 | * Constructor for the FilePanel object.↵ | | 20 | * Constructor for the FilePanel object.↵
|
21 | */↵ | | 21 | */↵
|
22 | public FilePanel(ChangeListener l, String title) {↵ | | 22 | public ReportFilePanel(ChangeListener l, String title) {↵
|
23 | this.title = title;↵ | | 23 | this.title = title;↵
|
24 | init();↵ | | 24 | init();↵
|
25 | listeners.add(l);↵ | | 25 | listeners.add(l);↵
|
26 | }↵ | | 26 | }↵
|
|
27 | public void addChangeListener(ChangeListener l) {↵ | | 27 | public void addChangeListener(ChangeListener l) {↵
|
28 | listeners.add(l);↵ | | 28 | listeners.add(l);↵
|
29 | }↵ | | 29 | }↵
|
|
30 | private void init() {↵ | | 30 | private void init() {↵
|
31 | setBorder(BorderFactory.createTitledBorder(title));↵ | | 31 | setBorder(BorderFactory.createTitledBorder(title));↵
|
32 | add(label);↵ | | 32 | add(label);↵
|
33 | add(Box.createHorizontalStrut(5));↵ | | 33 | add(Box.createHorizontalStrut(5));↵
|
34 | add(filename);↵ | | 34 | add(filename);↵
|
35 | add(Box.createHorizontalStrut(5));↵ | | 35 | add(Box.createHorizontalStrut(5));↵
|
36 | filename.addActionListener(this);↵ | | 36 | filename.addActionListener(this);↵
|
37 | add(browse);↵ | | 37 | add(browse);↵
|
38 | browse.setActionCommand(ACTION_BROWSE);↵ | | 38 | browse.setActionCommand("browse");↵
|
39 | browse.addActionListener(this) | | 39 | browse.addActionListener(this)
|