|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.Scroller
public class Scroller
This is a class which scrolls a view in direction with a certain speed. The speed can be changed via a synchronized method. This class is especially useful when run in a separate thread. A Vector is drawn in the direction of the scrolling.
Constructor Summary | |
---|---|
Scroller(Graph2DView view,
double xpress,
double ypress)
Constructs a new Scroller for a given view. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent actionEvent)
Loop, in which the scrolling performs |
void |
dispose()
|
Drawable |
getDrawable()
Returns the Drawable instance that visualizes the scroll mark. |
YVector |
getScrollDirection()
Returns the scroll direction as a normalized vector. |
double |
getScrollSpeedFactor()
Returns a factor to be applied to scroll speed. |
YPoint |
getScrollStart()
Returns the start location of the scroller action. |
void |
init()
|
void |
reinitializeValues(Graph2DView view,
double xpress,
double ypress)
Reinitializes the Scroller with the given values. |
void |
setDirection(double x,
double y)
Sets the direction of the scrolling by a direction vector (x,y). |
void |
setDrawable(Drawable drawable)
Sets the Drawable instance that visualizes the scroll mark. |
void |
setScrollSpeedFactor(double speedFactor)
Sets a factor to be applied to scroll speed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Scroller(Graph2DView view, double xpress, double ypress)
Method Detail |
---|
public void reinitializeValues(Graph2DView view, double xpress, double ypress)
public void setScrollSpeedFactor(double speedFactor)
public double getScrollSpeedFactor()
public void setDrawable(Drawable drawable)
null
value will result in no scroll
mark to be shown.
public Drawable getDrawable()
null
value will result in no scroll
mark to be shown.
public void init()
public void dispose()
public void setDirection(double x, double y)
public void actionPerformed(java.awt.event.ActionEvent actionEvent)
actionPerformed
in interface java.awt.event.ActionListener
public YVector getScrollDirection()
public YPoint getScrollStart()
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |