|
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.TranslateAction
Handler object for translate actions within JClass Chart 3D Java2D. When
a translate action is started, JCChart3dArea
will create an
instance of TranslateAction
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 Point |
first
Point at which the translate action started. |
protected double |
horizontalShift
The current horizontal shift for this action |
protected Point |
last
Last point used to do translationg |
protected double |
origHorizontalShift
The original horizontal shift in case a cancel happens |
protected double |
origVerticalShift
The original vertical shift in case a cancel happens |
protected double |
verticalShift
The current vertical shift for this action |
Fields inherited from class com.klg.jclass.chart3d.j2d.actions.BaseAction |
ANIMATING, chart3dArea, enabled, NONE, START, status |
Constructor Summary | |
TranslateAction()
Default constructor. |
Method Summary | |
void |
animate(InputEvent event,
int x,
int y)
Called by JCChartArea 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 JCChartA3drea when the action is over. |
void |
reanimate(int x,
int y)
Called by JCChart3dArea 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 horizontalShift
protected double verticalShift
protected double origHorizontalShift
protected double origVerticalShift
Constructor Detail |
public TranslateAction()
Method Detail |
public void start(InputEvent event, int x, int y)
JCChart3dArea
when the action is started.
For the translate action, this method stores the initial point and the
original horizontal and vertical shift (in case of a cancel action).
start
in interface JCAction
start
in class BaseAction
event
- The event for the actionx
- The x pixel position where translation is startingy
- The y pixel position where translation is startingpublic void animate(InputEvent event, int x, int y)
JCChartArea
when the action is to be animated. For
the translate action, this method moves the horizontal and vertical shifts
relative to the distance from the last point.
animate
in interface JCAction
animate
in class BaseAction
event
- The event for the actionx
- The x pixel position where animation is happeningy
- The y pixel position where animation is happeningpublic void reanimate(int x, int y)
JCChart3dArea
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)
JCChartA3drea
when the action is over. This
method does nothing for translate actions.
end
in interface JCAction
end
in class BaseAction
event
- The event for the actionx
- The x pixel position where the user finished translatingy
- The y pixel position where the user finished translatingpublic 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 |