Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

javax.ide.menu
Class IDEAction

java.lang.Object
  extended by javax.ide.view.DefaultViewable
      extended by javax.ide.menu.IDEAction
All Implemented Interfaces:
Identifiable, Viewable

public class IDEAction
extends DefaultViewable
implements Identifiable, Viewable

IDEAction encapsulates the meta-data describing an executable action.


Field Summary
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'.
static java.lang.String PROP_TOGGLE_ITEM
          Identifies the bound property 'toggleItem'.
static java.lang.String PROP_TOOLTIP
          Identifies the bound property 'toolTip'.
 
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
 java.util.List getControllers()
          Get the controllers for this action.
 IconDescription getIcon()
          Gets a relative path to the icon.
 java.lang.String getID()
          Gets this object's unique identifier.
 java.lang.String getLabel()
          Get a short descriptive label that can be shown 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()
           
 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 setChecked(boolean checked)
          Set the state of the IDEAction.
 void setEnabled(boolean enabled)
          Set the enabled state of the IDEAction.
 void setIcon(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
addPropertyChangeListener, firePropertyChange, isVisible, removePropertyChangeListener, 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
addPropertyChangeListener, isVisible, removePropertyChangeListener
 

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

PROP_TOOLTIP

public static final java.lang.String PROP_TOOLTIP
Identifies the bound property 'toolTip'.

See Also:
Constant Field Values

PROP_TOGGLE_ITEM

public static final java.lang.String PROP_TOGGLE_ITEM
Identifies the bound property 'toggleItem'.

See Also:
Constant Field Values
Constructor Detail

IDEAction

public IDEAction(java.lang.String id)
Constructor. The id must be a unique string identifier. This ID can be used to find the action using the ActionRegistry.

Parameters:
id - A unique string identifying the command. The id of an action has an undefined type, an the id name set to the string identifying the action.
Method Detail

isChecked

public boolean isChecked()
Find out whether the state of this IDEAction is checked or unchecked.

Returns:
The state of the IDEAction.

setChecked

public void setChecked(boolean checked)
Set the state of the IDEAction. Bound property.

Parameters:
checked - The state of the IDEAction.

isEnabled

public boolean isEnabled()
Returns:
true if the IDEAction is enabled. false otherwise.

setEnabled

public void setEnabled(boolean enabled)
Set the enabled state of the IDEAction. Bound property.

Parameters:
enabled - The state of the IDEAction.

isToggleItem

public boolean isToggleItem()
Get whether this action is a toggle action.

Returns:
true if this action is a toggle.

getLabel

public java.lang.String getLabel()
Description copied from class: DefaultViewable
Get a short descriptive label that can be shown to the user.

Specified by:
getLabel in interface Viewable
Overrides:
getLabel in class DefaultViewable
Returns:
A short descriptive label.

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.

Parameters:
mnemonic - The character to be used as mnemonic.

getToolTip

public java.lang.String getToolTip()
Description copied from interface: Viewable
Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Viewable.

Specified by:
getToolTip in interface Viewable
Overrides:
getToolTip in class DefaultViewable
Returns:
the tooltip to show when the mouse pointer pauses over a UI component that represents this Viewable.

setToolTip

public void setToolTip(java.lang.String toolTip)
Set the action tooltip.


getIcon

public IconDescription getIcon()
Description copied from interface: 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:
getIcon in interface Viewable
Overrides:
getIcon in class DefaultViewable
Returns:
The icon relative path.

setIcon

public void setIcon(IconDescription icon)
Set the action icon path.


getControllers

public java.util.List getControllers()
Get the controllers for this action.

Returns:
a list of controllers for this action. Must not return null.

toString

public java.lang.String toString()
Description copied from interface: Viewable
Returns the label. This overrides the toString method in java.lang.Object.

Implementors of the Viewable interface should override this as appropriate. The default implementation is the same as getLabel()

Specified by:
toString in interface Viewable
Overrides:
toString in class DefaultViewable
Returns:
A short label describing this Viewable.
See Also:
Object.toString(), Viewable.getLabel()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getID

public java.lang.String getID()
Description copied from interface: Identifiable
Gets this object's unique identifier.

Specified by:
getID in interface Identifiable
Returns:
The object's unique identifier.

setToggleItem

public void setToggleItem(boolean isToggleItem)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

Copyright © 1997, 2013, Oracle. All rights reserved.