|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdks.src.utils.XML.XMLWriter
public class XMLWriter
| Field Summary | |
|---|---|
static java.lang.String |
XML_COLOR_ALPHA_PROPERTY
The name of the alpha component of the color XML Property |
static java.lang.String |
XML_COLOR_BLUE_PROPERTY
The name of the blue component of the color XML Property |
static java.lang.String |
XML_COLOR_GREEN_PROPERTY
The name of the green component of the color XML Property |
static java.lang.String |
XML_COLOR_RED_PROPERTY
The name of the red component of the color XML Property |
static java.lang.String |
XML_DIMENSION_HEIGHT_PROPERTY
The name of the height of the dimension XML Property |
static java.lang.String |
XML_DIMENSION_WIDTH_PROPERTY
The name of the width of the dimension XML Property |
static java.lang.String |
XML_FONT_BOLD_PROPERTY
The name of the bold style of the font XML Property |
static java.lang.String |
XML_FONT_FONTNAME_PROPERTY
The name of the fontname of the font XML Property |
static java.lang.String |
XML_FONT_ITALIC_PROPERTY
The name of the italic style of the font XML Property |
static java.lang.String |
XML_FONT_SIZE_PROPERTY
The name of the size of the font XML Property |
| Constructor Summary | |
|---|---|
XMLWriter()
|
|
| Method Summary | |
|---|---|
static org.jdom.Element |
createColorElement(java.lang.String title,
java.awt.Color color)
|
static org.jdom.Element |
createDimensionElement(java.lang.String title,
java.awt.Dimension dimension)
Create an XML Element for a dimension |
static org.jdom.Element |
createElement(java.lang.String title,
java.lang.String value)
|
static org.jdom.Element |
createFontElement(java.lang.String title,
java.awt.Font font)
|
static java.awt.Color |
getColorElement(java.lang.String title,
org.jdom.Element root)
|
static java.awt.Dimension |
getDimensionElement(java.lang.String title,
org.jdom.Element root)
Read the properties of a dimension element and return an instance of the Dimension |
static java.awt.Font |
getFontElement(java.lang.String title,
org.jdom.Element root)
|
static org.jdom.Element |
openDocument(java.io.File file)
Load a file into a XML DOM Element |
static void |
saveDocument(java.io.File file,
org.jdom.Element root)
Save a XML DOM Element into a file |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String XML_COLOR_RED_PROPERTY
public static final java.lang.String XML_COLOR_GREEN_PROPERTY
public static final java.lang.String XML_COLOR_BLUE_PROPERTY
public static final java.lang.String XML_COLOR_ALPHA_PROPERTY
public static final java.lang.String XML_FONT_FONTNAME_PROPERTY
public static final java.lang.String XML_FONT_SIZE_PROPERTY
public static final java.lang.String XML_FONT_BOLD_PROPERTY
public static final java.lang.String XML_FONT_ITALIC_PROPERTY
public static final java.lang.String XML_DIMENSION_WIDTH_PROPERTY
public static final java.lang.String XML_DIMENSION_HEIGHT_PROPERTY
| Constructor Detail |
|---|
public XMLWriter()
| Method Detail |
|---|
public static org.jdom.Element createElement(java.lang.String title,
java.lang.String value)
title - the name of the elementvalue - the value of the element
public static org.jdom.Element createColorElement(java.lang.String title,
java.awt.Color color)
title - the name of the elementcolor - the color of the element
public static java.awt.Color getColorElement(java.lang.String title,
org.jdom.Element root)
title - the name of the elementroot - the element which contains the colors properties
public static org.jdom.Element createFontElement(java.lang.String title,
java.awt.Font font)
title - the name of the elementfont - the font of the element
public static java.awt.Font getFontElement(java.lang.String title,
org.jdom.Element root)
title - the name of the elementroot - the element which contains the font properties
public static org.jdom.Element createDimensionElement(java.lang.String title,
java.awt.Dimension dimension)
title - the name of the elementdimension - the dimension of the element
public static java.awt.Dimension getDimensionElement(java.lang.String title,
org.jdom.Element root)
title - the name of the elementroot - the element which contains the dimension properties
public static void saveDocument(java.io.File file,
org.jdom.Element root)
throws java.io.IOException
file - the file used to save the XML DOM Documentroot - the XML DOM Element to save
java.io.IOException
public static org.jdom.Element openDocument(java.io.File file)
throws java.io.IOException,
org.jdom.JDOMException
file - the file used to load the XML DOM Element
java.io.IOException
org.jdom.JDOMException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||