com.cc.framework.common
Class ButtonState

java.lang.Object
  extended bycom.cc.framework.common.ButtonState

public class ButtonState
extends java.lang.Object

The different states a button can have

Version:
$Revision$
Author:
Harald Schulz

Field Summary
static ButtonState ACTIVE
          Active button
private static ButtonState[] ALL
          Collection with all kinds of alignment types
static ButtonState HOVER
          Active button hover effect
only for completeness. this is not realy an button state
static ButtonState INACTIVE
          Inactive button
private  int index
          State index
static ButtonState PRESSED
          Pressed button
static ButtonState SELECTED
          Selected button
static ButtonState SELHOVER
          Selected button hover effect
only for completeness. this is not really an button state
private  java.lang.String state
          The internal state name
 
Constructor Summary
private ButtonState(java.lang.String type, int index)
          Constructor for ButtonState
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this state the specified object.
 int getIndex()
           
 int intValue()
           
 boolean isHover()
           
static ButtonState parse(java.lang.String code)
          Creates for the argument an object of type ButtonState
 java.lang.String toString()
          Returns the state
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTIVE

public static final ButtonState ACTIVE
Active button


INACTIVE

public static final ButtonState INACTIVE
Inactive button


HOVER

public static final ButtonState HOVER
Active button hover effect
only for completeness. this is not realy an button state


PRESSED

public static final ButtonState PRESSED
Pressed button


SELECTED

public static final ButtonState SELECTED
Selected button


SELHOVER

public static final ButtonState SELHOVER
Selected button hover effect
only for completeness. this is not really an button state


state

private java.lang.String state
The internal state name


index

private int index
State index


ALL

private static final ButtonState[] ALL
Collection with all kinds of alignment types

Constructor Detail

ButtonState

private ButtonState(java.lang.String type,
                    int index)
Constructor for ButtonState

Parameters:
type - The state to initialize the Object
index - Index
Method Detail

intValue

public int intValue()
Returns:
Integer value

toString

public java.lang.String toString()
Returns the state

Returns:
The state

isHover

public boolean isHover()
Returns:
true if this is any of the hover states

equals

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

Parameters:
obj - The object to compare this ButtonState against.
Returns:
true if the stateare equal; false otherwise.

parse

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

Parameters:
code - String to parse
Returns:
The new Object
Throws:
java.lang.IllegalArgumentException - if the argument is not matched

getIndex

public int getIndex()
Returns:
Status Index


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