fr.esrf.tangoatk.widget.util
Class ATKConstant

java.lang.Object
  extended by fr.esrf.tangoatk.widget.util.ATKConstant

public class ATKConstant
extends java.lang.Object

Contains various constants used in ATK.


Field Summary
static java.awt.Font labelFont
          Default font used by some ATK viewers
 
Constructor Summary
ATKConstant()
           
 
Method Summary
static java.awt.Color getColor4Quality(java.lang.String quality)
          Return the default background color according to the given attribute state.
static java.awt.Color getColor4State(java.lang.String state)
          Return the default background color according to the given device state.
static java.awt.Color getColor4State(java.lang.String state, boolean invertOpenClose, boolean invertInsertExtract)
          Return the default background color according to the given device state.
static javax.swing.ImageIcon getIcon4Quality(java.lang.String quality)
          Return the default ImageIcon according to the given attribute state.
static javax.swing.ImageIcon getIcon4State(java.lang.String state)
          Return the default ImageIcon according to the given device state.
static void setColor4Quality(java.lang.String quality, java.awt.Color c)
          Sets the default background color for the attribute quality factor.
static void setColor4State(java.lang.String state, java.awt.Color c)
          Sets the default background color for the given device state.
static void setIcon4Quality(java.lang.String quality, javax.swing.ImageIcon c)
          Sets the default ImageIcon for the attribute quality factor.
static void setIcon4State(java.lang.String state, javax.swing.ImageIcon c)
          Sets the default ImageIcon for the given device state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

labelFont

public static final java.awt.Font labelFont
Default font used by some ATK viewers

Constructor Detail

ATKConstant

public ATKConstant()
Method Detail

getColor4State

public static java.awt.Color getColor4State(java.lang.String state)
Return the default background color according to the given device state.

Parameters:
state - Attribute state.
Returns:
Background color.

getColor4State

public static java.awt.Color getColor4State(java.lang.String state,
                                            boolean invertOpenClose,
                                            boolean invertInsertExtract)
Return the default background color according to the given device state.

Parameters:
state - Attribute state.
invertOpenClose - The boolean which indicates if the colors should be inverted for open and close.
invertInsertExtract - The boolean which indicates if the colors should be inverted for insert and extract.
Returns:
Background color.

setColor4State

public static void setColor4State(java.lang.String state,
                                  java.awt.Color c)
Sets the default background color for the given device state. Affects all viewer running in this JVM. If the state does not already exists, a new entry in the correspondance table is created.

Parameters:
state - value
c - New color

getColor4Quality

public static java.awt.Color getColor4Quality(java.lang.String quality)
Return the default background color according to the given attribute state.

Parameters:
quality - Attribute quality factor (can be "INVALID","WARNING","ALARM","VALID","CHANGING")
Returns:
Background color.

setColor4Quality

public static void setColor4Quality(java.lang.String quality,
                                    java.awt.Color c)
Sets the default background color for the attribute quality factor. Affects all viewer running in this JVM.

Parameters:
quality - value (can be "INVALID","WARNING","ALARM","VALID","CHANGING")
c - New color

getIcon4State

public static javax.swing.ImageIcon getIcon4State(java.lang.String state)
Return the default ImageIcon according to the given device state.

Parameters:
state - Attribute state.
Returns:
ImageIcon.

setIcon4State

public static void setIcon4State(java.lang.String state,
                                 javax.swing.ImageIcon c)
Sets the default ImageIcon for the given device state. Affects all viewer running in this JVM. If the state does not already exists, a new entry in the correspondance table is created.

Parameters:
state - value
c - New ImageIcon

getIcon4Quality

public static javax.swing.ImageIcon getIcon4Quality(java.lang.String quality)
Return the default ImageIcon according to the given attribute state.

Parameters:
quality - Attribute quality factor (can be "INVALID","WARNING","ALARM","VALID","CHANGING")
Returns:
ImageIcon.

setIcon4Quality

public static void setIcon4Quality(java.lang.String quality,
                                   javax.swing.ImageIcon c)
Sets the default ImageIcon for the attribute quality factor. Affects all viewer running in this JVM.

Parameters:
quality - value (can be "INVALID","WARNING","ALARM","VALID","CHANGING")
c - New ImageIcon