diva.canvas.toolbox
Class BasicController

java.lang.Object
  extended by diva.canvas.toolbox.BasicController

public class BasicController
extends java.lang.Object

A basic controller implementation. This controller creates a useful and common interaction that can be used in simple applications. A single interactor, accessed through getRole(), provides selection and dragging. Clients that wish to use this default interaction can give this interactor to figures that they add to the foreground layer of the corresponding pane.

Version:
$Id: BasicController.java 40092 2005-12-14 04:17:17Z cxh $
Author:
John Reekie

Field Summary
private  DragInteractor _dragInteractor
          The interactor that drags objects by default
private  SelectionDragger _selectionDragger
          The selection dragger
private  SelectionInteractor _selectionInteractor
          The selection interactor.
 
Constructor Summary
BasicController(GraphicsPane pane)
          Create a new controller for the given pane
 
Method Summary
 DragInteractor getDragInteractor()
          Get the drag interactor
 SelectionDragger getSelectionDragger()
          Get the selection interactor
 SelectionInteractor getSelectionInteractor()
          Get the selection interactor
 SelectionRenderer getSelectionRenderer()
          Get the selection renderer
 void setSelectionManipulator(Manipulator manipulator)
          Set the prototype selection manipulator.
 void setSelectionRenderer(SelectionRenderer renderer)
          Set the selection renderer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_dragInteractor

private DragInteractor _dragInteractor
The interactor that drags objects by default


_selectionInteractor

private SelectionInteractor _selectionInteractor
The selection interactor.


_selectionDragger

private SelectionDragger _selectionDragger
The selection dragger

Constructor Detail

BasicController

public BasicController(GraphicsPane pane)
Create a new controller for the given pane

Method Detail

getDragInteractor

public DragInteractor getDragInteractor()
Get the drag interactor


getSelectionDragger

public SelectionDragger getSelectionDragger()
Get the selection interactor


getSelectionRenderer

public SelectionRenderer getSelectionRenderer()
Get the selection renderer


getSelectionInteractor

public SelectionInteractor getSelectionInteractor()
Get the selection interactor


setSelectionManipulator

public void setSelectionManipulator(Manipulator manipulator)
Set the prototype selection manipulator. Selected figures will have a copy of this manipulator wrapped around them. This method nullifies any previous renderers set with setSelectionRenderer();


setSelectionRenderer

public void setSelectionRenderer(SelectionRenderer renderer)
Set the selection renderer. Selected figures will be highlighted with this renderer.