| java.lang.Object ejp.presenter.api.filters.parameters.AbstractParameter
All known Subclasses: ejp.presenter.api.filters.parameters.ColorDistributionParameter, ejp.presenter.api.filters.parameters.StringListParameter, ejp.presenter.api.filters.parameters.DoubleParameter, ejp.presenter.api.filters.parameters.BooleanParameter, ejp.presenter.api.filters.parameters.RadioParameter,
AbstractParameter | abstract public class AbstractParameter (Code) | | Abstract super class of all parameters instances.
author: Sebastien Vauclair version: $Revision: 1.6 $ $Date: 2005/02/14 12:06:19 $ |
Field Summary | |
final public static int | LABEL_WIDTH Width (in pixels) of a parameter's label. | protected Dialog | dialog Dialog currently showing the parameter (null if none). | final public String | name Parameter name. | final protected JPanel | panel Parameter panel (graphical box). | protected int | y Current row number in parameter's lines. |
Method Summary | |
final protected void | addLine(String aTitle, String aToolTipText, JComponent aComponent1, JComponent aComponent2) Adds a configuration line to the paramter. | public JPanel | getPanel() Returns the parameter's graphical customization panel. | abstract public Object | getValue() Returns current value of the parameter, as any object. | abstract public String | getValueAsText() Returns current value of the parameter, as a text value. | public void | setDialog(Dialog aDialog) Sets current dialog showing the parameter's customization. | abstract public void | setReadOnly() Sets the parameter to be read-only, ie. | abstract public void | setValue(Object aObject) Sets current value of the parameter, from an object value. | abstract public void | setValueAsText(String aTextValue) Sets current value of the parameter, from a text value. | final public void | showInTestFrame() Shows the parameter in a test frame. |
LABEL_WIDTH | final public static int LABEL_WIDTH(Code) | | Width (in pixels) of a parameter's label.
|
dialog | protected Dialog dialog(Code) | | Dialog currently showing the parameter (null if none).
|
panel | final protected JPanel panel(Code) | | Parameter panel (graphical box).
|
y | protected int y(Code) | | Current row number in parameter's lines.
|
AbstractParameter | public AbstractParameter(String aName, String aTitle, String aToolTipText)(Code) | | Creates a new parameter instance..
Parameters: aName - the parameter's unique name, as referenced in XML files. Parameters: aTitle - the parameter's graphical title (free text value). Parameters: aToolTipText - a tooltip text explaining the parameter's purpose. |
addLine | final protected void addLine(String aTitle, String aToolTipText, JComponent aComponent1, JComponent aComponent2)(Code) | | Adds a configuration line to the paramter.
Such a line is made of a title and one or two visual objects used to set
the value of the customization line.
Parameters: aTitle - the line's meaning. Parameters: aToolTipText - a free tool-tip text. Parameters: aComponent1 - first component (might be null to skip it). Parameters: aComponent2 - second component (might be null to skip it). |
getPanel | public JPanel getPanel()(Code) | | Returns the parameter's graphical customization panel.
the panel. |
getValue | abstract public Object getValue()(Code) | | Returns current value of the parameter, as any object.
an Object value. |
getValueAsText | abstract public String getValueAsText()(Code) | | Returns current value of the parameter, as a text value.
The returned value will be used for XML storage.
a text value. |
setDialog | public void setDialog(Dialog aDialog)(Code) | | Sets current dialog showing the parameter's customization.
Parameters: aDialog - an initialized dialog. |
setReadOnly | abstract public void setReadOnly()(Code) | | Sets the parameter to be read-only, ie. no longer changeable.
Might be called at most once.
|
setValue | abstract public void setValue(Object aObject) throws ClassCastException(Code) | | Sets current value of the parameter, from an object value.
This method should handle object values returned by the
getValue() method.
Parameters: aObject - an Object value. exception: ClassCastException - if the object is of an unknown type. |
setValueAsText | abstract public void setValueAsText(String aTextValue) throws IllegalArgumentException(Code) | | Sets current value of the parameter, from a text value.
This method should parse text values returned by the
getValueAsText() method.
Parameters: aTextValue - a text value. exception: IllegalArgumentException - if the text is not parseable. |
showInTestFrame | final public void showInTestFrame()(Code) | | Shows the parameter in a test frame.
|
|
|