Package adams.gui.core
Class BaseShortcut
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.gui.core.BaseShortcut
-
- All Implemented Interfaces:
CloneHandler<BaseObject>
,ExampleProvider
,Serializable
,Comparable
public class BaseShortcut extends AbstractBaseString implements ExampleProvider
Wrapper for keyboard shortcuts.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Constructor Summary
Constructors Constructor Description BaseShortcut()
Initializes with an empty shortcut.BaseShortcut(String s)
Initializes the shortcut with the string to parse.BaseShortcut(KeyStroke keystroke)
Initializes the object with the keystroke.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getExample()
Returns the example.String
getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).boolean
isValid(String value)
Checks whether the string value is a valid presentation for this class.KeyStroke
keystrokeValue()
Returns the instantiated KeyStroke.-
Methods inherited from class adams.core.base.AbstractBaseString
convert, getValue, initialize, isEmpty, length, setValue, stringValue
-
Methods inherited from class adams.core.base.BaseObject
compareTo, equals, getClone, getInternal, getTemplates, getUnicode, hasFavoritesSupport, hashCode, isValidUnicode, newInstance, setUnicode, toObjectArray, toObjectArray, toString, toStringArray, toStringList
-
-
-
-
Constructor Detail
-
BaseShortcut
public BaseShortcut()
Initializes with an empty shortcut.
-
BaseShortcut
public BaseShortcut(String s)
Initializes the shortcut with the string to parse.- Parameters:
s
- the string to parse
-
BaseShortcut
public BaseShortcut(KeyStroke keystroke)
Initializes the object with the keystroke.- Parameters:
keystroke
- the keystroke to use
-
-
Method Detail
-
isValid
public boolean isValid(String value)
Checks whether the string value is a valid presentation for this class.- Overrides:
isValid
in classAbstractBaseString
- Parameters:
value
- the string value to check- Returns:
- true if non-null
-
getTipText
public String getTipText()
Description copied from class:AbstractBaseString
Returns a tool tip for the GUI editor (ignored if null is returned).- Specified by:
getTipText
in classAbstractBaseString
- Returns:
- the tool tip
-
keystrokeValue
public KeyStroke keystrokeValue()
Returns the instantiated KeyStroke.- Returns:
- true if invalid or empty
-
getExample
public String getExample()
Returns the example.- Specified by:
getExample
in interfaceExampleProvider
- Returns:
- the example
-
-