com.yworks.yfiles.server.graphml.flexio
Class LabelInputHandler
java.lang.Object
y.io.graphml.input.AbstractInputHandler
com.yworks.yfiles.server.graphml.flexio.AbstractInputHandlerProvider
com.yworks.yfiles.server.graphml.flexio.LabelInputHandler
- All Implemented Interfaces:
- java.util.EventListener, InputHandler, InputHandlerProvider
- public class LabelInputHandler
- extends AbstractInputHandlerProvider
This class manages the deserialization of labels in the graphml input.
The input handler will parse the xml element that represents the list of labels for a graph item and store the
List
of deserialized Label
instances in
a data provider registered with the graph.
The deserialization of the label instances is delegated to the context. 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 y.io.graphml.input.AbstractInputHandler |
applyDefault, getDefaultValue, getPrecedence, getValidScopes, initializeFromKeyDefinition, isDefaultExists, isParseDefaultValue, parseData, setDefaultExists, setDefaultValue, setParseDefaultValue, setPrecedence, setValidScopes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LabelInputHandler
public LabelInputHandler(KeyScope scope,
java.lang.Object dpKey)
acceptKey
public boolean acceptKey(org.w3c.dom.Element keyDefinition)
- Description copied from class:
AbstractInputHandlerProvider
- This method is called by
AbstractInputHandlerProvider.onQueryInputHandler(y.io.graphml.input.QueryInputHandlersEvent)
and shall
decide if the given keyDefinition
shall be accepted so that this input handler gets provided for
the event.
- Specified by:
acceptKey
in class AbstractInputHandlerProvider
- Parameters:
keyDefinition
- The key definition to check.
- Returns:
- true, if the key name matches
Constants.ATTR_NAME_LABELLIST
and the key scope matches the one
passed to the constructor.
parseDataCore
protected java.lang.Object parseDataCore(GraphMLParseContext context,
org.w3c.dom.Node xmlNode)
throws GraphMLParseException
- Throws:
GraphMLParseException
setValue
protected void setValue(GraphMLParseContext context,
java.lang.Object key,
java.lang.Object data)
throws GraphMLParseException
- Throws:
GraphMLParseException
Copyright © 2000-2013 yWorks GmbH. All
rights reserved