Package org.csstudio.opibuilder.util
Class MediaService
java.lang.Object
org.csstudio.opibuilder.util.MediaService
A service help to maintain the color macros.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionOPIColor[]OPIFont[]Get the color from the predefined color map, which is defined in the color file.static MediaServicegetOPIColor(String name) getOPIColor(String name, RGB rgb) Get OPIColor based on name.getOPIFont(String name) Get a copy of the OPIFont from the configured defaults based on name.getOPIFont(String name, FontData fontData) Get a copy the OPIFont from the configured defaults based on name.booleanisColorNameDefined(String name) voidReload predefined colors from color file in a background job.void
-
Field Details
-
DEFAULT_FONT
- See Also:
-
DEFAULT_BOLD_FONT
- See Also:
-
HEADER1
- See Also:
-
HEADER2
- See Also:
-
HEADER3
- See Also:
-
FINE_PRINT
- See Also:
-
DEFAULT_UNKNOWN_FONT
-
-
Method Details
-
getInstance
-
reloadColors
public void reloadColors()Reload predefined colors from color file in a background job. -
reloadFonts
public void reloadFonts() -
getColor
Get the color from the predefined color map, which is defined in the color file.- Parameters:
name- the predefined name of the color.- Returns:
- the RGB color, or the default RGB value if the name doesn't exist in the color file.
-
getOPIColor
-
getOPIColor
Get OPIColor based on name. If no such name exist, use the rgb value as its color. -
getAllPredefinedColors
-
isColorNameDefined
-
getOPIFont
Get a copy the OPIFont from the configured defaults based on name. Use the provided fontData if the name is not in the cache.- Parameters:
name- of predefined fontfontData- to use if name is not in cache
-
getOPIFont
Get a copy of the OPIFont from the configured defaults based on name. UseDEFAULT_UNKNOWN_FONTif the name is not in the cache.- Parameters:
name- of predefined font
-
getAllPredefinedFonts
-