ConForM.CoopnTools.CoKer.Visual
Class Layouter

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.Visual.Layouter
Direct Known Subclasses:
HierarchicalLayouter, IncrementalLayouter

public abstract class Layouter
extends java.lang.Object

Abstract Layouter of Graphical Visual Elements. A layouter has a doLayout method allowing the automatic layout of a renderable group, and a doIncrementalLayout for the aumotamic partial layout of some elements of a renderable group.


Field Summary
protected  CoopnEnv env
           
 
Constructor Summary
Layouter(CoopnEnv env)
          Simple constructor.
 
Method Summary
protected abstract  void addArc(GraphicalVisualArc arc, java.lang.Object graph)
          Add an arc to the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.
protected abstract  void addNode(GraphicalVisualShape node, java.lang.Object graph)
          Add a node to the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.
protected abstract  void addSelectedNode(GraphicalVisualShape node, java.lang.Object graph)
          Add a selected node to the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.
protected abstract  void applyLayout(java.lang.Object graph, CoopnEnv env)
          Apply the layout to the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.
protected abstract  void clearGraph(java.lang.Object graph)
          Clears a graph (stored as an Object in the layouter). abstract method top be implemented by actual layouters.
static Layouter defaultLayouter(CoopnEnv env)
          Get the default layouter.
 void doLayout(GraphicalVisualRenderableGroup group)
          doLayout command.
protected abstract  void modifyArc(GraphicalVisualArc arc, java.lang.Object graph)
          Modify an arc to take into account the new layout defined in the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.
protected abstract  void modifyNode(GraphicalVisualShape node, java.lang.Object graph)
          Modify a node to take into account the new layout defined in the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.
protected abstract  java.lang.Object newGraph()
          Creates a new graph (stored as an Object in the layouter). abstract method top be implemented by actual layouters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

env

protected CoopnEnv env
Constructor Detail

Layouter

public Layouter(CoopnEnv env)
Simple constructor.
Method Detail

newGraph

protected abstract java.lang.Object newGraph()
Creates a new graph (stored as an Object in the layouter). abstract method top be implemented by actual layouters.

addNode

protected abstract void addNode(GraphicalVisualShape node,
                                java.lang.Object graph)
Add a node to the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.

addSelectedNode

protected abstract void addSelectedNode(GraphicalVisualShape node,
                                        java.lang.Object graph)
Add a selected node to the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.

addArc

protected abstract void addArc(GraphicalVisualArc arc,
                               java.lang.Object graph)
Add an arc to the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.

applyLayout

protected abstract void applyLayout(java.lang.Object graph,
                                    CoopnEnv env)
Apply the layout to the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.

modifyNode

protected abstract void modifyNode(GraphicalVisualShape node,
                                   java.lang.Object graph)
Modify a node to take into account the new layout defined in the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.

modifyArc

protected abstract void modifyArc(GraphicalVisualArc arc,
                                  java.lang.Object graph)
Modify an arc to take into account the new layout defined in the graph (imported as an Object from the layouter). abstract method top be implemented by actual layouters.

clearGraph

protected abstract void clearGraph(java.lang.Object graph)
Clears a graph (stored as an Object in the layouter). abstract method top be implemented by actual layouters.

doLayout

public void doLayout(GraphicalVisualRenderableGroup group)
doLayout command. The layout is performed according to the hierarchy of graphical elements, i.e. containers are layouted before to be included into a more general group.
Parameters:
group - the main group to layout.

defaultLayouter

public static Layouter defaultLayouter(CoopnEnv env)
Get the default layouter.