Class ColorFontUtil


  • public class ColorFontUtil
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.csstudio.display.builder.model.properties.WidgetColor BLACK
      the color of black
      static org.csstudio.display.builder.model.properties.WidgetColor BLUE
      the color of blue
      static org.csstudio.display.builder.model.properties.WidgetColor CYAN
      the color of cyan
      static org.csstudio.display.builder.model.properties.WidgetColor DARK_GRAY
      the color of dark gray
      static org.csstudio.display.builder.model.properties.WidgetColor GRAY
      the color of gray
      static org.csstudio.display.builder.model.properties.WidgetColor GREEN
      the color of green
      static org.csstudio.display.builder.model.properties.WidgetColor LIGHT_BLUE
      the color of light blue
      static org.csstudio.display.builder.model.properties.WidgetColor ORANGE
      the color of orange
      static org.csstudio.display.builder.model.properties.WidgetColor PINK
      the color of pink
      static org.csstudio.display.builder.model.properties.WidgetColor PURPLE
      the color of orange
      static org.csstudio.display.builder.model.properties.WidgetColor RED
      the color of red
      static org.csstudio.display.builder.model.properties.WidgetColor WHITE
      the color of white
      static org.csstudio.display.builder.model.properties.WidgetColor YELLOW
      the color of yellow
    • Constructor Summary

      Constructors 
      Constructor Description
      ColorFontUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.csstudio.display.builder.model.properties.WidgetColor getColorFromRGB​(int red, int green, int blue)
      Get a color with the given red, green and blue values.
      static org.csstudio.display.builder.model.properties.WidgetFont getFont​(java.lang.String name, int height, int style)
      Get a new font data given a font name, the height of the desired font in points, and a font style.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BLACK

        public static final org.csstudio.display.builder.model.properties.WidgetColor BLACK
        the color of black
      • BLUE

        public static final org.csstudio.display.builder.model.properties.WidgetColor BLUE
        the color of blue
      • CYAN

        public static final org.csstudio.display.builder.model.properties.WidgetColor CYAN
        the color of cyan
      • DARK_GRAY

        public static final org.csstudio.display.builder.model.properties.WidgetColor DARK_GRAY
        the color of dark gray
      • GRAY

        public static final org.csstudio.display.builder.model.properties.WidgetColor GRAY
        the color of gray
      • GREEN

        public static final org.csstudio.display.builder.model.properties.WidgetColor GREEN
        the color of green
      • LIGHT_BLUE

        public static final org.csstudio.display.builder.model.properties.WidgetColor LIGHT_BLUE
        the color of light blue
      • ORANGE

        public static final org.csstudio.display.builder.model.properties.WidgetColor ORANGE
        the color of orange
      • PINK

        public static final org.csstudio.display.builder.model.properties.WidgetColor PINK
        the color of pink
      • PURPLE

        public static final org.csstudio.display.builder.model.properties.WidgetColor PURPLE
        the color of orange
      • RED

        public static final org.csstudio.display.builder.model.properties.WidgetColor RED
        the color of red
      • WHITE

        public static final org.csstudio.display.builder.model.properties.WidgetColor WHITE
        the color of white
      • YELLOW

        public static final org.csstudio.display.builder.model.properties.WidgetColor YELLOW
        the color of yellow
    • Constructor Detail

      • ColorFontUtil

        public ColorFontUtil()
    • Method Detail

      • getColorFromRGB

        public static final org.csstudio.display.builder.model.properties.WidgetColor getColorFromRGB​(int red,
                                                                                                      int green,
                                                                                                      int blue)
        Get a color with the given red, green and blue values.
        Parameters:
        red - the red component of the new instance
        green - the green component of the new instance
        blue - the blue component of the new instance
        Throws:
        java.lang.IllegalArgumentException -
        • ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255
      • getFont

        public static final org.csstudio.display.builder.model.properties.WidgetFont getFont​(java.lang.String name,
                                                                                             int height,
                                                                                             int style)
        Get a new font data given a font name, the height of the desired font in points, and a font style.
        Parameters:
        name - the name of the font (must not be null)
        height - the font height in points
        style - A bitwise combination of NORMAL(0), BOLD(1) and ITALIC(2).
        Throws:
        java.lang.IllegalArgumentException -
        • ERROR_NULL_ARGUMENT - when the font name is null
        • ERROR_INVALID_ARGUMENT - if the height is negative