|
|||||||||
| Home >> All >> javax >> ide >> [ menu overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.ide.menu
Class IDEAction

java.lang.Objectjavax.ide.view.DefaultViewable
javax.ide.menu.IDEAction
- All Implemented Interfaces:
- javax.ide.Identifiable, javax.ide.view.Viewable
- public class IDEAction
- extends javax.ide.view.DefaultViewable
- implements javax.ide.Identifiable, javax.ide.view.Viewable
- extends javax.ide.view.DefaultViewable
IDEAction encapsulates the meta-data describing an
executable action.
| Field Summary | |
private boolean |
_checked
|
private boolean |
_enabled
|
private javax.ide.util.IconDescription |
_icon
|
private java.lang.String |
_id
|
private boolean |
_isToggle
|
private java.lang.String |
_label
|
private int |
_mnemonic
|
private javax.swing.event.SwingPropertyChangeSupport |
_propertyChangeSupport
|
private java.lang.String |
_toolTip
|
static java.lang.String |
PROP_CHECKED
Identifies the bound property 'checked'. |
static java.lang.String |
PROP_ENABLED
Identifies the bound property 'enabled'. |
static java.lang.String |
PROP_MNEMONIC
Identifies the bound property 'mnemonic'. |
| Fields inherited from class javax.ide.view.DefaultViewable |
|
| Fields inherited from interface javax.ide.view.Viewable |
PROP_ICON_PATH, PROP_LABEL, PROP_VISIBLE |
| Constructor Summary | |
IDEAction(java.lang.String id)
Constructor. |
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a java.beans.PropertyChangeListener to the listener list. |
java.util.List |
getControllers()
Get the controllers for this action. |
javax.ide.util.IconDescription |
getIcon()
Gets a relative path to the icon. |
java.lang.String |
getID()
Gets this object's unique identifier. |
java.lang.String |
getLabel()
Returns a short label that can be displayed to the user. |
int |
getMnemonic()
|
java.lang.String |
getToolTip()
Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Viewable. |
int |
hashCode()
Get a value that represents this Object, as uniquely as possible within the confines of an int. |
boolean |
isChecked()
Find out whether the state of this IDEAction is checked
or unchecked. |
boolean |
isEnabled()
|
boolean |
isToggleItem()
Get whether this action is a toggle action. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a java.beans.PropertyChangeListener from the listener list. |
void |
setChecked(boolean checked)
Set the state of the IDEAction. |
void |
setEnabled(boolean enabled)
Set the enabled state of the IDEAction. |
void |
setIcon(javax.ide.util.IconDescription icon)
Set the action icon path. |
void |
setLabel(java.lang.String label)
Set the action label. |
void |
setMnemonic(int mnemonic)
Set the action label mnemonic character. |
void |
setToggleItem(boolean isToggleItem)
|
void |
setToolTip(java.lang.String toolTip)
Set the action tooltip. |
java.lang.String |
toString()
Returns the label. |
| Methods inherited from class javax.ide.view.DefaultViewable |
firePropertyChange, isVisible, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.ide.view.Viewable |
isVisible |
| Field Detail |
PROP_MNEMONIC
public static final java.lang.String PROP_MNEMONIC
- Identifies the bound property 'mnemonic'.
- See Also:
- Constant Field Values
PROP_CHECKED
public static final java.lang.String PROP_CHECKED
- Identifies the bound property 'checked'.
- See Also:
- Constant Field Values
PROP_ENABLED
public static final java.lang.String PROP_ENABLED
- Identifies the bound property 'enabled'.
- See Also:
- Constant Field Values
_id
private java.lang.String _id
_isToggle
private boolean _isToggle
_checked
private boolean _checked
_enabled
private boolean _enabled
_label
private java.lang.String _label
_mnemonic
private int _mnemonic
_toolTip
private java.lang.String _toolTip
_icon
private javax.ide.util.IconDescription _icon
_propertyChangeSupport
private javax.swing.event.SwingPropertyChangeSupport _propertyChangeSupport
| Constructor Detail |
IDEAction
public IDEAction(java.lang.String id)
- Constructor. The
idmust be a unique string identifier. This ID can be used to find the action using the ActionRegistry.
| Method Detail |
isChecked
public boolean isChecked()
- Find out whether the state of this
IDEActionis checked or unchecked.
setChecked
public void setChecked(boolean checked)
- Set the state of the
IDEAction. Bound property.
isEnabled
public boolean isEnabled()
setEnabled
public void setEnabled(boolean enabled)
- Set the enabled state of the
IDEAction. Bound property.
isToggleItem
public boolean isToggleItem()
- Get whether this action is a toggle action.
getLabel
public java.lang.String getLabel()
- Description copied from interface:
javax.ide.view.Viewable - Returns a short label that can be displayed to the user.
Generally, the value of the returned java.lang.String is considered
translatable and should therefore be placed in an appropriate
resource file. When possible, the returned label should be
reasonably short enough to show in the navigator or explorer
windows but long enough to clearly identify and distinguish the
Viewable.- Specified by:
getLabelin interfacejavax.ide.view.Viewable
setLabel
public void setLabel(java.lang.String label)
- Set the action label.
getMnemonic
public int getMnemonic()
setMnemonic
public void setMnemonic(int mnemonic)
- Set the action label mnemonic character.
getToolTip
public java.lang.String getToolTip()
- Description copied from interface:
javax.ide.view.Viewable - Returns the tool tip text to show when the mouse pointer pauses
over a UI component that represents this
Viewable.- Specified by:
getToolTipin interfacejavax.ide.view.Viewable
setToolTip
public void setToolTip(java.lang.String toolTip)
- Set the action tooltip.
getIcon
public javax.ide.util.IconDescription getIcon()
- Description copied from interface:
javax.ide.view.Viewable - Gets a relative path to the icon. Generally, the is considered
translatable, therefore, the path value be placed in an appropriate
resource file. The path must be relative the Viewable implementation
class file location or the resource file location if one is provided.
- Specified by:
getIconin interfacejavax.ide.view.Viewable
setIcon
public void setIcon(javax.ide.util.IconDescription icon)
- Set the action icon path.
getControllers
public java.util.List getControllers()
- Get the controllers for this action.
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
- Description copied from interface:
javax.ide.view.Viewable - Add a java.beans.PropertyChangeListener to the listener list.
A
PropertyChangeEventwill be fired in response to setting a bound property.- Specified by:
addPropertyChangeListenerin interfacejavax.ide.view.Viewable
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
- Description copied from interface:
javax.ide.view.Viewable - Removes a java.beans.PropertyChangeListener from the listener list.
- Specified by:
removePropertyChangeListenerin interfacejavax.ide.view.Viewable
toString
public java.lang.String toString()
- Description copied from interface:
javax.ide.view.Viewable - Returns the label. This overrides the
toStringmethod injava.lang.Object.Implementors of the
Viewableinterface should override this as appropriate. The default implementation is the same asgetLabel()- Specified by:
toStringin interfacejavax.ide.view.Viewable
hashCode
public int hashCode()
- Description copied from class:
java.lang.Object - Get a value that represents this Object, as uniquely as
possible within the confines of an int.
There are some requirements on this method which subclasses must follow:
- Semantic equality implies identical hashcodes. In other
words, if
a.equals(b)is true, thena.hashCode() == b.hashCode()must be as well. However, the reverse is not necessarily true, and two objects may have the same hashcode without being equal. - It must be consistent. Whichever value o.hashCode() returns on the first invocation must be the value returned on all later invocations as long as the object exists. Notice, however, that the result of hashCode may change between separate executions of a Virtual Machine, because it is not invoked on the same object.
Notice that since
hashCodeis used in java.util.Hashtable and other hashing classes, a poor implementation will degrade the performance of hashing (so don't blindly implement it as returning a constant!). Also, if calculating the hash is time-consuming, a class may consider caching the results.The default implementation returns
System.identityHashCode(this) - Semantic equality implies identical hashcodes. In other
words, if
getID
public java.lang.String getID()
- Description copied from interface:
javax.ide.Identifiable - Gets this object's unique identifier.
- Specified by:
getIDin interfacejavax.ide.Identifiable
setToggleItem
public void setToggleItem(boolean isToggleItem)
|
|||||||||
| Home >> All >> javax >> ide >> [ menu overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC