|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.javagl.swogl.interaction.SpaceInteractionControl
public class SpaceInteractionControl
Implementation of a Control
that allows manipulating
SwoglComponents
inside a SwoglContainer
.
It combines a RotatingBehavior
, a MovingBehavior
and a ScalingBehavior
and allows activating them based
on Conditions
that may be set for the incoming
mouse events.
Constructor Summary | |
---|---|
SpaceInteractionControl(de.javagl.swogl.SwoglContainer swoglContainer)
Creates a new space interaction control for the given SwoglContainer. |
Method Summary | |
---|---|
void |
attachTo(javax.swing.JComponent component)
Attach this control to the given component. |
void |
detachFrom(javax.swing.JComponent component)
Detach this control from the given component. |
boolean |
isEnabled()
Returns whether this control is enabled |
void |
setEnabled(boolean enabled)
Enable or disable this control |
void |
setMouseWheelMovingSpeed(float mouseWheelMovingSpeed)
Set the factor that will be used to convert mouse wheel movement (in ticks) into a movement along the picking ray (in units that correspond to pixels) |
void |
setMovingCondition(de.javagl.swogl.Condition<java.awt.event.MouseEvent> movingCondition)
Set the condition for passing events to the MovingBehavior |
void |
setRotatingCondition(de.javagl.swogl.Condition<java.awt.event.MouseEvent> rotatingCondition)
Set the condition for passing events to the RotatingBehavior |
void |
setScalingCondition(de.javagl.swogl.Condition<java.awt.event.MouseEvent> scalingCondition)
Set the condition for passing events to the ScalingBehavior |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpaceInteractionControl(de.javagl.swogl.SwoglContainer swoglContainer)
swoglContainer
- The SwoglContainer to operate onMethod Detail |
---|
public void setRotatingCondition(de.javagl.swogl.Condition<java.awt.event.MouseEvent> rotatingCondition)
RotatingBehavior
rotatingCondition
- The rotating condition to setpublic void setScalingCondition(de.javagl.swogl.Condition<java.awt.event.MouseEvent> scalingCondition)
ScalingBehavior
scalingCondition
- The scaling condition to setpublic void setMovingCondition(de.javagl.swogl.Condition<java.awt.event.MouseEvent> movingCondition)
MovingBehavior
movingCondition
- The moving condition to setpublic void setMouseWheelMovingSpeed(float mouseWheelMovingSpeed)
mouseWheelMovingSpeed
- The speed factorpublic void attachTo(javax.swing.JComponent component)
Control
Control.detachFrom(JComponent)
method has to be called.
attachTo
in interface Control
component
- The component to attach topublic void detachFrom(javax.swing.JComponent component)
Control
Control.attachTo(JComponent)
was called.
detachFrom
in interface Control
component
- The component to detach frompublic void setEnabled(boolean enabled)
Control
setEnabled
in interface Control
enabled
- Whether this control is enabledpublic boolean isEnabled()
Control
isEnabled
in interface Control
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |