|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.NodeScaledPortLocationModel.Handler
public static class NodeScaledPortLocationModel.Handler
Provides GraphML (de-)serialization support for
NodeScaledPortLocationModel
and its parameters.
Constructor Summary | |
---|---|
NodeScaledPortLocationModel.Handler()
Initializes a new Handler instance. |
Method Summary | |
---|---|
protected NodeScaledPortLocationModel |
createModel(NamedNodeMap attributes,
GraphMLParseContext context)
Creates a new instance of NodeScaledPortLocationModel . |
static boolean |
isGeometryElement(Node node)
Determines whether or not the given XML node is a <Geometry> element. |
protected boolean |
isModelElement(Node node)
Determines whether or not the given XML node is a Element that stores
NodeScaledPortLocationModel data. |
void |
onHandleDeserialization(DeserializationEvent event)
Deserializes NodeScaledPortLocationModel models and model
parameters. |
void |
onHandleSerialization(SerializationEvent event)
Serializes NodeScaledPortLocationModel models and model
parameters. |
PortLocationModelParameter |
readAttributes(NamedNodeMap attributes,
GraphMLParseContext context)
Reads the given XML attributes to create a port location model parameter for NodeScaledPortLocationModel . |
void |
writeAttributes(PortLocationModelParameter parameter,
XmlWriter writer,
GraphMLWriteContext context)
Writes the specified port location model parameter as attributes for the given XmlWriter 's current element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeScaledPortLocationModel.Handler()
Handler
instance.
Method Detail |
---|
public void onHandleSerialization(SerializationEvent event) throws GraphMLWriteException
NodeScaledPortLocationModel
models and model
parameters.
Creates <NodeScaledPortLocationModel>
elements.
Calls
writeAttributes
.
onHandleSerialization
in interface SerializationHandler
GraphMLWriteException
event
- Event that contains all data that is needed for serialization.public void writeAttributes(PortLocationModelParameter parameter, XmlWriter writer, GraphMLWriteContext context) throws GraphMLWriteException
XmlWriter
's current element.
Called from
onHandleSerialization
.
GraphMLWriteException
parameter
- the port location model parameter to serialize. Must
be an instance created by NodeScaledPortLocationModel
.writer
- the XmlWriter
used for serialization.context
- the current write context.readAttributes(org.w3c.dom.NamedNodeMap, y.io.graphml.input.GraphMLParseContext)
public void onHandleDeserialization(DeserializationEvent event) throws GraphMLParseException
NodeScaledPortLocationModel
models and model
parameters.
Parses <Geometry>
elements with
<NodeScaledPortLocationModel>
children.
Calls
isModelElement
and
readAttributes
.
onHandleDeserialization
in interface DeserializationHandler
GraphMLParseException
event
- Event that contains all data that is needed for deserialization.public PortLocationModelParameter readAttributes(NamedNodeMap attributes, GraphMLParseContext context) throws GraphMLParseException
NodeScaledPortLocationModel
.
Calls
createModel
to create a model instance for the returned model parameter.
Called from
onHandleDeserialization
.
GraphMLParseException
attributes
- the XML attributes to read.context
- the current parse context.
NodeScaledPortLocationModel
model parameter
instance.writeAttributes(PortLocationModelParameter, y.io.graphml.output.XmlWriter, y.io.graphml.output.GraphMLWriteContext)
protected NodeScaledPortLocationModel createModel(NamedNodeMap attributes, GraphMLParseContext context) throws GraphMLParseException
NodeScaledPortLocationModel
.
Called from
readAttributes
.
GraphMLParseException
attributes
- the XML attributes for which the model is created.context
- the current parse context.
NodeScaledPortLocationModel
.protected boolean isModelElement(Node node)
Element
that stores
NodeScaledPortLocationModel
data.
Called from
onHandleDeserialization
.
node
- the XML node to check.
true
if the given XML node is a
Element
that stores
NodeScaledPortLocationModel
data; false
otherwise.public static boolean isGeometryElement(Node node)
<Geometry>
element.
node
- the XML node to check.
true
if the given XML node is a
<Geometry>
element; false
otherwise.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |