org.geotools.swing.wizard
Class JFileField
java.lang.Object
org.geotools.swing.wizard.ParamField
org.geotools.swing.wizard.JFileField
public class JFileField
- extends ParamField
Widget for File; provides a "Browse" button to open a file dialog.
- Author:
- Jody Garnett
Method Summary |
void |
addListener(JWizard.Controller controller)
|
protected void |
browse()
|
javax.swing.JComponent |
doLayout()
Called to build the widget, initialize it (setting defaults or whatever) and setup any
listeners needed for validation of the widget value. |
java.io.File |
getValue()
Returns the current value of the widget. |
void |
removeListener(JWizard.Controller controller)
|
void |
setValue(java.lang.Object value)
Sets the value of the widget. |
boolean |
validate()
Validates the current value of the widget, returns false if not valid, true otherwise |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JFileField
public JFileField(Parameter<?> parameter)
doLayout
public javax.swing.JComponent doLayout()
- Description copied from class:
ParamField
- Called to build the widget, initialize it (setting defaults or whatever) and setup any
listeners needed for validation of the widget value. The returned JComponent will contain the
widget for editing.
- Specified by:
doLayout
in class ParamField
- Returns:
- JComponent or null if error
browse
protected void browse()
addListener
public void addListener(JWizard.Controller controller)
- Specified by:
addListener
in class ParamField
removeListener
public void removeListener(JWizard.Controller controller)
- Specified by:
removeListener
in class ParamField
getValue
public java.io.File getValue()
- Description copied from class:
ParamField
- Returns the current value of the widget.
- Specified by:
getValue
in class ParamField
- Returns:
- Object representing the current value of the widget
setValue
public void setValue(java.lang.Object value)
- Description copied from class:
ParamField
- Sets the value of the widget.
- Specified by:
setValue
in class ParamField
validate
public boolean validate()
- Description copied from class:
ParamField
- Validates the current value of the widget, returns false if not valid, true otherwise
- Specified by:
validate
in class ParamField
- Returns:
- boolean if validated
Copyright © 1996-2010 Geotools. All Rights Reserved.