case class Edge(shape: CurvilinearShape, label: String, primary: Boolean, color: Color, from: Node, to: Node, bend: Double) extends Product with Serializable
This class is used to represent edges in the graph. If bend = 0, a straight line is created, otherwise a quadratic curve is created.
- shape
the shape (line/curve) of the edge
- label
the label for the created edge
- primary
whether it is a primary/transition/true or secondary/place node/false
- color
the color of the edge
- from
the origination node
- to
the destination node
- bend
the amount of bend in the curve
- Alphabetic
- By Inheritance
- Edge
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Edge(shape: CurvilinearShape, label: String, primary: Boolean, color: Color, from: Node, to: Node, x1: Double, y1: Double, xc: Double, yc: Double, x2: Double, y2: Double)
Construct an edge as a curve with explicit coordinates.
Construct an edge as a curve with explicit coordinates.
- shape
the shape (curve) of the edge
- label
the label for the created edge
- primary
whether it is a primary/transition/true or secondary/place node/false
- color
the color of the edge
- from
the origination node
- to
the destination node
- x1
the x-coordinate of the edge's start
- y1
the y-coordinate of the edge's start
- xc
the x-coordinate of the edge's control point
- yc
the y-coordinate of the edge's control point
- x2
the x-coordinate of the edge's end
- y2
the y-coordinate of the edge's end
-
new
Edge(shape: CurvilinearShape, label: String, primary: Boolean, color: Color, from: Node, to: Node, x1: Double, y1: Double, x2: Double, y2: Double)
Construct an edge as a line with explicit coordinates.
Construct an edge as a line with explicit coordinates.
- shape
the shape (line) of the edge
- label
the label for the created edge
- primary
whether it is a primary/transition/true or secondary/place node/false
- color
the color of the edge
- from
the origination node
- to
the destination node
- x1
the x-coordinate of the edge's start
- y1
the y-coordinate of the edge's start
- x2
the x-coordinate of the edge's end
- y2
the y-coordinate of the edge's end
-
new
Edge(shape: CurvilinearShape, label: String, primary: Boolean, color: Color, from: Node, to: Node)
Construct an edge with no bend.
Construct an edge with no bend.
- shape
the shape (line/curve) of the edge
- label
the label for the created edge
- primary
whether it is a primary/transition/true or secondary/place node/false
- color
the color of the edge
- from
the origination node
- to
the destination node
-
new
Edge(shape: CurvilinearShape, label: String, primary: Boolean, color: Color, from: Node, to: Node, bend: Double)
- shape
the shape (line/curve) of the edge
- label
the label for the created edge
- primary
whether it is a primary/transition/true or secondary/place node/false
- color
the color of the edge
- from
the origination node
- to
the destination node
- bend
the amount of bend in the curve
Value Members
-
def
addToken(token: Token): Unit
Add a token from this node.
Add a token from this node.
- token
the token to add
- val bend: Double
- var color: Color
- val from: Node
- val label: String
- val primary: Boolean
-
def
setColor(color2: Color): Unit
Set (or reset) the color.
- val shape: CurvilinearShape
- val to: Node
-
def
toString(): String
Convert this edge to a string.
Convert this edge to a string.
- Definition Classes
- Edge → AnyRef → Any
-
val
tokens: ListBuffer[Token]
List of tokens current on this edge.