Edge

scalation.animation.Dgraph.Edge
See theEdge companion object
case class Edge(shape: CurvilinearShape, label: String, primary: Boolean, var color: Color, from: Node, to: Node, bend: Double, shift: Int, direct: Boolean)

The Edge class is used to represent edges in the graph. If bend = 0, a straight line is created, otherwise a quadratic curve is created. It uses implicit coordinates for the edge endpoints.

Value parameters

bend

the amount of bend in the curve (defaults to zero)

color

the color of the edge

direct

whether to directly set the line or allow factory function to set it

from

the origination node

label

the label for the created edge

primary

whether it is a primary/transition/true or secondary/place node/false

shape

the shape (line/curve) of the edge

shift

amount of distance to shift the edge, e.g., to accommodate a bundle of edges in a composite edge

to

the destination node

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def addToken(token: Token): Unit

Add a token from this node.

Add a token from this node.

Value parameters

token

the token to add

Attributes

def move2Boundary(p1: VectorD, p2: VectorD): Unit

Move the edge endpoints, p1 and p2, so edge connects to node boundaries, rather than centers. Edge is from p1 to p2: p1 --> p2.

Move the edge endpoints, p1 and p2, so edge connects to node boundaries, rather than centers. Edge is from p1 to p2: p1 --> p2.

Value parameters

p1

the initial edge starting position (center of the from node)

p2

the initial edge ending position (center of the to node)

Attributes

def setColor(color2: Color): Unit

Set (or reset) the color.

Set (or reset) the color.

Value parameters

color

the new color

Attributes

def setLine(p1: VectorD, pc: VectorD, p2: VectorD): Unit

Set (or reset) the curve by delegating to shape.

Set (or reset) the curve by delegating to shape.

Value parameters

p1

the second/ending point of the curve

pc

the control point of the curve

Attributes

def setLine(p1: VectorD, p2: VectorD): Unit

Set (or reset) the line by delegating to shape.

Set (or reset) the line by delegating to shape.

Value parameters

p1

the second/ending point of the line

Attributes

override def toString: String

Convert this edge to a string.

Convert this edge to a string.

Attributes

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

val tokens: ListBuffer[Token]