Packages

class Dgraph extends Error

The Dgraph class is for defining graph structures suitable for animation. Graphs consist of nodes, edges and tokens. Tokens can be positioned within nodes or on edges. A graph animation class that uses this class would typically move the tokens by changing there location over time. This class supports both directed graphs and bipartite graphs. Directed graphs contain only primary nodes, while bipartite graphs have both primary and secondary nodes along with the rule that edges must go from primaries to secondaries or secondaries to primaries. Bipartite graphs can be used to represent Petri Nets by letting Transitions be primary nodes and Places be secondary nodes. Everything can be labeled (nodes, edges and tokens as well as the graph itself). Nodes and edges may be added to/removed from graphs, while tokens may be added to/removed from either nodes or edges. Tokens may also be free (not bound to nodes or edges).

Linear Supertypes
Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Dgraph
  2. Error
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Dgraph(name: String = "Dgraph", bipartite: Boolean = false)

Type Members

  1. 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.

    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

  2. case class Node(shape: RectangularShape, label: String, primary: Boolean, color: Color, x: Double, y: Double, w: Double, h: Double) extends Product with Serializable

    This class is used to represent nodes in the graph.

    This class is used to represent nodes in the graph.

    shape

    the shape of the node

    label

    the label for the created node

    primary

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

    color

    the color of the node

    x

    the x-coordinate (top left)

    y

    the y-coordinate (top left)

    w

    the width

    h

    the height

  3. case class Token(shape: RectangularShape, label: String, primary: Boolean, color: Color, onNode: Node, w: Double, h: Double) extends Product with Serializable

    This class is used to represent tokens in the graph.

    This class is used to represent tokens in the graph.

    shape

    the shape of the token

    label

    the label for the created token

    primary

    whether the token is primary/free/true to secondary/bound/false

    color

    the color of the token

    onNode

    the node the token is on

    w

    the width of the token

    h

    the height of the token

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addEdge(e: Edge): Unit

    Add an edge to the graph.

    Add an edge to the graph.

    e

    the edge to add

  5. def addFreeToken(t: Token): Unit

    Add a free token to the graph.

    Add a free token to the graph.

    t

    the free token to add

  6. def addNode(n: Node): Unit

    Add a node to the graph.

    Add a node to the graph.

    n

    the node to add

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  9. val edges: ListBuffer[Edge]

    List of edges in the graph

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  14. val freeTokens: ListBuffer[Token]

    List of free tokens in the graph (bound tokens must be in a nodes or edges list)

  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def getRoots: ListBuffer[Node]

    Get all the root nodes (those with no incoming edges).

  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. val nodes: ListBuffer[Node]

    List of nodes in the graph

  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. def removeEdge(e: Edge): Unit

    Remove an edge from the graph.

    Remove an edge from the graph.

    e

    the edge to remove

  24. def removeFreeToken(t: Token): Unit

    Remove a free token from the graph.

    Remove a free token from the graph.

    t

    the free token to remove

  25. def removeNode(n: Node): Unit

    Remove a node from the graph.

    Remove a node from the graph.

    n

    the node to remove

  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. def traverse(n: Node, level: Int): Unit

    Recursively visit all nodes in the graph.

    Recursively visit all nodes in the graph.

    n

    the current node

    level

    the recursion level

  29. def traverseNodes(): Unit

    Traverse the graph printing out its nodes and showing connectivity by indentation.

  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped