| |
|
| com.sun.j3d.utils.behaviors.mouse.MouseBehavior ch.aecii.j3d.utils.ExtendedMouseRotate
ExtendedMouseRotate | public class ExtendedMouseRotate extends MouseBehavior (Code) | | Extends the MouseRotate from Java3D so that one can specifiy around which axis the rotation should be done.
(Most of the code is copied from MouseRotate)
author: sg version: 1.0 |
Field Summary | |
final public static int | MODE_ALL | final public static int | MODE_X | final public static int | MODE_Y | final public static int | MODE_Z |
MODE_ALL | final public static int MODE_ALL(Code) | | |
MODE_X | final public static int MODE_X(Code) | | |
MODE_Y | final public static int MODE_Y(Code) | | |
MODE_Z | final public static int MODE_Z(Code) | | |
ExtendedMouseRotate | public ExtendedMouseRotate(TransformGroup transformGroup)(Code) | | Creates a rotate behavior given the transform group.
Parameters: transformGroup - The transformGroup to operate on. |
ExtendedMouseRotate | public ExtendedMouseRotate()(Code) | | Creates a default mouse rotate behavior.
|
ExtendedMouseRotate | public ExtendedMouseRotate(int flags)(Code) | | Creates a rotate behavior. Note that this behavior still needs a
transform group to work on (use setTransformGroup(tg)) and the transform
group must add this behavior.
Parameters: flags - interesting flags (wakeup conditions). |
ExtendedMouseRotate | public ExtendedMouseRotate(Component c)(Code) | | Creates a rotate behavior that uses AWT listeners and behavior posts
rather than WakeupOnAWTEvent. The behavior is added to the specified
Component. A null component can be passed to specify the behavior should
use listeners. Components can then be added to the behavior with the
addListener(Component c) method.
Parameters: c - The Component to add the MouseListener and MouseMotionListenerto. since: Java 3D 1.2.1 |
ExtendedMouseRotate | public ExtendedMouseRotate(Component c, TransformGroup transformGroup)(Code) | | Creates a rotate behavior that uses AWT listeners and behavior posts
rather than WakeupOnAWTEvent. The behaviors is added to the specified
Component and works on the given TransformGroup. A null component can be
passed to specify the behavior should use listeners. Components can then
be added to the behavior with the addListener(Component c) method.
Parameters: c - The Component to add the MouseListener and MouseMotionListenerto. Parameters: transformGroup - The TransformGroup to operate on. since: Java 3D 1.2.1 |
ExtendedMouseRotate | public ExtendedMouseRotate(Component c, int flags)(Code) | | Creates a rotate behavior that uses AWT listeners and behavior posts
rather than WakeupOnAWTEvent. The behavior is added to the specified
Component. A null component can be passed to specify the behavior should
use listeners. Components can then be added to the behavior with the
addListener(Component c) method. Note that this behavior still needs a
transform group to work on (use setTransformGroup(tg)) and the transform
group must add this behavior.
Parameters: flags - interesting flags (wakeup conditions). since: Java 3D 1.2.1 |
getMode | public int getMode()(Code) | | Gets the mode
the mode the MouseRotate is in |
getXFactor | public double getXFactor()(Code) | | Return the x-axis movement multipler.
|
getYFactor | public double getYFactor()(Code) | | Return the y-axis movement multipler.
|
initialize | public void initialize()(Code) | | |
setFactor | public void setFactor(double factor)(Code) | | Set the x-axis amd y-axis movement multipler with factor.
|
setFactor | public void setFactor(double xFactor, double yFactor)(Code) | | Set the x-axis amd y-axis movement multipler with xFactor and yFactor
respectively.
|
setMode | public void setMode(int mode)(Code) | | Set the mode of this MoudeRotate.
Must be one of MODE_ALL, MODE_X, MMODE_Y, ODE_Z else an IllegalArgumentException is thrown.
Parameters: mode - |
setupCallback | public void setupCallback(MouseBehaviorCallback callback)(Code) | | The transformChanged method in the callback class will
be called every time the transform is updated
|
transformChanged | public void transformChanged(Transform3D transform)(Code) | | Users can overload this method which is called every time
the Behavior updates the transform
Default implementation does nothing
|
|
|
|