diva.compat.trace
Class TraceController

java.lang.Object
  extended by diva.compat.trace.TraceController

public class TraceController
extends Object

A controller for trace diagrams. This controller sets up all the interaction on the pane, and creates interactors and other objects that control how the surface responds to user interaction. Currently, the degree of parameterization is limited, but this will be increased in future.

Version:
$Revision: 1.6 $
Author:
John Reekie

Constructor Summary
TraceController()
          Create a new controller
TraceController(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
 TraceModel getTraceModel()
          Get the trace model.
 TraceView getTraceView()
          Get the trace view.
 void initializeInteraction()
          Initialize all interaction on the trace pane.
 void setSelectionManipulator(Manipulator manipulator)
          Set the prototype selection manipulator.
 void setSelectionRenderer(SelectionRenderer renderer)
          Set the selection renderer.
 void setTraceModel(TraceModel m)
          Set the trace model that is being viewed.
 void setTraceView(TraceView view)
          Set the view that this controller operates on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraceController

public TraceController()
Create a new controller


TraceController

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

Method Detail

getDragInteractor

public DragInteractor getDragInteractor()
Get the drag interactor


getTraceModel

public final TraceModel getTraceModel()
Get the trace model.


getTraceView

public final TraceView getTraceView()
Get the trace view.


getSelectionDragger

public SelectionDragger getSelectionDragger()
Get the selection interactor


getSelectionRenderer

public SelectionRenderer getSelectionRenderer()
Get the selection renderer


getSelectionInteractor

public SelectionInteractor getSelectionInteractor()
Get the selection interactor


initializeInteraction

public void initializeInteraction()
Initialize all interaction on the trace pane. By the time this method is called, all relevant references to views, panes, and interactors must already have been set up.


setTraceModel

public void setTraceModel(TraceModel m)
Set the trace model that is being viewed. Unsubscribe from the previous one if there is one. Then subscribe to the new one.


setTraceView

public void setTraceView(TraceView view)
Set the view that this controller operates on. This method sets the view, and calls initializeInteraction().


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.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.