org.grinvin.params

Class ParameterInfo


public class ParameterInfo
extends java.lang.Object

Contains information on a single parameter of an invariant, graph factory, etc.

Method Summary

void
fromElement(Element element)
Load parameter information from a JDOM element.
String
getCaption()
Return the display name of this parameter.
String
getDescription()
Return a textual description of this parameter.
ParameterEditor
getEditor()
Return an editor for this parameter.
String
getName()
Return the name (or id) of this parameter which distinguishes it from other parameters in a given list.
InternationalizedProperties
getProperties()
Return the internationalized properties object for this parameter.
Class
getType()
Return the type of this parameter.
void
setDefaultEditor()
Install a default editor for this parameter, depending on the type of this parameter.
void
setEditor(ParameterEditor editor)
Set the editor for this parameter.
void
setName(String name)
Set the name of this parameter.
void
setProperties(InternationalizedProperties properties)
Set the internationalized properties object for this parameter.
void
setType(Class type)
Set the type of this parameter.

Method Details

fromElement

public void fromElement(Element element)
            throws IOFormatException
Load parameter information from a JDOM element.

getCaption

public String getCaption()
Return the display name of this parameter.
Returns:
getProperties().getProperty("parameter.caption")

getDescription

public String getDescription()
Return a textual description of this parameter.
Returns:
getProperties().getProperty("parameter.description")

getEditor

public ParameterEditor getEditor()
Return an editor for this parameter. This editor should handle objects that belong to the class that corresponds to the type of this parameter.

getName

public String getName()
Return the name (or id) of this parameter which distinguishes it from other parameters in a given list.

getProperties

public InternationalizedProperties getProperties()
Return the internationalized properties object for this parameter. Currently the following property keys should be supported:
  • parameter.caption Display name of this parameter.
  • parameter.description Textual description of this parameter.

getType

public Class getType()
Return the type of this parameter. Corresponding parameter values should be represented by objects of this type.

setDefaultEditor

public void setDefaultEditor()
Install a default editor for this parameter, depending on the type of this parameter.

setEditor

public void setEditor(ParameterEditor editor)
Set the editor for this parameter. This editor should handle objects that belong to the class that corresponds to the type of this parameter.

setName

public void setName(String name)
Set the name of this parameter.

setProperties

public void setProperties(InternationalizedProperties properties)
Set the internationalized properties object for this parameter.

setType

public void setType(Class type)
Set the type of this parameter.