Class ColorFontUtil
- java.lang.Object
-
- org.csstudio.display.builder.runtime.script.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 blackstatic org.csstudio.display.builder.model.properties.WidgetColor
BLUE
the color of bluestatic org.csstudio.display.builder.model.properties.WidgetColor
CYAN
the color of cyanstatic org.csstudio.display.builder.model.properties.WidgetColor
DARK_GRAY
the color of dark graystatic org.csstudio.display.builder.model.properties.WidgetColor
GRAY
the color of graystatic org.csstudio.display.builder.model.properties.WidgetColor
GREEN
the color of greenstatic org.csstudio.display.builder.model.properties.WidgetColor
LIGHT_BLUE
the color of light bluestatic org.csstudio.display.builder.model.properties.WidgetColor
ORANGE
the color of orangestatic org.csstudio.display.builder.model.properties.WidgetColor
PINK
the color of pinkstatic org.csstudio.display.builder.model.properties.WidgetColor
PURPLE
the color of orangestatic org.csstudio.display.builder.model.properties.WidgetColor
RED
the color of redstatic org.csstudio.display.builder.model.properties.WidgetColor
WHITE
the color of whitestatic 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.
-
-
-
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
-
-
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 instancegreen
- the green component of the new instanceblue
- 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 pointsstyle
- 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
-
-