|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.databeans.io.XmlAwtCodec
public class XmlAwtCodec
General XML codec for AWT data structures. Currently handles RGB colours (java.awt.Color in default colour space), java.awt.Point, java.awt.geom.Point2D family (Point2D.Float and Point2D.Double), java.awt.Rectangle, and the java.awt.geom.Rectangle2D family (Rectangle2D.Float and Rectangle2D.Double).
Constructor Summary | |
---|---|
XmlAwtCodec()
|
Method Summary | |
---|---|
boolean |
canEncode(XmlEncodeContext context,
Object value)
Test if this codec can encode a given object. |
Object |
decode(XmlDecodeContext context,
org.jdom.Element element)
Decode an XML representation into a value. |
org.jdom.Element |
encode(XmlEncodeContext context,
Object value)
Generate an XML representation of an object. |
static void |
register()
|
boolean |
shouldPreserveIdentity(XmlEncodeContext context,
Object value)
Return true if the identity of the given value should be preserved. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlAwtCodec()
Method Detail |
---|
public static void register()
public boolean shouldPreserveIdentity(XmlEncodeContext context, Object value)
XmlEncoder
shouldPreserveIdentity
in interface XmlEncoder
public boolean canEncode(XmlEncodeContext context, Object value)
XmlEncoder
canEncode
in interface XmlEncoder
context
- The current encode context.value
- The value. May be null.
public org.jdom.Element encode(XmlEncodeContext context, Object value)
XmlEncoder
encode
in interface XmlEncoder
context
- The encoding context.value
- The value to be encoded.
public Object decode(XmlDecodeContext context, org.jdom.Element element) throws IllegalArgumentException
XmlDecoder
decode
in interface XmlDecoder
context
- The decode context.element
- The element to decode.
IllegalArgumentException
- if an error is found in the structure
of the document.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |