com.cc.framework.common
Class CheckState

java.lang.Object
  extended bycom.cc.framework.common.CheckState
All Implemented Interfaces:
java.io.Serializable, SimpleEnumType, SimpleEnumType2

public final class CheckState
extends java.lang.Object
implements SimpleEnumType2, java.io.Serializable

Defines check states used by the common controls framework

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

Field Summary
private static CheckState[] ALL
          Collection with all kinds of check states
static CheckState CHECKED
          CheckState: CHECKED (1 = The object is checked)
private  int intValue
          Unique Identifier / key / type
static int N_CHECKED
          int value of CHECKED (1 = The object is checked)
static int N_NONE
          int value of NONE (-2 = Don't show any checkboxes)
static int N_UNCHECKED
          int value of UNCHECKED (0 = The object is not checked)
static int N_UNDEFINED
          int value of UNDEFINED (2 = The check sate is undefined, checked gray)
static int N_UNSELECTABLE
          int value of UNSELECTABLE (-1 = The object is not selectable, unchecked gray)
static CheckState NONE
          CheckState: NONE (-2 = Don't show any checkboxes)
private static long serialVersionUID
          Serial Version UID
private  java.lang.String strValue
          Display value / nice name
static CheckState UNCHECKED
          CheckState: UNCHECKED (0 = The object is not checked)
static CheckState UNDEFINED
          CheckState: UNDEFINED (2 = The check sate is undefined) (checked gray)
static CheckState UNSELECTABLE
          CheckState: UNSELECTABLE (-1 = The object is not selectable) (unchecked gray)
 
Constructor Summary
private CheckState(int key, java.lang.String value)
          Constructor
 
Method Summary
 SimpleEnumType2[] elements()
          Returns an array with all elements of the enumeration
 boolean equals(int other)
          Compares this check state to the specified integer.
 boolean equals(java.lang.Object obj)
          Compares this check state to the specified object.
 java.lang.String getKey()
          Returns the internal key
 java.lang.String getValue()
          Returns the internal value
 int hashCode()
           
 int intValue()
           
static CheckState parse(java.lang.Object obj)
          Creates for the argument an Object of type CheckState
static CheckState parseInt(int i)
          Creates for the argument an Object of type CheckState
 int toInt()
          Deprecated. please use intValue() instead
 java.lang.String toString()
           
 
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

N_NONE

public static final int N_NONE
int value of NONE (-2 = Don't show any checkboxes)

See Also:
Constant Field Values

N_UNSELECTABLE

public static final int N_UNSELECTABLE
int value of UNSELECTABLE (-1 = The object is not selectable, unchecked gray)

See Also:
Constant Field Values

N_UNCHECKED

public static final int N_UNCHECKED
int value of UNCHECKED (0 = The object is not checked)

See Also:
Constant Field Values

N_CHECKED

public static final int N_CHECKED
int value of CHECKED (1 = The object is checked)

See Also:
Constant Field Values

N_UNDEFINED

public static final int N_UNDEFINED
int value of UNDEFINED (2 = The check sate is undefined, checked gray)

See Also:
Constant Field Values

NONE

public static final CheckState NONE
CheckState: NONE (-2 = Don't show any checkboxes)


UNSELECTABLE

public static final CheckState UNSELECTABLE
CheckState: UNSELECTABLE (-1 = The object is not selectable) (unchecked gray)


UNCHECKED

public static final CheckState UNCHECKED
CheckState: UNCHECKED (0 = The object is not checked)


CHECKED

public static final CheckState CHECKED
CheckState: CHECKED (1 = The object is checked)


UNDEFINED

public static final CheckState UNDEFINED
CheckState: UNDEFINED (2 = The check sate is undefined) (checked gray)


intValue

private int intValue
Unique Identifier / key / type


strValue

private java.lang.String strValue
Display value / nice name


ALL

private static final CheckState[] ALL
Collection with all kinds of check states

Constructor Detail

CheckState

private CheckState(int key,
                   java.lang.String value)
Constructor

Parameters:
key - The key
value - The value / nice name
Method Detail

elements

public SimpleEnumType2[] elements()
Description copied from interface: SimpleEnumType2
Returns an array with all elements of the enumeration

Specified by:
elements in interface SimpleEnumType2
Returns:
Collection with elements
See Also:
SimpleEnumType2.elements()

getKey

public java.lang.String getKey()
Description copied from interface: SimpleEnumType2
Returns the internal key

Specified by:
getKey in interface SimpleEnumType2
Returns:
The key
See Also:
SimpleEnumType2.getKey()

getValue

public java.lang.String getValue()
Description copied from interface: SimpleEnumType2
Returns the internal value

Specified by:
getValue in interface SimpleEnumType2
Returns:
the Value
See Also:
SimpleEnumType2.getValue()

equals

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

Parameters:
obj - The object to compare this CheckState against.
Returns:
true if the check statesare equal; false otherwise.

hashCode

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

equals

public boolean equals(int other)
Compares this check state to the specified integer.

Parameters:
other - The integer to compare this CheckState against.
Returns:
true if the check statesare equal; false otherwise.

parseInt

public static CheckState parseInt(int i)
Creates for the argument an Object of type CheckState

Parameters:
i - Integer to parse
Returns:
SortOrder

parse

public static CheckState parse(java.lang.Object obj)
Creates for the argument an Object of type CheckState

Parameters:
obj - Object to parse
Returns:
CheckState

toInt

public int toInt()
Deprecated. please use intValue() instead

Returns the key as an integer

Returns:
The internal key

intValue

public int intValue()
Returns:
Integer value

toString

public java.lang.String toString()
See Also:
Object.toString()


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