edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction
Class HVScroll

java.lang.Object
  extended by edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.HVScroll
All Implemented Interfaces:
GraphListener, java.util.EventListener

public class HVScroll
extends java.lang.Object
implements GraphListener

HVScroll: Allows for scrolling horizontaly+vertically. This can be done in all sorts of ways, for instance by using the scrollbars, or by dragging.

This code is more complex then it would seem it should be, because scrolling has to be independent of the screen being warped by lenses. HVScroll needs to use the tgLensSet object because the offset is recorded in real coordinates, while the user interacts with the drawn coordinates.

Version:
1.22-jre1.1 $Id: HVScroll.java,v 1.1 2010/01/20 20:38:32 jiecui Exp $
Author:
Alexander Shapiro

Field Summary
 boolean scrolling
           
 
Constructor Summary
HVScroll(TGPanel tgp, TGLensSet tgls)
          Constructor with a TGPanel tgp and TGLensSet tgls.
 
Method Summary
 TGPoint2D getBottomRightDraw()
           
 TGPoint2D getDrawCenter()
           
 javax.swing.JScrollBar getHorizontalSB()
           
 edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.HVScroll.HVDragUI getHVDragUI()
           
 TGAbstractClickUI getHVScrollToCenterUI()
           
 edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.HVScroll.HVLens getLens()
           
 java.awt.Point getOffset()
           
 TGPoint2D getTopLeftDraw()
           
 javax.swing.JScrollBar getVerticalSB()
           
 void graphMoved()
           
 void graphReset()
           
 void scrollAtoB(TGPoint2D drawFrom, TGPoint2D drawTo)
           
 void setOffset(java.awt.Point p)
           
 void slowScrollToCenter(Node n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scrolling

public boolean scrolling
Constructor Detail

HVScroll

public HVScroll(TGPanel tgp,
                TGLensSet tgls)
Constructor with a TGPanel tgp and TGLensSet tgls.

Method Detail

getHorizontalSB

public javax.swing.JScrollBar getHorizontalSB()

getVerticalSB

public javax.swing.JScrollBar getVerticalSB()

getHVDragUI

public edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.HVScroll.HVDragUI getHVDragUI()

getLens

public edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.HVScroll.HVLens getLens()

getHVScrollToCenterUI

public TGAbstractClickUI getHVScrollToCenterUI()

getTopLeftDraw

public TGPoint2D getTopLeftDraw()

getBottomRightDraw

public TGPoint2D getBottomRightDraw()

getDrawCenter

public TGPoint2D getDrawCenter()

graphMoved

public void graphMoved()
Specified by:
graphMoved in interface GraphListener

graphReset

public void graphReset()
Specified by:
graphReset in interface GraphListener

setOffset

public void setOffset(java.awt.Point p)

getOffset

public java.awt.Point getOffset()

scrollAtoB

public void scrollAtoB(TGPoint2D drawFrom,
                       TGPoint2D drawTo)

slowScrollToCenter

public void slowScrollToCenter(Node n)