|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.multipage.LayoutContext
public class LayoutContext
This class represents the layout context. It provides several methods to access data as well as adding and removing elements.
Method Summary | |
---|---|
void |
addEdgeLabel(EdgeLabelLayout label,
Edge labeledElement)
Adds a label to a given edge. |
void |
addNodeLabel(NodeLabelLayout label,
Node labeledElement)
Adds a label to a given node. |
Edge |
createEdge(Node source,
Node target,
java.lang.Object sameDataElementId)
All methods of the ElementFactory have to use this method to create an edge. |
Node |
createNode(java.lang.Object sameDataElementId)
All methods of the ElementFactory have to use this method to create a node. |
EdgeInfo |
getEdgeInfo(Edge edge)
Returns the edge information object of the given edge. |
EdgeLabelInfo |
getEdgeLabelInfo(EdgeLabelLayout edgeLabelLayout)
Returns the edge label information object of the given edge label layout. |
LayoutGraph |
getGraph()
Returns the relevant graph. |
MultiPageLayouter |
getLayouter()
Returns the layouter object that belongs to this layout context. |
NodeInfo |
getNodeInfo(Node node)
Returns the node information object of the given node. |
NodeLabelInfo |
getNodeLabelInfo(NodeLabelLayout nodeLabelLayout)
Returns the node label layout information object of the given node label layout. |
Edge |
getOriginalEdge(java.lang.Object id)
Returns the edge of the input graph with the given ID or null if there is no such edge. |
Node |
getOriginalNode(java.lang.Object id)
Returns the node of the input graph with the given ID or null if there is no such node. |
Edge |
getPageEdge(java.lang.Object id)
Returns the edge of a page graph (a graph that represents the result of the multi-page layout) with the given ID or null if there is no such edge. |
Node |
getPageNode(java.lang.Object id)
Returns the node of a page graph (a graph that represents the result of the multi-page layout) with the given ID or null if there is no such node. |
boolean |
removeEdgeLabel(EdgeLabelLayout label,
Edge labeledElement)
Removes a label from a given edge. |
boolean |
removeNodeLabel(NodeLabelLayout label,
Node labeledElement)
Removes a label from a given node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Edge createEdge(Node source, Node target, java.lang.Object sameDataElementId)
ElementFactory
have to use this method to create an edge.
source
- the source of the edgetarget
- the target of the edgesameDataElementId
- the ID of the edge whose data should be copied to the created edge
(or null
if no data should be copied)
ElementFactory
public Node createNode(java.lang.Object sameDataElementId)
ElementFactory
have to use this method to create a node.
sameDataElementId
- the ID of the node whose data should be copied to the created node
(or null
if no data should be copied)
ElementFactory
public void addNodeLabel(NodeLabelLayout label, Node labeledElement)
label
- the label that should be added to the given nodelabeledElement
- the node to which the label should be addedpublic void addEdgeLabel(EdgeLabelLayout label, Edge labeledElement)
label
- the label that should be added to the given edgelabeledElement
- the edge to which the label should be addedpublic boolean removeNodeLabel(NodeLabelLayout label, Node labeledElement)
label
- the label that should be removedlabeledElement
- the node owning the labelpublic boolean removeEdgeLabel(EdgeLabelLayout label, Edge labeledElement)
label
- the label that should be removedlabeledElement
- the edge owning the labelpublic LayoutGraph getGraph()
public MultiPageLayouter getLayouter()
public Node getPageNode(java.lang.Object id)
null
if there is no such node.
id
- the ID of the node that should be returned
null
if there is no such nodepublic Edge getPageEdge(java.lang.Object id)
null
if there is no such edge.
id
- the ID of the edge that should be returned
null
if there is no such edgepublic Node getOriginalNode(java.lang.Object id)
null
if there is no such node.
id
- the ID of the node that should be returned
null
if there is no such nodepublic Edge getOriginalEdge(java.lang.Object id)
null
if there is no such edge.
id
- the ID of the edge that should be returned
null
if there is no such edgepublic EdgeLabelInfo getEdgeLabelInfo(EdgeLabelLayout edgeLabelLayout)
ElementInfoManager
getEdgeLabelInfo
in interface ElementInfoManager
edgeLabelLayout
- the edge label layout for which the information object should be returned
public NodeLabelInfo getNodeLabelInfo(NodeLabelLayout nodeLabelLayout)
ElementInfoManager
getNodeLabelInfo
in interface ElementInfoManager
nodeLabelLayout
- the node label layout for which the information object should be returned
public NodeInfo getNodeInfo(Node node)
ElementInfoManager
getNodeInfo
in interface ElementInfoManager
node
- the node for which the information object should be returned
public EdgeInfo getEdgeInfo(Edge edge)
ElementInfoManager
getEdgeInfo
in interface ElementInfoManager
edge
- the edge for which the information object should be returned
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |