|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.javagl.swogl.interaction.RotatingBehavior
public class RotatingBehavior
This class allows rotating the SwoglComponents
of a SwoglContainer
in space. It may be used for the cases
where the SwoglContainer has no layout manager.
Usually this class will be controlled by a MouseListener,
and MouseWheelListener by calling the main public methods
accordingly:
startRotation(Point)
when the mouse is pressed to start a rotation
doRotation(Point)
when the mouse is dragged to rotate a SwoglComponent
Constructor Summary | |
---|---|
RotatingBehavior(de.javagl.swogl.SwoglContainer swoglContainer)
Creates a new RotatingBehavior for the given SwoglContainer. |
Method Summary | |
---|---|
void |
doRotation(java.awt.Point point)
Rotate the current SwoglComponent. |
void |
setRotationSpeed(float rotationSpeed)
Set the rotation speed factor for this behavior |
void |
startRotation(java.awt.Point point)
Start the rotation of a SwoglComponent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RotatingBehavior(de.javagl.swogl.SwoglContainer swoglContainer)
swoglContainer
- The SwoglContainer this behavior operates onMethod Detail |
---|
public void startRotation(java.awt.Point point)
doRotation(Point)
will rotate
the SwoglComponent.
point
- The point where the rotation should startpublic void doRotation(java.awt.Point point)
startRotation(Point)
, then this
method does not have any effect. Otherwise, this method will
rotate the SwoglComponent depending on the difference between
the given point and the previous point.
point
- The current pointpublic void setRotationSpeed(float rotationSpeed)
rotationSpeed
- The rotation speed factor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |