Specifier<O>public abstract class ConversionSpecifier<I,O> extends java.lang.Object implements Specifier<O>
I)
and output (O) types must be provided.| Modifier | Constructor | Description |
|---|---|---|
protected |
ConversionSpecifier(Specifier<I> baseSpec) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addActionListener(java.awt.event.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.
|
javax.swing.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(java.awt.event.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 javax.swing.JComponent getComponent()
SpecifierThe returned component should preferably honour the JComponent
setEnabled/isEnabled methods.
getComponent in interface Specifier<I>public O getSpecifiedValue()
SpecifiergetSpecifiedValue in interface Specifier<I>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<I>outValue - new valuepublic void addActionListener(java.awt.event.ActionListener listener)
SpecifieraddActionListener in interface Specifier<I>listener - listener to addpublic void removeActionListener(java.awt.event.ActionListener listener)
SpecifieraddActionListener.removeActionListener in interface Specifier<I>listener - listener to removepublic void submitReport(ReportMap report)
SpecifiersubmitReport in interface Specifier<I>report - report of a plot partially specified by this objectpublic boolean isXFill()
SpecifierCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.