edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction
Class HVScroll
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
scrolling
public boolean scrolling
HVScroll
public HVScroll(TGPanel tgp,
TGLensSet tgls)
- Constructor with a TGPanel tgp and TGLensSet tgls.
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)