Class GraphEdge
java.lang.Object
com.codename1.graph.GraphEdge
A connection from one node to another, optionally from a port to a port.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()The id, unique within the model.getLabel()The text painted at the middle of the edge, or null.double[]getRoute()The bend points an arrangement routed the edge through, as x, y pairs in world units, or null for a direct line between its ends.The id of the node the edge leaves.The id of the output port the edge leaves, or null.A key a renderer may map to a colour or a dash, or null.The id of the node the edge enters.The id of the input port the edge enters, or null.Anything the application keeps with the edge.booleanTrue, the default, when the edge is painted with an arrowhead.voidsetDirected(boolean directed) Paints the edge with or without an arrowhead.voidSets the label.voidsetRoute(double[] route) Sets the bend points; null removes them.voidsetStyleKey(String styleKey) Sets the style key.voidsetUserData(Object userData) Sets the application's data.booleanTrue when the edge touches the node with this id.
-
Constructor Details
-
GraphEdge
-
GraphEdge
-
-
Method Details
-
getId
The id, unique within the model. -
getSourceId
The id of the node the edge leaves. -
getSourcePortId
The id of the output port the edge leaves, or null. -
getTargetId
The id of the node the edge enters. -
getTargetPortId
The id of the input port the edge enters, or null. -
getLabel
The text painted at the middle of the edge, or null. -
setLabel
Sets the label. -
isDirected
public boolean isDirected()True, the default, when the edge is painted with an arrowhead. -
setDirected
public void setDirected(boolean directed) Paints the edge with or without an arrowhead. -
getStyleKey
A key a renderer may map to a colour or a dash, or null. -
setStyleKey
Sets the style key. -
getUserData
Anything the application keeps with the edge. -
setUserData
Sets the application's data. -
getRoute
public double[] getRoute()The bend points an arrangement routed the edge through, as x, y pairs in world units, or null for a direct line between its ends. -
setRoute
public void setRoute(double[] route) Sets the bend points; null removes them. -
touches
True when the edge touches the node with this id.
-