|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.chart3d.j2d.actions.BaseAction | +--com.klg.jclass.chart3d.j2d.actions.RotateAction
Handler object for rotate actions within JClass Chart 3D Java2D. When
a rotate action is started, JCChart3dArea
will create an
instance of RotateAction
and call start()
,
animate()
and end()
at appropriate points. A
mapping from event to action type is stored the chart's JCActionTable.
JCAction
,
JCActionTable
,
BaseAction
,
Serialized FormField Summary | |
protected int |
axisId
The id of the axis on which to base the rotation |
protected Point |
first
Point in chart area at which the rotate action was started. |
protected Point |
last
Last point used for rotation. |
protected double |
origXRotation
Original X rotation value in case this action is cancelled |
protected double |
origYRotation
Original Y rotation value in case this action is cancelled |
protected double |
origZRotation
Original Z rotation value in case this action is cancelled |
protected Matrix4d |
rotate
The rotation matrix used to extract the new rotation angles |
protected double |
xRotation
The current xRotation for this action |
protected double |
yRotation
The current yRotation for this action |
protected double |
zRotation
The current zRotation for this action |
Fields inherited from class com.klg.jclass.chart3d.j2d.actions.BaseAction |
ANIMATING, chart3dArea, enabled, NONE, START, status |
Constructor Summary | |
RotateAction()
Default constructor. |
|
RotateAction(int axisId)
Constructor which sets the axis on which to rotate. |
Method Summary | |
void |
animate(InputEvent event,
int x,
int y)
Called by JCChart3dArea when the action is to be
animated. |
void |
cancel()
Called by JCChart3dArea when the action is cancelled |
void |
end(InputEvent event,
int x,
int y)
Called by JCChart3dArea when the action is over. |
void |
extractAngles(Matrix4d m)
Extracts the rotation angles from a rotation matrix. |
double |
getXRotation()
Get the current x rotation angle |
double |
getYRotation()
Get the current y rotation angle |
double |
getZRotation()
Get the current z rotation angle |
void |
reanimate(int x,
int y)
Called by JCChartArea when the chart area has been
refreshed and the animation must be redrawn. |
void |
start(InputEvent event,
int x,
int y)
Called by JCChart3dArea when the action is started. |
Methods inherited from class com.klg.jclass.chart3d.j2d.actions.BaseAction |
drawPreview, getChart3d, getChart3dArea, initialize, isEnabled, setChart3dArea, setEnabled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Point first
protected Point last
protected double origXRotation
protected double origYRotation
protected double origZRotation
protected double xRotation
protected double yRotation
protected double zRotation
protected int axisId
protected Matrix4d rotate
Constructor Detail |
public RotateAction()
public RotateAction(int axisId)
axisId
- The id of the axis on which to base the rotationMethod Detail |
public double getXRotation()
public double getYRotation()
public double getZRotation()
public void extractAngles(Matrix4d m)
m
- The matrix from which rotation angles are extractedpublic void start(InputEvent event, int x, int y)
JCChart3dArea
when the action is started. For
the rotate action, this method sets a series of initial
values.
start
in interface JCAction
start
in class BaseAction
event
- The event for the actionx
- The x pixel position where rotation is startingy
- The y pixel position where rotation is startingpublic void animate(InputEvent event, int x, int y)
JCChart3dArea
when the action is to be
animated. For the rotate action, this method calculates
new rotation and elevation values for the chart area.
animate
in interface JCAction
animate
in class BaseAction
event
- The event for the actionx
- The x pixel position where the animation is happeningy
- The y pixel position where the animation is happeningpublic void reanimate(int x, int y)
JCChartArea
when the chart area has been
refreshed and the animation must be redrawn.
reanimate
in interface JCAction
reanimate
in class BaseAction
x
- The x pixel position where reanimation is happeningy
- The y pixel position where reanimation is happeningpublic void end(InputEvent event, int x, int y)
JCChart3dArea
when the action is over. Does nothing
for the rotate action.
end
in interface JCAction
end
in class BaseAction
event
- The event for the actionx
- The x pixel position where the user finished rotatingy
- The y pixel position where the user finished rotatingpublic void cancel()
JCChart3dArea
when the action is cancelled
cancel
in interface JCAction
cancel
in class BaseAction
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |