|
||||||||||
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(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 |
setMovingCondition(Condition<java.awt.event.MouseEvent> movingCondition)
Set the condition for passing events to the MovingBehavior |
void |
setRotatingCondition(Condition<java.awt.event.MouseEvent> rotatingCondition)
Set the condition for passing events to the RotatingBehavior |
void |
setScalingCondition(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(SwoglContainer swoglContainer)
swoglContainer
- The SwoglContainer to operate onMethod Detail |
---|
public void setRotatingCondition(Condition<java.awt.event.MouseEvent> rotatingCondition)
RotatingBehavior
rotatingCondition
- The rotating condition to setpublic void setScalingCondition(Condition<java.awt.event.MouseEvent> scalingCondition)
ScalingBehavior
scalingCondition
- The scaling condition to setpublic void setMovingCondition(Condition<java.awt.event.MouseEvent> movingCondition)
MovingBehavior
movingCondition
- The moving condition to setpublic void attachTo(javax.swing.JComponent component)
Control
attachTo
in interface Control
component
- The component to attach topublic void detachFrom(javax.swing.JComponent component)
Control
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 |