|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.touchgraph.graphlayout.interaction.HVScroll
public class HVScroll
HVScroll: Allows for scrolling horizontally+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.
| Field Summary | |
|---|---|
boolean |
scrolling
|
| Constructor Summary | |
|---|---|
HVScroll(TGPanel tgp,
TGLensSet tgls)
Constructor with a TGPanel tgp and TGLensSet tgls. |
|
| Method Summary | |
|---|---|
void |
cancelScrolling()
Immediately halts the center-scrolling thread loop. |
Point2D.Double |
getBottomRightDraw()
|
Point2D.Double |
getDrawCenter()
|
JScrollBar |
getHorizontalSB()
|
com.touchgraph.graphlayout.interaction.HVScroll.HVDragUI |
getHVDragUI()
|
TGAbstractClickUI |
getHVScrollToCenterUI()
|
com.touchgraph.graphlayout.interaction.HVScroll.HVLens |
getLens()
|
Point |
getOffset()
|
int |
getOffsetX()
|
int |
getOffsetY()
|
Point2D.Double |
getTopLeftDraw()
|
JScrollBar |
getVerticalSB()
|
void |
graphMoved()
Updates the graph following a move. |
void |
graphReset()
|
boolean |
isScrolling()
Returns true if the center-scrolling thread is active. |
void |
scrollAtoB(Point2D.Double drawFrom,
Point2D.Double drawTo)
|
void |
setOffset(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 |
|---|
public boolean scrolling
| Constructor Detail |
|---|
public HVScroll(TGPanel tgp,
TGLensSet tgls)
| Method Detail |
|---|
public JScrollBar getHorizontalSB()
public JScrollBar getVerticalSB()
public com.touchgraph.graphlayout.interaction.HVScroll.HVDragUI getHVDragUI()
public com.touchgraph.graphlayout.interaction.HVScroll.HVLens getLens()
public TGAbstractClickUI getHVScrollToCenterUI()
public Point2D.Double getTopLeftDraw()
public Point2D.Double getBottomRightDraw()
public Point2D.Double getDrawCenter()
public void graphMoved()
graphMoved in interface GraphListenerpublic void graphReset()
graphReset in interface GraphListenerpublic void setOffset(Point p)
public Point getOffset()
public int getOffsetX()
public int getOffsetY()
public void scrollAtoB(Point2D.Double drawFrom,
Point2D.Double drawTo)
public boolean isScrolling()
public void cancelScrolling()
public void slowScrollToCenter(Node n)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||