com.yworks.yfiles.server.graphml.flexio
Class LabelDeserializer

java.lang.Object
  extended byy.io.graphml.input.AbstractDeserializer
      extended bycom.yworks.yfiles.server.graphml.flexio.deserializer.AbstractDeserializer
          extended bycom.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.


Constructor Summary
LabelDeserializer()
           
 
Method Summary
protected  Label createLabel(java.lang.String labelText, ILabelModelParameter parameter, YDimension preferredSize, ILabelStyle style, int zOrder)
          Create a label instance
 java.lang.Object deserializeNode(org.w3c.dom.Node xmlNode, GraphMLParseContext context)
           
 java.lang.String getElementName(GraphMLParseContext context)
          The local name that the node must satisfy if it should be deserialized.
 
Methods inherited from class com.yworks.yfiles.server.graphml.flexio.deserializer.AbstractDeserializer
canHandle, getXmlNamespaceURI, onHandleDeserialization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelDeserializer

public LabelDeserializer()
Method Detail

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 text
parameter - The model parameter that determine the label's placement
preferredSize - The preferred size of the label
style - The style that determines the visual representation of the label
zOrder - The z-order of the label.
Returns:
A new Label instance with the provided properties.


Copyright © 2000-2013 yWorks GmbH. All rights reserved