Package adams.gui.goe
Class TriggerableEventReferenceEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- adams.gui.goe.AbstractPropertyEditorSupport
-
- adams.gui.goe.EventReferenceEditor
-
- adams.gui.goe.TriggerableEventReferenceEditor
-
- All Implemented Interfaces:
HelpProvider
,CustomStringRepresentationHandler
,PropertyEditor
public class TriggerableEventReferenceEditor extends EventReferenceEditor
A PropertyEditor for TriggerableEventReference objects.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
-
Fields inherited from class adams.gui.goe.EventReferenceEditor
m_TextValue, m_Tree
-
Fields inherited from class adams.gui.goe.AbstractPropertyEditorSupport
APPROVE_OPTION, CANCEL_OPTION, EMPTY, m_ChosenOption, m_CustomEditor, m_WindowAdapter, NULL
-
-
Constructor Summary
Constructors Constructor Description TriggerableEventReferenceEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
fromCustomStringRepresentation(String str)
Returns an object created from the custom string representation.String
getJavaInitializationString()
Returns a representation of the current property value as java source.protected boolean
isValidNode(Node node)
Checks whether the node is valid and can be added to the tree.protected TriggerableEventReference
parse(String s)
Parses the given string and returns the generated object.-
Methods inherited from class adams.gui.goe.EventReferenceEditor
acceptInput, createCustomEditor, discardInput, findEvents, getStringToPaint, initForDisplay, isUnchanged, isValid, paintValue, toCustomStringRepresentation, updateValue
-
Methods inherited from class adams.gui.goe.AbstractPropertyEditorSupport
addWindowAdapter, cleanUp, closeDialog, createPopup, createTipText, createWindowAdapter, getChosenOption, getCustomEditor, getHelpDescription, getHelpIcon, getHelpTitle, getHelpURL, getParentDialog, getParentFrame, initialize, isPaintable, resetChosenOption, setValue, supportsCustomEditor
-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getSource, getTags, getValue, removePropertyChangeListener, setAsText, setSource
-
-
-
-
Method Detail
-
fromCustomStringRepresentation
public Object fromCustomStringRepresentation(String str)
Returns an object created from the custom string representation.- Specified by:
fromCustomStringRepresentation
in interfaceCustomStringRepresentationHandler
- Overrides:
fromCustomStringRepresentation
in classEventReferenceEditor
- Parameters:
str
- the string to turn into an object- Returns:
- the object
-
getJavaInitializationString
public String getJavaInitializationString()
Returns a representation of the current property value as java source.- Specified by:
getJavaInitializationString
in interfacePropertyEditor
- Overrides:
getJavaInitializationString
in classEventReferenceEditor
- Returns:
- a value of type 'String'
-
parse
protected TriggerableEventReference parse(String s)
Parses the given string and returns the generated object. The string has to be a valid one, i.e., the isValid(String) check has been performed already and succeeded.- Overrides:
parse
in classEventReferenceEditor
- Parameters:
s
- the string to parse- Returns:
- the generated object, or null in case of an error
-
isValidNode
protected boolean isValidNode(Node node)
Checks whether the node is valid and can be added to the tree.- Overrides:
isValidNode
in classEventReferenceEditor
- Parameters:
node
- the node to check- Returns:
- true if valid
-
-