com.tensegrity.gui.swt.graph
Class ViewScrollingController

java.lang.Object
  extended bycom.tensegrity.gui.swt.graph.ViewScrollingController

public class ViewScrollingController
extends java.lang.Object

This class gathers the logic behind the view scrolling of the SwtGraphPanel. Its main methods are #adjustViewport(boolean, int, int, int) and updateSliders(). They respectively allow adjusting the viewports when the selection changes on the sliders and to update the sliders after changes have been made on the view.

One must call the destroy() method when an instance of ViewScrollingController is no longer needed.

Version:
$Id: ViewScrollingController.java,v 1.17 2005/07/20 14:16:37 SebastienGuyon Exp $
Author:
S�bastien Guyon

Constructor Summary
ViewScrollingController(TENSlider sliderHorizontal, TENSlider sliderVertical, SwtGraphPanel graphPanel)
           Initializes a ViewScrollingController instance with the passed TENSlider and their associated SwtGraphPanel.
 
Method Summary
 void destroy()
           Call this method when the instance of ViewScrollingController is no longer needed.
 void updateSliders()
           Method updating the sliders depending on the scrollbar values defined on the local VisualGraphView.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewScrollingController

public ViewScrollingController(TENSlider sliderHorizontal,
                               TENSlider sliderVertical,
                               SwtGraphPanel graphPanel)

Initializes a ViewScrollingController instance with the passed TENSlider and their associated SwtGraphPanel.

Parameters:
sliderHorizontal - The graph panel horizontal slider
sliderVertical - The graph panel vertical slider
graphPanel - The SwtGraphPanel instances of this class control the view scrolling of.
Method Detail

destroy

public void destroy()

Call this method when the instance of ViewScrollingController is no longer needed. This routine performs the required clean-up, for instance it unregister listeners set on the sliders.


updateSliders

public void updateSliders()

Method updating the sliders depending on the scrollbar values defined on the local VisualGraphView. See CompositeView.getHorizontalScrollbarValues() and CompositeView.getVerticalScrollbarValues().



Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.