JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d.j2d.actions
Class EditAction

java.lang.Object
  |
  +--com.klg.jclass.chart3d.j2d.actions.BaseAction
        |
        +--com.klg.jclass.chart3d.j2d.actions.EditAction
All Implemented Interfaces:
JCAction, Serializable

public class EditAction
extends BaseAction

Handler object for edit actions within JClass Chart 3D Java2D. When a edit action is started, JCChart3dArea will create an instance of EditAction and call start(), animate() and end() at appropriate points. A mapping from event to action type is stored the chart's JCActionTable.

See Also:
JCAction, JCActionTable, BaseAction, Serialized Form

Field Summary
protected  com.klg.jclass.chart3d.Chart3dData data
          Points to the data object whose data is being edited.
protected  com.klg.jclass.chart3d.Chart3dDataView dataView
          The dataview whose data is being edited
protected  com.klg.jclass.chart3d.JCData3dIndex index
          Data index (either (x, y) or (series, point)) pointing to the data point being edited.
protected  double origZValue
          Save in case cancel is called
protected  Point p
          Current point
 
Fields inherited from class com.klg.jclass.chart3d.j2d.actions.BaseAction
ANIMATING, chart3dArea, enabled, NONE, START, status
 
Constructor Summary
EditAction()
          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 JCChart3dArea when the action is over.
 void reanimate(int x, int y)
          Called by JCChar3dtArea 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

dataView

protected com.klg.jclass.chart3d.Chart3dDataView dataView
The dataview whose data is being edited


data

protected com.klg.jclass.chart3d.Chart3dData data
Points to the data object whose data is being edited.


index

protected com.klg.jclass.chart3d.JCData3dIndex index
Data index (either (x, y) or (series, point)) pointing to the data point being edited.


p

protected Point p
Current point


origZValue

protected double origZValue
Save in case cancel is called

Constructor Detail

EditAction

public EditAction()
Default constructor.

Method Detail

start

public void start(InputEvent event,
                  int x,
                  int y)
Called by JCChart3dArea when the action is started. For the edit action, this method picks a point to be edited.

Specified by:
start in interface JCAction
Specified by:
start in class BaseAction
Parameters:
event - The event for the action
x - The x position of the event
y - The y position of the event

animate

public void animate(InputEvent event,
                    int x,
                    int y)
Called by JCChartArea when the action is to be animated. For the edit action, this method calls the showEdit() method on the drawable. This technique allows bar charts and line charts to show data editing differently.

Specified by:
animate in interface JCAction
Specified by:
animate in class BaseAction
Parameters:
event - The event for the action
x - The x position of the event
y - The y position of the event

reanimate

public void reanimate(int x,
                      int y)
Called by JCChar3dtArea when the chart area has been refreshed and the animation must be redrawn.

Specified by:
reanimate in interface JCAction
Specified by:
reanimate in class BaseAction
Parameters:
x - The x position of the event
y - The y position of the event

end

public void end(InputEvent event,
                int x,
                int y)
Called by JCChart3dArea when the action is over. For the edit action, this method calls endEdit() on the drawable, then edits the point. Note that currently, points can only be edited in the z direction.

Specified by:
end in interface JCAction
Specified by:
end in class BaseAction
Parameters:
event - The event for the action
x - The x position of the event
y - The y position of the event

cancel

public void cancel()
Called by JCChart3dArea when the action is cancelled

Specified by:
cancel in interface JCAction
Specified by:
cancel in class BaseAction

Copyright © 2004 Quest Software Inc..
All rights reserved.