com.cc.framework.ui
Class MenuStateType

java.lang.Object
  extended bycom.cc.framework.ui.MenuStateType
All Implemented Interfaces:
java.io.Serializable, SimpleEnumType

public final class MenuStateType
extends java.lang.Object
implements SimpleEnumType, java.io.Serializable

Enumeration for the states of menu items

Since:
1.0
Version:
$Revision: 1.15 $
Author:
Gernot Schulz
See Also:
Serialized Form

Field Summary
private static MenuStateType[] ALL
          Collection of all elements (menu states)
static MenuStateType CHECKED
          state: CHECKED
static MenuStateType DISABLED
          state: DISABLED
static MenuStateType ENABLED
          state: ENABLED
static MenuStateType GRAYED
          state: GRAYED
static MenuStateType INVISIBLE
          state: INVISIBLE
private  int mask
          State bit mask
static MenuStateType POPUP
          state: POPUP
static MenuStateType SELECTED
          state: SELECTED
static MenuStateType SEPARATOR
          state: SEPARATOR
private static long serialVersionUID
          Serial Version UID
private  java.lang.String type
          The internal type
static MenuStateType UNCHECKED
          state: UNCHECKED
static MenuStateType UNSELECTED
          state: UNSELECTED
private  int value
          State value
static MenuStateType VISIBLE
          state: VISIBLE
 
Constructor Summary
MenuStateType(java.lang.String type, int mask, int value)
          Constructor for MenuStateType
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this type to the specified object.
 int hashCode()
           
static MenuStateType parse(java.lang.String code)
          Creates for the argument an object of type MenuStateType
static int parseMask(java.lang.String stateList)
          Converts the semicolon delimited list of menu states into a state mask
 java.lang.String toString()
          Returns a string representation for the object
static java.lang.String toString(int state, java.lang.String prefix, java.lang.String separator)
          Creates a separated list for the given menu state
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

CHECKED

public static final MenuStateType CHECKED
state: CHECKED


UNCHECKED

public static final MenuStateType UNCHECKED
state: UNCHECKED


ENABLED

public static final MenuStateType ENABLED
state: ENABLED


DISABLED

public static final MenuStateType DISABLED
state: DISABLED


VISIBLE

public static final MenuStateType VISIBLE
state: VISIBLE


INVISIBLE

public static final MenuStateType INVISIBLE
state: INVISIBLE


GRAYED

public static final MenuStateType GRAYED
state: GRAYED


POPUP

public static final MenuStateType POPUP
state: POPUP


SEPARATOR

public static final MenuStateType SEPARATOR
state: SEPARATOR


SELECTED

public static final MenuStateType SELECTED
state: SELECTED


UNSELECTED

public static final MenuStateType UNSELECTED
state: UNSELECTED


type

private java.lang.String type
The internal type


mask

private int mask
State bit mask


value

private int value
State value


ALL

private static final MenuStateType[] ALL
Collection of all elements (menu states)

Constructor Detail

MenuStateType

public MenuStateType(java.lang.String type,
                     int mask,
                     int value)
Constructor for MenuStateType

Parameters:
type - The menu state
mask - the value's bit mask
value - the value
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares this type to the specified object.

Parameters:
obj - The object to compare this MenuStateType object against.
Returns:
true if the internal types are equal; false otherwise.

hashCode

public int hashCode()
See Also:
Object.hashCode()

parseMask

public static int parseMask(java.lang.String stateList)
Converts the semicolon delimited list of menu states into a state mask

Parameters:
stateList - semicolon delimited list of menu states
Returns:
bit mask

parse

public static MenuStateType parse(java.lang.String code)
Creates for the argument an object of type MenuStateType

Parameters:
code - String to parse
Returns:
The new Object

toString

public static java.lang.String toString(int state,
                                        java.lang.String prefix,
                                        java.lang.String separator)
Creates a separated list for the given menu state

Parameters:
state - the state to process
prefix - optional state prefix
separator - separator
Returns:
separated state list

toString

public java.lang.String toString()
Returns a string representation for the object

Returns:
The menu state


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.