algoanim.animalscript
Class AnimalGraphGenerator

java.lang.Object
  extended by algoanim.primitives.generators.Generator
      extended by algoanim.animalscript.AnimalGenerator
          extended by algoanim.animalscript.AnimalGraphGenerator
All Implemented Interfaces:
GeneratorInterface, GraphGenerator

public class AnimalGraphGenerator
extends AnimalGenerator
implements GraphGenerator


Field Summary
 
Fields inherited from class algoanim.primitives.generators.Generator
lang
 
Constructor Summary
AnimalGraphGenerator(AnimalScript as)
           
 
Method Summary
 void create(Graph graph)
          Creates the originating script code for a given graph, due to the fact that before a primitive can be worked with it has to be defined and made known to the script language.
 void hideEdge(Graph graph, int startNode, int endNode, Timing offset, Timing duration)
          hides a selected (previously visible?) graph edge by turning it invisible
 void hideEdgeWeight(Graph graph, int startNode, int endNode, Timing offset, Timing duration)
          hides a selected (previously visible?) graph edge weight by turning it invisible
 void hideNode(Graph graph, int index, Timing offset, Timing duration)
          hide a selected graph node by turning it invisible
 void hideNodes(Graph graph, int[] indices, Timing offset, Timing duration)
          hide a selected set of graph nodes by turning them invisible
 void highlightEdge(Graph graph, int startNode, int endNode, Timing offset, Timing duration)
          Highlights the graph edge at a given position after a distinct offset.
 void highlightNode(Graph graph, int node, Timing offset, Timing duration)
          Highlights the chosen graph node after a distinct offset.
 void setEdgeWeight(Graph graph, int startNode, int endNode, java.lang.String weight, Timing offset, Timing duration)
          sets the weigth of a given edge
 void showEdge(Graph graph, int startNode, int endNode, Timing offset, Timing duration)
          show a selected (previously hidden?) graph edge by turning it visible
 void showEdgeWeight(Graph graph, int startNode, int endNode, Timing offset, Timing duration)
          show a selected (previously hidden?) graph edge weightby turning it visible
 void showNode(Graph graph, int index, Timing offset, Timing duration)
          show a selected (previously hidden) graph node by turning it visible
 void showNodes(Graph graph, int[] indices, Timing offset, Timing duration)
          show a selected (previously hidden) graph node by turning it visible
 void translateNode(Graph graph, int nodeIndex, Node location, Timing offset, Timing duration)
          sets the position of a given node
 void translateNodes(Graph graph, int[] nodeIndices, Node location, Timing offset, Timing duration)
          sets the position of a given set of nodes
 void translateWithFixedNodes(Graph graph, int[] nodeIndices, Node location, Timing offset, Timing duration)
          sets the position of a given set of nodes
 void unhighlightEdge(Graph graph, int startNode, int endNode, Timing offset, Timing duration)
          Unhighlights the graph edge at a given position after a distinct offset.
 void unhighlightNode(Graph graph, int node, Timing offset, Timing duration)
          Unhighlights the chosen graph node after a distinct offset.
 
Methods inherited from class algoanim.animalscript.AnimalGenerator
addBooleanOption, addBooleanSwitch, addColorOption, addColorOption, addFontOption, addFontOption, addIntOption, addWithTiming, changeColor, exchange, hide, makeColorDef, makeColorDef, makeDisplayOptionsDef, makeDisplayOptionsDef, makeDurationTimingDef, makeHiddenDef, makeNodeDef, makeOffsetTimingDef, moveBy, moveTo, moveVia, rotate, rotate, show
 
Methods inherited from class algoanim.primitives.generators.Generator
getLanguage, isNameUsed, isValidDirection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface algoanim.primitives.generators.GeneratorInterface
changeColor, exchange, getLanguage, hide, moveBy, moveTo, moveVia, rotate, rotate, show
 

Constructor Detail

AnimalGraphGenerator

public AnimalGraphGenerator(AnimalScript as)
Parameters:
as - the associated Language object.
Method Detail

create

public void create(Graph graph)
Description copied from interface: GraphGenerator
Creates the originating script code for a given graph, due to the fact that before a primitive can be worked with it has to be defined and made known to the script language.

Specified by:
create in interface GraphGenerator
Parameters:
graph - the graph for which the initiate script code shall be created.

highlightEdge

public void highlightEdge(Graph graph,
                          int startNode,
                          int endNode,
                          Timing offset,
                          Timing duration)
Highlights the graph edge at a given position after a distinct offset.

Specified by:
highlightEdge in interface GraphGenerator
Parameters:
graph - the graph on which the operation is performed
startNode - the start node of the edge to highlight.
endNode - the end node of the edge to highlight.
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

unhighlightEdge

public void unhighlightEdge(Graph graph,
                            int startNode,
                            int endNode,
                            Timing offset,
                            Timing duration)
Unhighlights the graph edge at a given position after a distinct offset.

Specified by:
unhighlightEdge in interface GraphGenerator
Parameters:
graph - the graph on which the operation is performed
startNode - the start node of the edge to unhighlight.
endNode - the end node of the edge to unhighlight.
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

highlightNode

public void highlightNode(Graph graph,
                          int node,
                          Timing offset,
                          Timing duration)
Highlights the chosen graph node after a distinct offset.

Specified by:
highlightNode in interface GraphGenerator
Parameters:
graph - the graph on which the operation is performed
node - the node to highlight.
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

unhighlightNode

public void unhighlightNode(Graph graph,
                            int node,
                            Timing offset,
                            Timing duration)
Unhighlights the chosen graph node after a distinct offset.

Specified by:
unhighlightNode in interface GraphGenerator
Parameters:
graph - the graph on which the operation is performed
node - the node to unhighlight.
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

hideNode

public void hideNode(Graph graph,
                     int index,
                     Timing offset,
                     Timing duration)
Description copied from interface: GraphGenerator
hide a selected graph node by turning it invisible

Specified by:
hideNode in interface GraphGenerator
index - the index of the node to be hidden
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

hideNodes

public void hideNodes(Graph graph,
                      int[] indices,
                      Timing offset,
                      Timing duration)
Description copied from interface: GraphGenerator
hide a selected set of graph nodes by turning them invisible

Specified by:
hideNodes in interface GraphGenerator
indices - the set of node indices to be hidden
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

showNode

public void showNode(Graph graph,
                     int index,
                     Timing offset,
                     Timing duration)
Description copied from interface: GraphGenerator
show a selected (previously hidden) graph node by turning it visible

Specified by:
showNode in interface GraphGenerator
index - the index of the node to be shown
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

showNodes

public void showNodes(Graph graph,
                      int[] indices,
                      Timing offset,
                      Timing duration)
Description copied from interface: GraphGenerator
show a selected (previously hidden) graph node by turning it visible

Specified by:
showNodes in interface GraphGenerator
indices - the index of the node to be shown
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

hideEdge

public void hideEdge(Graph graph,
                     int startNode,
                     int endNode,
                     Timing offset,
                     Timing duration)
Description copied from interface: GraphGenerator
hides a selected (previously visible?) graph edge by turning it invisible

Specified by:
hideEdge in interface GraphGenerator
startNode - the start index of the edge to be hidden
endNode - the end index of the edge to be hidden
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

hideEdgeWeight

public void hideEdgeWeight(Graph graph,
                           int startNode,
                           int endNode,
                           Timing offset,
                           Timing duration)
Description copied from interface: GraphGenerator
hides a selected (previously visible?) graph edge weight by turning it invisible

Specified by:
hideEdgeWeight in interface GraphGenerator
startNode - the start index of the edge weight to be hidden
endNode - the end index of the edge weight to be hidden
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

showEdge

public void showEdge(Graph graph,
                     int startNode,
                     int endNode,
                     Timing offset,
                     Timing duration)
Description copied from interface: GraphGenerator
show a selected (previously hidden?) graph edge by turning it visible

Specified by:
showEdge in interface GraphGenerator
startNode - the start index of the edge to be shown
endNode - the end index of the node to be shown
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

showEdgeWeight

public void showEdgeWeight(Graph graph,
                           int startNode,
                           int endNode,
                           Timing offset,
                           Timing duration)
Description copied from interface: GraphGenerator
show a selected (previously hidden?) graph edge weightby turning it visible

Specified by:
showEdgeWeight in interface GraphGenerator
startNode - the start index of the edge weight to be shown
endNode - the end index of the node weight to be shown
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

setEdgeWeight

public void setEdgeWeight(Graph graph,
                          int startNode,
                          int endNode,
                          java.lang.String weight,
                          Timing offset,
                          Timing duration)
Description copied from interface: GraphGenerator
sets the weigth of a given edge

Specified by:
setEdgeWeight in interface GraphGenerator
Parameters:
graph - the underlying graph
startNode - the start node of the edge
endNode - the end node of the edge
weight - the new weight of the edge
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

translateNode

public void translateNode(Graph graph,
                          int nodeIndex,
                          Node location,
                          Timing offset,
                          Timing duration)
Description copied from interface: GraphGenerator
sets the position of a given node

Specified by:
translateNode in interface GraphGenerator
Parameters:
graph - the underlying graph
nodeIndex - the index of the node to be moved
location - the target position of the node
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

translateNodes

public void translateNodes(Graph graph,
                           int[] nodeIndices,
                           Node location,
                           Timing offset,
                           Timing duration)
Description copied from interface: GraphGenerator
sets the position of a given set of nodes

Specified by:
translateNodes in interface GraphGenerator
Parameters:
graph - the underlying graph
nodeIndices - the indices of the nodes to be moved
location - the target position of the node
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.

translateWithFixedNodes

public void translateWithFixedNodes(Graph graph,
                                    int[] nodeIndices,
                                    Node location,
                                    Timing offset,
                                    Timing duration)
Description copied from interface: GraphGenerator
sets the position of a given set of nodes

Specified by:
translateWithFixedNodes in interface GraphGenerator
Parameters:
graph - the underlying graph
nodeIndices - the indices of the nodes to be moved
location - the target position of the node
offset - [optional] the offset after which the operation shall be started.
duration - [optional] the duration this operation lasts.