org.globus.cog.gui.grapheditor.canvas.views
Interface CanvasView

All Known Subinterfaces:
StreamView
All Known Implementing Classes:
AbstractView, DotGraphView, GraphView, HtmlGraphView, ListView, NullView, PostScriptGraphView, RemoteCanvasView, SVGGraphView, TreeView, WrappedPassiveGraphView

public interface CanvasView

This interface defines methods that should be implemented by views for a canvas


Method Summary
 void activate()
           
 void addTransformation(GraphTransformation transformation)
          Adds a transformation to the chain of transformations.
 void clean()
          Cleans up this view.
 GraphInterface getGraph()
           
 String getName()
           
 CanvasView getNewInstance(GraphCanvas canvas)
           
 CanvasRenderer getRenderer()
           
 Rectangle getViewport()
           
 void invalidate()
          Forces the view to reevaluate its internal state.
 boolean isSelective()
           
 void reLayout()
           
 void setGraph(GraphInterface graph)
           
 void setRenderer(CanvasRenderer renderer)
          Sets the canvas to which this view belongs
 void setTransformation(GraphTransformation transformation)
          Sets the transformation.
 void setViewport(Rectangle r)
           
 

Method Detail

setRenderer

public void setRenderer(CanvasRenderer renderer)
Sets the canvas to which this view belongs


setTransformation

public void setTransformation(GraphTransformation transformation)
Sets the transformation. The said transformation is applied before rendering.


addTransformation

public void addTransformation(GraphTransformation transformation)
Adds a transformation to the chain of transformations. The transformations will be applied successively, in REVERSE order: Last added first.


getRenderer

public CanvasRenderer getRenderer()

getGraph

public GraphInterface getGraph()

setGraph

public void setGraph(GraphInterface graph)

getNewInstance

public CanvasView getNewInstance(GraphCanvas canvas)

invalidate

public void invalidate()
Forces the view to reevaluate its internal state. This method is called whenever the structure of the graph changes


reLayout

public void reLayout()

getName

public String getName()

clean

public void clean()
Cleans up this view. This method should be called when a view is deactivated. The view can be reused later, by invalidating it.


activate

public void activate()

setViewport

public void setViewport(Rectangle r)

getViewport

public Rectangle getViewport()

isSelective

public boolean isSelective()