|
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
BaseAction is an abstract base class for the Java2D actions of JCChart 3D.
It implements the JCAction interface used for JCChart 3D actions. It defines
methods for starting, animating, ending and cancelling an action.
JCChart3dArea
will create an instance of the appropriate
JCAction
when an action is started, and will call
start()
, animate()
and end()
during
mouseDown()
, mouseDrag()
and
mouseUp()
respectively. The appropriate JCAction
is dependent on the event. A mapping from event to action type is stored
the chart's JCActionTable
JCAction
,
JCActionTable
,
Serialized FormField Summary | |
static int |
ANIMATING
|
protected com.klg.jclass.chart3d.JCChart3dArea |
chart3dArea
Parent object on which the action occurs. |
protected boolean |
enabled
Is this action enabled |
static int |
NONE
|
static int |
START
|
protected int |
status
|
Constructor Summary | |
BaseAction()
Constructs an action handler. |
Method Summary | |
abstract void |
animate(InputEvent event,
int x,
int y)
Called by JCChart3dArea when the action is to be animated. |
abstract void |
cancel()
Called by JCChart3dArea when the action is cancelled |
protected void |
drawPreview(double scale,
double horizShift,
double vertShift,
double xRotation,
double yRotation,
double zRotation,
int axisId,
int x,
int y,
boolean isRotation)
Draws either the preview cube or the full chart 3D depending on the value of the viewport's preview method. |
abstract void |
end(InputEvent event,
int x,
int y)
Called by JCChart3dArea when the action is over. |
com.klg.jclass.chart3d.JCChart3d |
getChart3d()
Return the JClass Chart 3D object with which this action handler is associated. |
com.klg.jclass.chart3d.JCChart3dArea |
getChart3dArea()
Returns the parent JCChart3dArea object |
void |
initialize(Object object)
Called by JCChart3dArea when the action is initialized. |
boolean |
isEnabled()
Is this action handler enabled? |
abstract void |
reanimate(int x,
int y)
Called by JCChart3dArea when the chart area has been refreshed
and the animation must be redrawn. |
void |
setChart3dArea(com.klg.jclass.chart3d.JCChart3dArea chart3dArea)
Sets the parent JCChart3dArea object |
void |
setEnabled(boolean enabled)
Sets whether this action handler is enabled |
abstract void |
start(InputEvent event,
int x,
int y)
Called by JCChart3dArea when the action is started. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NONE
public static final int START
public static final int ANIMATING
protected com.klg.jclass.chart3d.JCChart3dArea chart3dArea
protected boolean enabled
protected int status
Constructor Detail |
public BaseAction()
JCChart3dArea
instance so this needs to be set later.
Method Detail |
public void setChart3dArea(com.klg.jclass.chart3d.JCChart3dArea chart3dArea)
setChart3dArea
in interface JCAction
chart3dArea
- The new JCChart3dArea objectpublic com.klg.jclass.chart3d.JCChart3dArea getChart3dArea()
getChart3dArea
in interface JCAction
public void setEnabled(boolean enabled)
enabled
- Is this action handler enabled?public boolean isEnabled()
protected void drawPreview(double scale, double horizShift, double vertShift, double xRotation, double yRotation, double zRotation, int axisId, int x, int y, boolean isRotation)
scale
- The scale of the preview cubehorizShift
- The horizontal shift of the preview cubevertShift
- The vertical shift of the preview cubexRotation
- The x rotation angle to draw the preview cubeyRotation
- The y rotation angle to draw the preview cubezRotation
- The z rotation angle to draw the preview cubeaxisId
- The type of rotationx
- The current mouse x position (needed for EYE rotations)y
- The current mouse y position (needed for EYE rotations)isRotation
- Is the current action a rotation?public void initialize(Object object)
JCAction
JCChart3dArea
when the action is initialized.
initialize
in interface JCAction
object
- Initialization parameterspublic abstract void start(InputEvent event, int x, int y)
JCChart3dArea
when the action is started.
start
in interface JCAction
event
- The event for the actionx
- The x position to start the actiony
- The y position to start the actionpublic abstract void animate(InputEvent event, int x, int y)
JCChart3dArea
when the action is to be animated.
animate
in interface JCAction
event
- The event for the actionx
- The current x position to animate the actiony
- The current y position to animate the actionpublic abstract void reanimate(int x, int y)
JCChart3dArea
when the chart area has been refreshed
and the animation must be redrawn.
reanimate
in interface JCAction
x
- The x position to re-animate the actiony
- The y position to re-animate the actionpublic abstract void end(InputEvent event, int x, int y)
JCChart3dArea
when the action is over.
end
in interface JCAction
event
- The event for the actionx
- The x position to end the actiony
- The y position to end the actionpublic abstract void cancel()
JCChart3dArea
when the action is cancelled
cancel
in interface JCAction
public com.klg.jclass.chart3d.JCChart3d getChart3d()
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |