com.yworks.yfiles.server.graphml.flexio
Class LabelDeserializer
java.lang.Object
y.io.graphml.input.AbstractDeserializer
com.yworks.yfiles.server.graphml.flexio.deserializer.AbstractDeserializer
com.yworks.yfiles.server.graphml.flexio.LabelDeserializer
- All Implemented Interfaces:
- DeserializationHandler, java.util.EventListener
- public class LabelDeserializer
- extends AbstractDeserializer
This class manages the deserialization of a label in the graphml input.
To deserialize a custom style or custom model parameter, corresponding deserializer instances
can be registered. These deserializers will be used automatically by this handler.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LabelDeserializer
public LabelDeserializer()
getElementName
public java.lang.String getElementName(GraphMLParseContext context)
- The local name that the node must satisfy if it should be deserialized.
This method is called by
AbstractDeserializer.canHandle(y.io.graphml.input.DeserializationEvent)
.
- Specified by:
getElementName
in class AbstractDeserializer
- Parameters:
context
- The parse context.
- Returns:
- 'Label'.
deserializeNode
public java.lang.Object deserializeNode(org.w3c.dom.Node xmlNode,
GraphMLParseContext context)
throws GraphMLParseException
- Throws:
GraphMLParseException
createLabel
protected Label createLabel(java.lang.String labelText,
ILabelModelParameter parameter,
YDimension preferredSize,
ILabelStyle style,
int zOrder)
- Create a label instance
- Parameters:
labelText
- The label textparameter
- The model parameter that determine the label's placementpreferredSize
- The preferred size of the labelstyle
- The style that determines the visual representation of the labelzOrder
- The z-order of the label.
- Returns:
- A new Label instance with the provided properties.
Copyright © 2000-2013 yWorks GmbH. All
rights reserved