Package repast.simphony.ui.parameters
Class DefaultParameterBinder
- java.lang.Object
-
- repast.simphony.ui.parameters.AbstractParameterBinder
-
- repast.simphony.ui.parameters.DefaultParameterBinder
-
- All Implemented Interfaces:
ParameterBinder
- Direct Known Subclasses:
RandomSeedParameterBinder
public class DefaultParameterBinder extends AbstractParameterBinder
ParameterBinder for single unconstrained parameters.- Author:
- Nick Collier
-
-
Field Summary
Fields Modifier and Type Field Description protected StringConverter<Object>
converter
protected JTextComponent
field
protected ParameterValueModel
model
-
Fields inherited from class repast.simphony.ui.parameters.AbstractParameterBinder
displayName, name, order, params, typeMap
-
-
Constructor Summary
Constructors Constructor Description DefaultParameterBinder(String name, String displayName, Class<?> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JComponent
getComponent(Parameters params)
Creates a JComponent for a parameter in the parameters.void
resetToDefault()
Resets the JComponent to the default value of its parameter.void
toParameter()
Updates the parameter that this is a binder for with the latest value from the created component.String
toXML()
Gets the parameter xml representation of this ParameterBinder.-
Methods inherited from class repast.simphony.ui.parameters.AbstractParameterBinder
getDisplayOrder, getLabel, getName, setDisplayOrder, toXML
-
-
-
-
Field Detail
-
field
protected JTextComponent field
-
converter
protected StringConverter<Object> converter
-
model
protected ParameterValueModel model
-
-
Method Detail
-
getComponent
public JComponent getComponent(Parameters params)
Description copied from interface:ParameterBinder
Creates a JComponent for a parameter in the parameters.- Returns:
- the created JComponent.
-
resetToDefault
public void resetToDefault()
Description copied from interface:ParameterBinder
Resets the JComponent to the default value of its parameter.
-
toParameter
public void toParameter()
Description copied from interface:ParameterBinder
Updates the parameter that this is a binder for with the latest value from the created component.
-
toXML
public String toXML()
Description copied from interface:ParameterBinder
Gets the parameter xml representation of this ParameterBinder.- Returns:
- the parameter xml representation of this ParameterBinder.
-
-