java.awt
Class MenuShortcut
java.lang.Object
|
+--java.awt.MenuShortcut
All Implemented Interfaces:
Serializable
This class implements a keyboard accelerator for a menu item.
Author:- Aaron M. Renn (arenn@urbanophile.com)
MenuShortcut
public MenuShortcut(int key)
Initializes a new instance of MenuShortcut
with the
specified virtual key value.
Parameters:
MenuShortcut
public MenuShortcut(int key, boolean usesShift)
Initializes a new instance of MenuShortcut
with the
specified virtual key value and shift setting.
Parameters:
equals
public boolean equals(java.awt.MenuShortcut obj)
Tests this object for equality against the specified object. The two
objects will be considered equal if and only if the specified object
is an instance of MenuShortcut
and has the same key value
and shift setting as this object.
Parameters:
Returns:
true
if the two objects are equal, false
otherwise.
equals
public boolean equals(java.lang.Object obj)
Parameters:
getKey
public int getKey()
Returns the virtual keycode for this shortcut.
Returns:
- The virtual keycode for this shortcut.
hashCode
public int hashCode()
paramString
protected String paramString()
Returns a debugging string for this object.
Returns:
- A debugging string for this object.
toString
public String toString()
Returns a string representation of this shortcut.
Returns:
- A string representation of this shortcut.
usesShiftModifier
public boolean usesShiftModifier()
Returns the shift setting for this shortcut.
Returns:
true
if the shift key was pressed, false
otherwise.