|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.javagl.swogl.interaction.ScalingBehavior
public class ScalingBehavior
This class allows scaling 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 MouseMotionListener by calling the main public
methods accordingly:
startScaling(Point)
when the mouse is pressed to start a scaling
doScaling(Point)
when the mouse is dragged to scale a SwoglComponent
Constructor Summary | |
---|---|
ScalingBehavior(SwoglContainer swoglContainer)
Creates a new ScalingBehavior for the given SwoglContainer. |
Method Summary | |
---|---|
void |
doScaling(java.awt.Point point)
Scale the current SwoglComponent. |
void |
setScalingSpeed(float scalingSpeed)
Set the scaling speed factor |
void |
setUniformScaling(boolean uniformScaling)
Set whether the scaling should be uniform |
void |
startScaling(java.awt.Point point)
Start scaling the current SwoglComponent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScalingBehavior(SwoglContainer swoglContainer)
swoglContainer
- The SwoglContainer this behavior operates onMethod Detail |
---|
public void startScaling(java.awt.Point point)
doScaling(Point)
will scale
the SwoglComponent.
point
- The point where the scaling should startpublic void doScaling(java.awt.Point point)
startScaling(Point)
, then this
method does not have any effect. Otherwise, this method will
scale the SwoglComponent depending on the difference between
the given point and the previous point.
point
- The current pointpublic void setScalingSpeed(float scalingSpeed)
scalingSpeed
- The scaling speed factorpublic void setUniformScaling(boolean uniformScaling)
uniformScaling
- Whether the scaling should be uniform
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |