public abstract class ConversionSpecifier<I,O> extends Object implements Specifier<O>
I)
and output (O) types must be provided.| Modifier | Constructor and Description |
|---|---|
protected |
ConversionSpecifier(Specifier<I> baseSpec)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionListener(ActionListener listener)
Adds a listener which will be informed when the user interacts with
the graphical component to cause a (potential) change in the value.
|
JComponent |
getComponent()
Returns the graphical component that the user can interact with
to supply a value.
|
O |
getSpecifiedValue()
Returns the typed value currently specified by the graphical component.
|
protected abstract O |
inToOut(I inValue)
Converts a value from input (base) to output type.
|
boolean |
isXFill()
Whether the GUI component should fill the available width of a panel.
|
protected abstract I |
outToIn(O outValue)
Converts a value from output to input (base) type.
|
void |
removeActionListener(ActionListener listener)
Removes a listener previously added by
addActionListener. |
void |
setSpecifiedValue(O outValue)
Sets the typed value represented by the graphical component.
|
void |
submitReport(ReportMap report)
Accepts information about a completed plot that was drawn with
input from this specifier.
|
protected abstract O inToOut(I inValue)
inValue - input type valueprotected abstract I outToIn(O outValue)
outValue - output type valuepublic JComponent getComponent()
SpecifierThe returned component should preferably honour the JComponent
setEnabled/isEnabled methods.
getComponent in interface Specifier<O>public O getSpecifiedValue()
SpecifiergetSpecifiedValue in interface Specifier<O>public void setSpecifiedValue(O outValue)
SpecifiergetSpecifiedValue should yield the same result.
However if a value is set which is of the correct type but cannot be represented by this specifier, results are unpredictable.
setSpecifiedValue in interface Specifier<O>outValue - new valuepublic void addActionListener(ActionListener listener)
SpecifieraddActionListener in interface Specifier<O>listener - listener to addpublic void removeActionListener(ActionListener listener)
SpecifieraddActionListener.removeActionListener in interface Specifier<O>listener - listener to removepublic void submitReport(ReportMap report)
SpecifiersubmitReport in interface Specifier<O>report - report of a plot partially specified by this objectpublic boolean isXFill()
SpecifierCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.