scalation.animation

Members list

Type members

Classlikes

case class AnimateCommand(action: CommandType, eid: Int, shape: Shape, label: String, primary: Boolean, color: Color, pts: Array[Double], time: Double, from_eid: Int, to_eid: Int, shift: Int)

The AnimateCommand class provides a data structure for holding animation command specifications.

The AnimateCommand class provides a data structure for holding animation command specifications.

Value parameters

action

the animation action to perform

color

the color of the component

eid

the external id for the component acted upon

from_eid

the 'eid' of the origination node (only for edges)

label

the display label for the component

primary

whether the component is primary (true) or secondary (false)

pts

the set points/dimensions giving the shapes location and size

shape

the shape of graph component (node, edge or token)

shift

amount of distance to shift the shape to be resolved by an angle e.g. to accommodate a bundle of edges in a composite edge( only for edges)

time

simulation time when the command is to be performed

to_eid

the 'eid' of the destination node (only for edges)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class Animator(graph: Dgraph) extends Transform

The Animator class implements the commands to create, destroy, move and scale components (nodes, edges or tokens) in an animated graph.

The Animator class implements the commands to create, destroy, move and scale components (nodes, edges or tokens) in an animated graph.

Value parameters

graph

the directed graph to be animated

Attributes

Supertypes
trait Transform
class Object
trait Matchable
class Any
enum CommandType(val name: String)

The CommandType enumeration specifies the types commands passed from a simulation engine to the animation engine. A message specifies one of the commands defined in the Animator interface.

The CommandType enumeration specifies the types commands passed from a simulation engine to the animation engine. A message specifies one of the commands defined in the Animator interface.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Counter

The Counter object maintains counters.

The Counter object maintains counters.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Counter.type
class DgAnimator(_title: String, fgColor: Color, bgColor: Color, aniRatio: Double, width: Int, height: Int) extends VizFrame, Runnable

The DgAnimator class is an animation engine for animating graphs. For example, it can animate bipartite graphs to animate Petri Nets.

The DgAnimator class is an animation engine for animating graphs. For example, it can animate bipartite graphs to animate Petri Nets.

Value parameters

_title

the title for the display frame

aniRatio

the ratio of simulation speed vs. animation speed

bgColor

the background color

fgColor

the foreground color

height

the height of the animation panel

width

the width of the animation panel

Attributes

Supertypes
trait Runnable
class VizFrame
class Frame
class JFrame
trait RootPaneContainer
trait WindowConstants
class Frame
class Window
trait Accessible
class Container
class Component
trait Serializable
trait MenuContainer
trait ImageObserver
class Object
trait Matchable
class Any
Show all
class Dgraph(name: String, bipartite: Boolean)

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

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

Value parameters

bipartite

whether the graph is bipartite (edges only between 2 types of nodes)

name

the name of the graph

Attributes

Supertypes
class Object
trait Matchable
class Any
object EidCounter

The EidCounter object is used to provide unique identifiers for internally created tokens/fluids.

The EidCounter object is used to provide unique identifiers for internally created tokens/fluids.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
EidCounter.type
class SimpleAnimator(title: String) extends JFrame, Runnable

The SimpleAnimator class demonstrates how the Java 2D API shapes can be put into motion to create a simple animation. The code is for demonstration purposes: other code should use the scala2d package to insulate from the particular graphics framework.

The SimpleAnimator class demonstrates how the Java 2D API shapes can be put into motion to create a simple animation. The code is for demonstration purposes: other code should use the scala2d package to insulate from the particular graphics framework.

Value parameters

title

the title of the display

Attributes

See also

SimpleAnimator2 to see the changes

Supertypes
trait Runnable
class JFrame
trait RootPaneContainer
trait WindowConstants
class Frame
class Window
trait Accessible
class Container
class Component
trait Serializable
trait MenuContainer
trait ImageObserver
class Object
trait Matchable
class Any
Show all
class SimpleAnimator2(_title: String) extends VizFrame, Runnable

The SimpleAnimator2 class demonstrates how the Java 2D API shapes can be put into motion to create a simple animation. This code uses the scala2d package to insulate from the particular graphics framework.

The SimpleAnimator2 class demonstrates how the Java 2D API shapes can be put into motion to create a simple animation. This code uses the scala2d package to insulate from the particular graphics framework.

Value parameters

_title

the title of the display

Attributes

See also

SimpleAnimator to see the changes need to use Java awt/swing directly

Supertypes
trait Runnable
class VizFrame
class Frame
class JFrame
trait RootPaneContainer
trait WindowConstants
class Frame
class Window
trait Accessible
class Container
class Component
trait Serializable
trait MenuContainer
trait ImageObserver
class Object
trait Matchable
class Any
Show all
final class dgAnimatorTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class dgAnimatorTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class dgAnimatorTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class dgraphTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class simpleAnimator2Test

Attributes

Supertypes
class Object
trait Matchable
class Any
final class simpleAnimatorTest

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def dgAnimatorTest(): Unit

The dgAnimatorTest main function is used to test the DgAnimator class. It tests the creation of nodes.

The dgAnimatorTest main function is used to test the DgAnimator class. It tests the creation of nodes.

runMain scalation.animation.dgAnimatorTest

Attributes

def dgAnimatorTest2(): Unit

The dgAnimatorTest2 main function is used to test the DgAnimator class. It tests the creation of nodes, edges and tokens.

The dgAnimatorTest2 main function is used to test the DgAnimator class. It tests the creation of nodes, edges and tokens.

runMain scalation.animation.dgAnimatorTest2

Attributes

def dgAnimatorTest3(): Unit

The dgAnimatorTest3 main function is used to test the DgAnimator class. It tests zoom in and zoom out of a triagle with three nodes and three edges.

The dgAnimatorTest3 main function is used to test the DgAnimator class. It tests zoom in and zoom out of a triagle with three nodes and three edges.

runMain scalation.animation.dgAnimatorTest3

Attributes

def dgraphTest(): Unit

The dgraphTest main function to test the Dgraph class.

The dgraphTest main function to test the Dgraph class.

runMain scalation.animation.dgraphTest

Attributes

def pointOnRect(x: Double, y: Double, minX: Double, minY: Double, maxX: Double, maxY: Double): VectorD
def simpleAnimator2Test(): Unit

The simpleAnimator2Test is a main function for invoking the SimpleAnimator2.

The simpleAnimator2Test is a main function for invoking the SimpleAnimator2.

runMain scalation.animation.simpleAnimator2Test

Attributes

def simpleAnimatorTest(): Unit

The simpleAnimatorTest is a main function for invoking the SimpleAnimator. Abstract Window Toolkit.

The simpleAnimatorTest is a main function for invoking the SimpleAnimator. Abstract Window Toolkit.

runMain scalation.animation.simpleAnimatorTest

Attributes