net.curre.prefcount.gui.type
Enum WindowComponent

java.lang.Object
  extended by java.lang.Enum<WindowComponent>
      extended by net.curre.prefcount.gui.type.WindowComponent
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<WindowComponent>, UIItem

public enum WindowComponent
extends java.lang.Enum<WindowComponent>
implements UIItem

This is enumeration to represent window components (menu radio buttons and the corresponding menu bar menu items).

Created date: Mar 8, 2008

Author:
Yevgeny Nyden

Enum Constant Summary
ABOUT_ACTION
          Represents the about action item.
ABOUT_ACTION2
          Represents the about action item.
DIALOG_BACK
          Represents the dialog window back item.
DIALOG_FORWARD
          Represents the dialog window forward item.
DIALOG_FORWARD2
          Represents the choose player dialog window forward item.
DIVISIBLE_BY_N
          Represents the main window divisible by N item.
DIVISIBLE_IGNORE
          Represents the main window ignore divisibility item.
HELP_COMMON_ACTION
          Represents the common rules help action item.
HELP_COMMON_ACTION2
          Represents the common rules help action item.
HELP_COUNT_ACTION
          Represents the count help action item.
HELP_COUNT_ACTION2
          Represents the count help action item.
HELP_PREF_ACTION
          Represents the preferance reference help action item.
HELP_PREF_ACTION2
          Represents the preferance reference help action item.
LENINGRAD
          Represents the main window leningrad item.
MAIN_3_PLAYERS
          Represents the main window 3 players item.
MAIN_4_PLAYERS
          Represents the main window 4 players item.
PRINT_SCORES_ACTION
          Represents the print action item.
PRINT_TEMPLATE3_ACTION
          Represents the print action item.
PRINT_TEMPLATE4_ACTION
          Represents the print action item.
QUIT_ACTION
          Represents the quit action item.
RESET_SETTINGS_ACTION
          Represents the reset settings action item.
SAVE_SETTINGS_ACTION
          Represents the save settings action item.
SOCHINKA
          Represents the main window sochinka item.
 
Field Summary
 java.lang.String groupKey
          Unique identifier for the button group.
 java.lang.String tooltipKey
          Tooltip resource key for this item.
 
Method Summary
 java.lang.String getShortcutIndexKey()
          Gets the item shortcut index resource key.
 java.lang.String getShortcutKey()
          Gets the item shortcut resource key.
 java.lang.String getTextKey()
          Gets the item text resource key.
static WindowComponent valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static WindowComponent[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LENINGRAD

public static final WindowComponent LENINGRAD
Represents the main window leningrad item.


SOCHINKA

public static final WindowComponent SOCHINKA
Represents the main window sochinka item.


MAIN_3_PLAYERS

public static final WindowComponent MAIN_3_PLAYERS
Represents the main window 3 players item.


MAIN_4_PLAYERS

public static final WindowComponent MAIN_4_PLAYERS
Represents the main window 4 players item.


DIVISIBLE_IGNORE

public static final WindowComponent DIVISIBLE_IGNORE
Represents the main window ignore divisibility item.


DIVISIBLE_BY_N

public static final WindowComponent DIVISIBLE_BY_N
Represents the main window divisible by N item.


DIALOG_FORWARD

public static final WindowComponent DIALOG_FORWARD
Represents the dialog window forward item.


DIALOG_BACK

public static final WindowComponent DIALOG_BACK
Represents the dialog window back item.


DIALOG_FORWARD2

public static final WindowComponent DIALOG_FORWARD2
Represents the choose player dialog window forward item.


SAVE_SETTINGS_ACTION

public static final WindowComponent SAVE_SETTINGS_ACTION
Represents the save settings action item.


RESET_SETTINGS_ACTION

public static final WindowComponent RESET_SETTINGS_ACTION
Represents the reset settings action item.


PRINT_SCORES_ACTION

public static final WindowComponent PRINT_SCORES_ACTION
Represents the print action item.


PRINT_TEMPLATE3_ACTION

public static final WindowComponent PRINT_TEMPLATE3_ACTION
Represents the print action item.


PRINT_TEMPLATE4_ACTION

public static final WindowComponent PRINT_TEMPLATE4_ACTION
Represents the print action item.


QUIT_ACTION

public static final WindowComponent QUIT_ACTION
Represents the quit action item.


HELP_COUNT_ACTION

public static final WindowComponent HELP_COUNT_ACTION
Represents the count help action item.


HELP_COUNT_ACTION2

public static final WindowComponent HELP_COUNT_ACTION2
Represents the count help action item. We need the second enum for the second menu (when on Mac).


HELP_PREF_ACTION

public static final WindowComponent HELP_PREF_ACTION
Represents the preferance reference help action item.


HELP_PREF_ACTION2

public static final WindowComponent HELP_PREF_ACTION2
Represents the preferance reference help action item. We need the second enum for the second menu (when on Mac).


HELP_COMMON_ACTION

public static final WindowComponent HELP_COMMON_ACTION
Represents the common rules help action item.


HELP_COMMON_ACTION2

public static final WindowComponent HELP_COMMON_ACTION2
Represents the common rules help action item. We need the second enum for the second menu (when on Mac).


ABOUT_ACTION

public static final WindowComponent ABOUT_ACTION
Represents the about action item.


ABOUT_ACTION2

public static final WindowComponent ABOUT_ACTION2
Represents the about action item. We need the second enum for the second menu (when on Mac).

Field Detail

groupKey

public final java.lang.String groupKey
Unique identifier for the button group.


tooltipKey

public final java.lang.String tooltipKey
Tooltip resource key for this item.

Method Detail

values

public static final WindowComponent[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(WindowComponent c : WindowComponent.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static WindowComponent valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getTextKey

public java.lang.String getTextKey()
Gets the item text resource key.

Specified by:
getTextKey in interface UIItem
Returns:
the item text resource key.

getShortcutKey

public java.lang.String getShortcutKey()
Gets the item shortcut resource key.

Specified by:
getShortcutKey in interface UIItem
Returns:
the item shortcut resource key or null if there is no shortcut for this item.

getShortcutIndexKey

public java.lang.String getShortcutIndexKey()
Gets the item shortcut index resource key. This is the index of the shortcut letter in the item's text string. Note, that "-1" indicates that the item's shortcut does not appear in the text string.

Specified by:
getShortcutIndexKey in interface UIItem
Returns:
the item shortcut index resource key or null if there is no shortcut for this item.


Copyright © 2008. All Rights Reserved.