|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.graphml.input.AbstractInputHandler com.yworks.yfiles.server.graphml.flexio.AbstractInputHandlerProvider com.yworks.yfiles.server.graphml.support.LabelCompatInputHandler
Input Handler that tries to create the corresponding yFiles Java label models for all labels in a <Labels> element.
This will work for the slider- and free edge label models and for the discrete (interior and exterior) node label models.
LabelCompatOutputHandler
Constructor Summary | |
LabelCompatInputHandler()
|
Method Summary | |
boolean |
acceptKey(org.w3c.dom.Element keyDefinition)
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. |
protected EdgeLabelModel |
createDefaultEdgeLabelModel(GraphMLParseContext context,
Edge edge,
org.w3c.dom.Node node)
Create the default edge label model that will be used if a parsed edge label model cannot be mapped to a yFiles Java edge label model. |
protected NodeLabelModel |
createDefaultNodeLabelModel(GraphMLParseContext context,
Node graphNode,
org.w3c.dom.Node node)
Create the default node label model that will be used if a parsed node label model cannot be mapped to a yFiles Java node label model. |
protected EdgeLabelLayoutImpl |
createEdgeLabelLayout(GraphMLParseContext context,
DefaultLayoutGraph graph,
Edge graphEdge,
org.w3c.dom.Node node)
Create the EdgeLabelLayoutImpl instance that defines the label layout for the given graph edge. |
protected NodeLabelLayoutImpl |
createNodeLabelLayout(GraphMLParseContext context,
DefaultLayoutGraph graph,
Node graphNode,
org.w3c.dom.Node node)
Create the NodeLabelLayoutImpl instance that defines the label layout for the given graph node. |
protected java.lang.Object |
parseDataCore(GraphMLParseContext context,
org.w3c.dom.Node node)
|
protected void |
setValue(GraphMLParseContext context,
java.lang.Object key,
java.lang.Object data)
|
Methods inherited from class com.yworks.yfiles.server.graphml.flexio.AbstractInputHandlerProvider |
onQueryInputHandler |
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 |
Constructor Detail |
public LabelCompatInputHandler()
Method Detail |
protected void setValue(GraphMLParseContext context, java.lang.Object key, java.lang.Object data) throws GraphMLParseException
GraphMLParseException
protected java.lang.Object parseDataCore(GraphMLParseContext context, org.w3c.dom.Node node) throws GraphMLParseException
GraphMLParseException
protected EdgeLabelModel createDefaultEdgeLabelModel(GraphMLParseContext context, Edge edge, org.w3c.dom.Node node)
context
- The current parse context.edge
- The current edge.node
- The current XML node.
EdgeLabelModel
instance.protected NodeLabelModel createDefaultNodeLabelModel(GraphMLParseContext context, Node graphNode, org.w3c.dom.Node node)
context
- The current parse context.graphNode
- The current node.node
- The current XML node.
NodeLabelModel
instance.protected EdgeLabelLayoutImpl createEdgeLabelLayout(GraphMLParseContext context, DefaultLayoutGraph graph, Edge graphEdge, org.w3c.dom.Node node)
EdgeLabelLayoutImpl
instance that defines the label layout for the given graph edge.
context
- The current parse context.graph
- The graph the graphEdge belongs to.graphEdge
- The graphEdge that is currently being parsed.node
- The current XML node.
EdgeLabelLayoutImpl
instance.protected NodeLabelLayoutImpl createNodeLabelLayout(GraphMLParseContext context, DefaultLayoutGraph graph, Node graphNode, org.w3c.dom.Node node)
NodeLabelLayoutImpl
instance that defines the label layout for the given graph node.
context
- The current parse context.graph
- The graph the graphNode belongs to.graphNode
- The graphNode that is currently being parsed.node
- The current XML node.
NodeLabelLayoutImpl
instance.public boolean acceptKey(org.w3c.dom.Element keyDefinition)
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.
acceptKey
in class AbstractInputHandlerProvider
keyDefinition
- The key definition to check.
true
if the key definition matches name 'labels' and has either scope KeyScope.NODE
or scope KeyScope.EDGE
.KeyScope
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |