Package uk.ac.starlink.util.gui
Class AWTXMLEncodeDecode
java.lang.Object
uk.ac.starlink.util.gui.AWTXMLEncodeDecode
A static utility class for encoding and decoding some AWT
primitives to and from XML.
- Version:
- $Id$
- Author:
- Peter W. Draper
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addChildElement
(Element rootElement, String name, AlphaComposite value) Add an element with an AlphaComposite value as a child of another element.static void
addChildElement
(Element rootElement, String name, Color value) Add an element with a Color value as a child of another element.static void
addChildElement
(Element rootElement, String name, Font value) Add an element with a Font value as a child of another element.static Color
colorFromString
(String value) Convert a String object back to a Color object.static String
colorToString
(Color value) Convert a Color object to a string.static AlphaComposite
compositeFromString
(String value) Convert a String object back to an AlphaComposite object.static String
compositeToString
(AlphaComposite value) Convert an AlphaComposite object to a string.static Font
fontFromString
(String value) Convert a String back to a Font.static String
fontToString
(Font font) Convert a Font to a string.
-
Method Details
-
addChildElement
Add an element with a Font value as a child of another element. -
fontToString
Convert a Font to a string. -
fontFromString
Convert a String back to a Font. -
addChildElement
Add an element with a Color value as a child of another element. -
colorToString
Convert a Color object to a string. -
colorFromString
Convert a String object back to a Color object. -
addChildElement
Add an element with an AlphaComposite value as a child of another element. -
compositeToString
Convert an AlphaComposite object to a string. -
compositeFromString
Convert a String object back to an AlphaComposite object.
-