public class HVScroll extends java.lang.Object implements GraphListener
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.
Modifier and Type | Field and Description |
---|---|
boolean |
scrolling |
Constructor and Description |
---|
HVScroll(TGPanel tgp,
TGLensSet tgls)
Constructor with a TGPanel tgp and TGLensSet tgls.
|
Modifier and Type | Method and Description |
---|---|
TGPoint2D |
getBottomRightDraw() |
TGPoint2D |
getDrawCenter() |
java.awt.Scrollbar |
getHorizontalSB() |
com.touchgraph.graphlayout.interaction.HVScroll.HVDragUI |
getHVDragUI() |
TGAbstractClickUI |
getHVScrollToCenterUI() |
com.touchgraph.graphlayout.interaction.HVScroll.HVLens |
getLens() |
java.awt.Point |
getOffset() |
TGPoint2D |
getTopLeftDraw() |
java.awt.Scrollbar |
getVerticalSB() |
void |
graphMoved() |
void |
graphReset() |
void |
scrollAtoB(TGPoint2D drawFrom,
TGPoint2D drawTo) |
void |
setOffset(java.awt.Point p) |
void |
slowScrollToCenter(Node n) |
public java.awt.Scrollbar getHorizontalSB()
public java.awt.Scrollbar getVerticalSB()
public com.touchgraph.graphlayout.interaction.HVScroll.HVDragUI getHVDragUI()
public com.touchgraph.graphlayout.interaction.HVScroll.HVLens getLens()
public TGAbstractClickUI getHVScrollToCenterUI()
public TGPoint2D getTopLeftDraw()
public TGPoint2D getBottomRightDraw()
public TGPoint2D getDrawCenter()
public void graphMoved()
graphMoved
in interface GraphListener
public void graphReset()
graphReset
in interface GraphListener
public void setOffset(java.awt.Point p)
public java.awt.Point getOffset()
public void slowScrollToCenter(Node n)