|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.properties.MapPropertyHolder
de.cau.cs.kieler.klay.layered.graph.LGraphElement
de.cau.cs.kieler.klay.layered.graph.LShape
de.cau.cs.kieler.klay.layered.graph.LNode
public class LNode
A node in a layered graph.
Field Summary |
---|
Fields inherited from class de.cau.cs.kieler.klay.layered.graph.LGraphElement |
---|
id |
Constructor Summary | |
---|---|
LNode()
|
Method Summary | |
---|---|
void |
borderToContentAreaCoordinates(boolean horizontal,
boolean vertical)
Converts the position of this node from coordinates relative to the hierarchical node border to coordinates relative to that node's content area. |
KVector |
getAnchorPointPosition(LayeredGraph graph)
Returns the position of this node's anchor point. |
Iterable<LEdge> |
getConnectedEdges()
Returns an iterable for all connected edges, both incoming and outgoing. |
Iterable<LEdge> |
getIncomingEdges()
Returns an iterable for all inomcing edges. |
int |
getIndex()
Returns the index of the node in the containing layer's list of nodes. |
List<LLabel> |
getLabels()
Returns this node's labels. |
Layer |
getLayer()
Returns the layer that owns this node. |
LInsets.Double |
getMargin()
Returns the node's margin. |
String |
getName()
Returns the name of the node. |
Iterable<LEdge> |
getOutgoingEdges()
Returns an iterable for all outgoing edges. |
List<LPort> |
getPorts()
Returns the list of ports of this node. |
Iterable<LPort> |
getPorts(PortSide side)
Returns an iterable for all ports of given side. |
Iterable<LPort> |
getPorts(PortType portType)
Returns an iterable for all ports of given type. |
Iterable<LPort> |
getPorts(PortType portType,
PortSide side)
Returns an iterable for all ports of a given type and side. |
void |
setLayer(int index,
Layer layer)
Sets the owning layer and adds itself to the layer's list of nodes at the specified position. |
void |
setLayer(Layer layer)
Sets the owning layer and adds itself to the layer's list of nodes. |
String |
toString()
|
Methods inherited from class de.cau.cs.kieler.klay.layered.graph.LShape |
---|
getPosition, getSize |
Methods inherited from class de.cau.cs.kieler.klay.layered.graph.LGraphElement |
---|
compareTo |
Methods inherited from class de.cau.cs.kieler.core.properties.MapPropertyHolder |
---|
checkProperties, copyProperties, getAllProperties, getProperty, getProperty, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LNode()
Method Detail |
---|
public String toString()
toString
in class Object
public String getName()
null
public Layer getLayer()
public void setLayer(Layer layer)
ConcurrentModificationException
s.
layer
- the owner to setpublic void setLayer(int index, Layer layer)
ConcurrentModificationException
s.
index
- where the node should be inserted in the layer. Must be >= 0
and <= layer.getNodes().size()
.layer
- the owner to set.public List<LPort> getPorts()
public Iterable<LPort> getPorts(PortType portType)
portType
- a port type
public Iterable<LPort> getPorts(PortSide side)
side
- a port side
public Iterable<LPort> getPorts(PortType portType, PortSide side)
portType
- a port type.side
- a port side.
public Iterable<LEdge> getIncomingEdges()
public Iterable<LEdge> getOutgoingEdges()
public Iterable<LEdge> getConnectedEdges()
public List<LLabel> getLabels()
public LInsets.Double getMargin()
The margin is not automatically updated. Rather, the margin has to be calculated once the port and label positions are fixed. Usually this is right before the node placement starts.
public int getIndex()
public void borderToContentAreaCoordinates(boolean horizontal, boolean vertical)
horizontal
- if true
, the x coordinate will be translated.vertical
- if true
, the y coordinate will be translated.
IllegalStateException
- if the node is not assigned to a layer in a layered graph.public KVector getAnchorPointPosition(LayeredGraph graph)
Properties.INTERACTIVE_LAYOUT_ANCHOR
property.
graph
- the layered graph.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |