Package org.geotools.swing.wizard
Class JURLField
- Object
-
- ParamField
-
- JURLField
-
public class JURLField extends ParamField
Widget for URL; provides a "Browse" button to open a file dialog.- Author:
- Jody Garnett
-
-
Field Summary
-
Fields inherited from class ParamField
parameter
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(JWizard.Controller controller)
protected void
browse()
JComponent
doLayout()
Called to build the widget, initialize it (setting defaults or whatever) and setup any listeners needed for validation of the widget value.File
getFile()
URL
getValue()
Returns the current value of the widget.void
removeListener(JWizard.Controller controller)
void
setValue(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 ParamField
create
-
-
-
-
Constructor Detail
-
JURLField
public JURLField(Parameter<?> parameter)
-
-
Method Detail
-
doLayout
public 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 classParamField
- Returns:
- JComponent or null if error
-
browse
protected void browse()
-
getValue
public URL getValue()
Description copied from class:ParamField
Returns the current value of the widget.- Specified by:
getValue
in classParamField
- Returns:
- Object representing the current value of the widget
-
addListener
public void addListener(JWizard.Controller controller)
- Specified by:
addListener
in classParamField
-
removeListener
public void removeListener(JWizard.Controller controller)
- Specified by:
removeListener
in classParamField
-
getFile
public File getFile()
-
setValue
public void setValue(Object value)
Description copied from class:ParamField
Sets the value of the widget.- Specified by:
setValue
in classParamField
- Parameters:
value
- an object containing the value to set for the widget
-
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 classParamField
- Returns:
- boolean if validated
-
-