Class ATKConstant

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

public class ATKConstant extends Object
Contains various constants used in ATK.
  • Field Details

    • labelFont

      public static final Font labelFont
      Default font used by some ATK viewers
  • Constructor Details

    • ATKConstant

      public ATKConstant()
  • Method Details

    • getColor4State

      public static Color getColor4State(String state)
      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

      public static void setColor4State(String state, 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 Color getColor4Quality(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(String quality, 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 ImageIcon getIcon4State(String state)
      Return the default ImageIcon according to the given device state.
      Parameters:
      state - Attribute state.
      Returns:
      ImageIcon.
    • setIcon4State

      public static void setIcon4State(String state, 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 ImageIcon getIcon4Quality(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(String quality, 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
    • getSmallBallIcon4State

      public static ImageIcon getSmallBallIcon4State(String state)
      Return the "10 pixels" 3D ball ImageIcon according to the given device state.
      Parameters:
      state - Attribute state.
      Returns:
      ImageIcon.
    • getMediumBallIcon4State

      public static ImageIcon getMediumBallIcon4State(String state)
      Return the "14 pixels" 3D ball ImageIcon according to the given device state.
      Parameters:
      state - Attribute state.
      Returns:
      ImageIcon.
    • getLargeBallIcon4State

      public static ImageIcon getLargeBallIcon4State(String state)
      Return the "20 pixels" 3D ball ImageIcon according to the given device state.
      Parameters:
      state - Attribute state.
      Returns:
      ImageIcon.
    • getXLBallIcon4State

      public static ImageIcon getXLBallIcon4State(String state)
      Return the "28 pixels" 3D ball ImageIcon according to the given device state.
      Parameters:
      state - Attribute state.
      Returns:
      ImageIcon.