net.sf.jomic.ui
Class FileFieldAdder
java.lang.Object
net.sf.jomic.ui.FileFieldAdder
- All Implemented Interfaces:
- ActionListener, EventListener
public class FileFieldAdder
- extends Object
- implements ActionListener
Utility class to add components to an existing JPanel to set a file path. The user can choose to
either type it in a text field or select it in a JFileChooser.
- Author:
- Thomas Aglassinger
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileFieldAdder
public FileFieldAdder(JPanel newContainer,
GridBagConstraints constraints,
JFileChooser newChooser)
- Create a new FileFieldAdder which immediately adds the relevent components to the specified
JPanel.
- Parameters:
newContainer - the JPanel to which the file field component should be added; it must
be using a GridBadLayoutconstraints - the GridBagConstraints of newContainer applied to
components to be addednewChooser - the JFileChooser to use when the "..." button was pressed; if this is
null, a generic default chooser is used
getChooser
public JFileChooser getChooser()
getField
public JTextField getField()
getLabel
public JLabel getLabel()
actionPerformed
public void actionPerformed(ActionEvent event)
- Process event after the "..." button was pressed and open a JFileChooser to select a file.
- Specified by:
actionPerformed in interface ActionListener
dispose
public void dispose()