|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.graphml.output.AbstractOutputHandler com.yworks.yfiles.server.graphml.support.DocumentFragmentOutputHandler com.yworks.yfiles.server.graphml.support.LabelCompatOutputHandler
An output handler that tries to commit the label model parameters for all labels in the graph that is being written to the xml fragments that were parsed when the graph was read.
Constructor Summary | |
LabelCompatOutputHandler(java.lang.Object dataProviderKey,
KeyScope scope)
Creates a new instance that uses the DocumentFragments stored in the data provider with the given key |
Method Summary | |
protected void |
commitLabelLayout(org.w3c.dom.Node labelElement,
EdgeLabelLayout labelLayout,
Graph graph,
Edge edge)
Commit the model parameters of the given label element to the corresponding XML fragment. |
protected void |
commitLabelLayout(org.w3c.dom.Node labelElement,
NodeLabelLayout labelLayout,
Graph graph,
Node node)
Commit the model parameters of the given label element to the corresponding XML fragment. |
protected void |
dumpNodes(GraphMLWriteContext context,
org.w3c.dom.Node rootNode)
Write all child nodes of the given root node to the xml writer. |
boolean |
getCommitLabelLayouts()
Whether this output handler will call FlexIOTools.copyLabelLayouts(y.layout.LayoutGraph)
before the labels are written. |
protected java.lang.Object |
getDataProviderKey()
|
WritePrecedence |
getPrecedence()
This output handler shall be called before its children. |
protected java.lang.Object |
getValue(GraphMLWriteContext context,
java.lang.Object key)
|
void |
setCommitLabelLayouts(boolean commitLabelLayouts)
Whether this output handler will call FlexIOTools.copyLabelLayouts(y.layout.LayoutGraph)
before the labels are written. |
protected void |
writeValueCore(GraphMLWriteContext context,
java.lang.Object data)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LabelCompatOutputHandler(java.lang.Object dataProviderKey, KeyScope scope)
dataProviderKey
- The key of the data provider that contains the DocumentFragments
that represent the labels of edges or nodes.Method Detail |
public boolean getCommitLabelLayouts()
FlexIOTools.copyLabelLayouts(y.layout.LayoutGraph)
before the labels are written.
public void setCommitLabelLayouts(boolean commitLabelLayouts)
FlexIOTools.copyLabelLayouts(y.layout.LayoutGraph)
before the labels are written.
protected void writeValueCore(GraphMLWriteContext context, java.lang.Object data) throws GraphMLWriteException
GraphMLWriteException
protected void commitLabelLayout(org.w3c.dom.Node labelElement, NodeLabelLayout labelLayout, Graph graph, Node node)
DiscreteNodeLabelModel
.
labelElement
- The current XML elementlabelLayout
- The label layout that should be committed back to the client.graph
- The graph the node belongs to.node
- The node that the label belongs to.protected void commitLabelLayout(org.w3c.dom.Node labelElement, EdgeLabelLayout labelLayout, Graph graph, Edge edge)
SliderEdgeLabelModel
, RotatedSliderEdgeLabelModel
or FreeEdgeLabelModel
.
labelElement
- The current XML elementlabelLayout
- The label layout that should be committed back to the client.graph
- The graph the edge belongs to.edge
- The edge that the label belongs to.public WritePrecedence getPrecedence()
WritePrecedence.BEFORE_CHILDREN
WritePrecedence
protected java.lang.Object getDataProviderKey()
protected void dumpNodes(GraphMLWriteContext context, org.w3c.dom.Node rootNode)
context
- The context.rootNode
- The parent node to be dumpedprotected java.lang.Object getValue(GraphMLWriteContext context, java.lang.Object key) throws GraphMLWriteException
GraphMLWriteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |