|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.config.SpecifierPanel<V>
public abstract class SpecifierPanel<V>
Partial Specifier implementation.
Constructor Summary | |
---|---|
protected |
SpecifierPanel(boolean isXFill)
Constructor. |
Method Summary | |
---|---|
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. |
protected abstract JComponent |
createComponent()
Abstract method called lazily during getComponent
to obtain the graphical component used by this specifier. |
protected void |
fireAction()
Notifies all the registered action listeners of a non-specific event. |
protected ActionListener |
getActionForwarder()
Returns a listener which will take ActionEvents and forward them to any listeners registered with this panel. |
protected ChangeListener |
getChangeForwarder()
Returns a listener which will take ChangeEvents and forward them to any listeners registered with this panel. |
JComponent |
getComponent()
Returns the graphical component that the user can interact with to supply a value. |
boolean |
isXFill()
Whether the GUI component should fill the available width of a panel. |
void |
removeActionListener(ActionListener listener)
Removes a listener previously added by addActionListener . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface uk.ac.starlink.ttools.plot2.config.Specifier |
---|
getSpecifiedValue, setSpecifiedValue, submitReport |
Constructor Detail |
---|
protected SpecifierPanel(boolean isXFill)
isXFill
- true if the graphical component should expand to fill
the available horizontal spaceMethod Detail |
---|
public boolean isXFill()
Specifier
isXFill
in interface Specifier<V>
protected abstract JComponent createComponent()
getComponent
to obtain the graphical component used by this specifier.
It will be called a maximum of once. It is not necessary that
the component actually be created in this method, for instance
it may be created at construction time if that's more convenient.
public JComponent getComponent()
Specifier
The returned component should preferably honour the JComponent
setEnabled
/isEnabled
methods.
getComponent
in interface Specifier<V>
public void addActionListener(ActionListener listener)
Specifier
addActionListener
in interface Specifier<V>
listener
- listener to addpublic void removeActionListener(ActionListener listener)
Specifier
addActionListener
.
removeActionListener
in interface Specifier<V>
listener
- listener to removeprotected ActionListener getActionForwarder()
In general any input component which forms part of this panel's
GUI should have as a listener the result of
getActionForwarder
or getChangeForwarder
,
so that changes in their state are propagated to listeners
of this specifier.
protected ChangeListener getChangeForwarder()
In general any input component which forms part of this panel's
GUI should have as a listener the result of
getActionForwarder
or getChangeForwarder
,
so that changes in their state are propagated to listeners
of this specifier.
protected void fireAction()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |