de.javagl.swogl.interaction
Class ArcballCameraControl

java.lang.Object
  extended by de.javagl.swogl.interaction.ArcballCameraControl
All Implemented Interfaces:
Control

public class ArcballCameraControl
extends java.lang.Object
implements Control

This class allows a default control over an ArcballCameraBehavior.


Constructor Summary
ArcballCameraControl(ArcballCameraBehavior arcballCameraBehavior)
          Creates a new ArcballCameraControl that controls the given ArcballCameraBehavior
 
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 which states whether mouse events should cause moving
 void setRotatingCondition(Condition<java.awt.event.MouseEvent> rotatingCondition)
          Set the Condition which states whether mouse events should cause rotation
 void setZoomingCondition(Condition<java.awt.event.MouseEvent> zoomingCondition)
          Set the Condition which states whether mouse events should cause zooming
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcballCameraControl

public ArcballCameraControl(ArcballCameraBehavior arcballCameraBehavior)
Creates a new ArcballCameraControl that controls the given ArcballCameraBehavior

Parameters:
arcballCameraBehavior - The ArcballCameraBehavior
Method Detail

setRotatingCondition

public void setRotatingCondition(Condition<java.awt.event.MouseEvent> rotatingCondition)
Set the Condition which states whether mouse events should cause rotation

Parameters:
rotatingCondition - The rotatingCondition to set

setMovingCondition

public void setMovingCondition(Condition<java.awt.event.MouseEvent> movingCondition)
Set the Condition which states whether mouse events should cause moving

Parameters:
movingCondition - The movingCondition to set

setZoomingCondition

public void setZoomingCondition(Condition<java.awt.event.MouseEvent> zoomingCondition)
Set the Condition which states whether mouse events should cause zooming

Parameters:
zoomingCondition - The zoomingCondition to set

attachTo

public void attachTo(javax.swing.JComponent component)
Description copied from interface: Control
Attach this control to the given component

Specified by:
attachTo in interface Control
Parameters:
component - The component to attach to

detachFrom

public void detachFrom(javax.swing.JComponent component)
Description copied from interface: Control
Detach this control from the given component

Specified by:
detachFrom in interface Control
Parameters:
component - The component to detach from

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: Control
Enable or disable this control

Specified by:
setEnabled in interface Control
Parameters:
enabled - Whether this control is enabled

isEnabled

public boolean isEnabled()
Description copied from interface: Control
Returns whether this control is enabled

Specified by:
isEnabled in interface Control
Returns:
Whether this control is enabled