org.geotools.swing.wizard
Class ParamField

java.lang.Object
  extended by org.geotools.swing.wizard.ParamField
Direct Known Subclasses:
JDoubleField, JField, JFileField, JGeometryField, JURLField

public abstract class ParamField
extends java.lang.Object

Super class that provides additional helper methods useful when implementing your own ParamWidget.

Author:
gdavis

Field Summary
protected  Parameter<?> parameter
           
 
Method Summary
abstract  void addListener(JWizard.Controller controller)
           
static ParamField create(Parameter<?> parameter)
          Factory method creating the appropriate ParamField for the supplied Param.
abstract  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.
abstract  java.lang.Object getValue()
          Returns the current value of the widget.
abstract  void removeListener(JWizard.Controller controller)
           
abstract  void setValue(java.lang.Object value)
          Sets the value of the widget.
abstract  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
 

Field Detail

parameter

protected final Parameter<?> parameter
Method Detail

doLayout

public abstract 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. The returned JComponent will contain the widget for editing.

Returns:
JComponent or null if error

validate

public abstract boolean validate()
Validates the current value of the widget, returns false if not valid, true otherwise

Returns:
boolean if validated

setValue

public abstract void setValue(java.lang.Object value)
Sets the value of the widget.

Parameters:
Object - an object containing the value to set for the widget

addListener

public abstract void addListener(JWizard.Controller controller)

removeListener

public abstract void removeListener(JWizard.Controller controller)

getValue

public abstract java.lang.Object getValue()
Returns the current value of the widget.

Returns:
Object representing the current value of the widget

create

public static ParamField create(Parameter<?> parameter)
Factory method creating the appropriate ParamField for the supplied Param.

Parameters:
param -
Returns:


Copyright © 1996-2010 Geotools. All Rights Reserved.