Package fr.esrf.tangoatk.widget.util
Class ATKConstant
java.lang.Object
fr.esrf.tangoatk.widget.util.ATKConstant
Contains various constants used in ATK.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorgetColor4Quality(String quality) Return the default background color according to the given attribute state.static ColorgetColor4State(String state) Return the default background color according to the given device state.static ColorgetColor4State(String state, boolean invertOpenClose, boolean invertInsertExtract) Return the default background color according to the given device state.static ImageIcongetIcon4Quality(String quality) Return the default ImageIcon according to the given attribute state.static ImageIcongetIcon4State(String state) Return the default ImageIcon according to the given device state.static ImageIcongetLargeBallIcon4State(String state) Return the "20 pixels" 3D ball ImageIcon according to the given device state.static ImageIcongetMediumBallIcon4State(String state) Return the "14 pixels" 3D ball ImageIcon according to the given device state.static ImageIcongetSmallBallIcon4State(String state) Return the "10 pixels" 3D ball ImageIcon according to the given device state.static ImageIcongetXLBallIcon4State(String state) Return the "28 pixels" 3D ball ImageIcon according to the given device state.static voidsetColor4Quality(String quality, Color c) Sets the default background color for the attribute quality factor.static voidsetColor4State(String state, Color c) Sets the default background color for the given device state.static voidsetIcon4Quality(String quality, ImageIcon c) Sets the default ImageIcon for the attribute quality factor.static voidsetIcon4State(String state, ImageIcon c) Sets the default ImageIcon for the given device state.
-
Field Details
-
labelFont
Default font used by some ATK viewers
-
-
Constructor Details
-
ATKConstant
public ATKConstant()
-
-
Method Details
-
getColor4State
Return the default background color according to the given device state.- Parameters:
state- Attribute state.- Returns:
- Background color.
-
getColor4State
public static Color getColor4State(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
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- valuec- New color
-
getColor4Quality
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
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
Return the default ImageIcon according to the given device state.- Parameters:
state- Attribute state.- Returns:
- ImageIcon.
-
setIcon4State
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- valuec- New ImageIcon
-
getIcon4Quality
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
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
-
getSmallBallIcon4State
Return the "10 pixels" 3D ball ImageIcon according to the given device state.- Parameters:
state- Attribute state.- Returns:
- ImageIcon.
-
getMediumBallIcon4State
Return the "14 pixels" 3D ball ImageIcon according to the given device state.- Parameters:
state- Attribute state.- Returns:
- ImageIcon.
-
getLargeBallIcon4State
Return the "20 pixels" 3D ball ImageIcon according to the given device state.- Parameters:
state- Attribute state.- Returns:
- ImageIcon.
-
getXLBallIcon4State
Return the "28 pixels" 3D ball ImageIcon according to the given device state.- Parameters:
state- Attribute state.- Returns:
- ImageIcon.
-