com.touchgraph.graphlayout.interaction
Class HVScroll

java.lang.Object
  extended bycom.touchgraph.graphlayout.interaction.HVScroll
All Implemented Interfaces:
java.util.EventListener, GraphListener

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.21 $Id: HVScroll.java,v 1.1.1.1 2004/02/06 08:44:07 keesj 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()
           
 com.touchgraph.graphlayout.interaction.HVScroll.HVDragUI getHVDragUI()
           
 TGAbstractClickUI getHVScrollToCenterUI()
           
 com.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 scrollToCenter(Node n)
           
 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 com.touchgraph.graphlayout.interaction.HVScroll.HVDragUI getHVDragUI()

getLens

public com.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)

scrollToCenter

public void scrollToCenter(Node n)

slowScrollToCenter

public void slowScrollToCenter(Node n)


Copyright © 2003-2004 SourceForge. All Rights Reserved.