DESY ACOP Beans Home

com.cosylab.gui.displayers
Class DefaultConditionDescriptor

java.lang.Object
  extended by com.cosylab.gui.displayers.DefaultConditionDescriptor
All Implemented Interfaces:
ConditionDescriptor

public class DefaultConditionDescriptor
extends java.lang.Object
implements ConditionDescriptor

DefaultConditionDescriptor take cares of Condition Colors , it defines default colors for Conditions , sets Conditions other Colors.

Author:
tomo

Field Summary
static java.awt.Color DEFAULT_ERROR
          Default ERROR color.
static java.awt.Color DEFAULT_OK
          Default OK color.
static java.awt.Color DEFAULT_UNUSED
          Defaut UNUSED color.
static java.awt.Color DEFAULT_WARNING
          Default WARNING color.
 
Constructor Summary
DefaultConditionDescriptor()
          Simple constructor...
 
Method Summary
 void clear()
          Clears all colors
 boolean isOverRideOn()
          Tells if DefaultConditionDescriptor is in overRide mode
 void putConditionToColor(BitCondition condition, java.awt.Color color)
          Changes Conditions old Color to new Color , if new Color is allready used by other Condition then it throws IllegalArgumentException().
 void setDefaultColors()
          Sets the default colors for conditions
 void setOverRideOn(boolean value)
          If in override mode , then color can be used on more then one Condition , else olny for one (if Color is allready used by other condition , it will throw IllegalArgumentException).
 java.awt.Color toColor(BitCondition condition)
          returns color of condition
 BitCondition toCondition(java.awt.Color color)
          returns condition of color
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ERROR

public static final java.awt.Color DEFAULT_ERROR
Default ERROR color.


DEFAULT_UNUSED

public static final java.awt.Color DEFAULT_UNUSED
Defaut UNUSED color.


DEFAULT_WARNING

public static final java.awt.Color DEFAULT_WARNING
Default WARNING color.


DEFAULT_OK

public static final java.awt.Color DEFAULT_OK
Default OK color.

Constructor Detail

DefaultConditionDescriptor

public DefaultConditionDescriptor()
Simple constructor...

Method Detail

setDefaultColors

public void setDefaultColors()
Sets the default colors for conditions


toColor

public java.awt.Color toColor(BitCondition condition)
Description copied from interface: ConditionDescriptor
returns color of condition

Specified by:
toColor in interface ConditionDescriptor
Returns:

putConditionToColor

public void putConditionToColor(BitCondition condition,
                                java.awt.Color color)
Changes Conditions old Color to new Color , if new Color is allready used by other Condition then it throws IllegalArgumentException(). When changing colors , don't forget to update component...

Parameters:
condition - to change color
color - to what color

setOverRideOn

public void setOverRideOn(boolean value)
If in override mode , then color can be used on more then one Condition , else olny for one (if Color is allready used by other condition , it will throw IllegalArgumentException).

Parameters:
value -

isOverRideOn

public boolean isOverRideOn()
Tells if DefaultConditionDescriptor is in overRide mode

Returns:

toCondition

public BitCondition toCondition(java.awt.Color color)
Description copied from interface: ConditionDescriptor
returns condition of color

Specified by:
toCondition in interface ConditionDescriptor
Returns:

clear

public void clear()
Clears all colors



Copyright © 2010. All Rights Reserved.