Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt

Class MenuShortcut

java.lang.Object
|
+--java.awt.MenuShortcut

All Implemented Interfaces:

Serializable


public class MenuShortcut

extends Object

implements Serializable

This class implements a keyboard accelerator for a menu item.

Author:

Constructor Summary

MenuShortcut(int key)

Initializes a new instance of MenuShortcut with the specified virtual key value.
MenuShortcut(int key, boolean usesShift)

Initializes a new instance of MenuShortcut with the specified virtual key value and shift setting.

Method Summary

booleanequals(java.awt.MenuShortcut obj)

Tests this object for equality against the specified object.
booleanequals(java.lang.Object obj)

intgetKey()

Returns the virtual keycode for this shortcut.
inthashCode()

java.lang.StringparamString()

Returns a debugging string for this object.
java.lang.StringtoString()

Returns a string representation of this shortcut.
booleanusesShiftModifier()

Returns the shift setting for this shortcut.

Constructor Details

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:


Method Details

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:


equals

public boolean equals(java.lang.Object obj)

Parameters:


getKey

public int getKey()

Returns the virtual keycode for this shortcut.

Returns:


hashCode

public int hashCode()


paramString

protected String paramString()

Returns a debugging string for this object.

Returns:


toString

public String toString()

Returns a string representation of this shortcut.

Returns:


usesShiftModifier

public boolean usesShiftModifier()

Returns the shift setting for this shortcut.

Returns: