jsynoptic.plugins.jfreechart
Class StandardPlotShape

java.lang.Object
  extended by simtools.shapes.AbstractShape
      extended by jsynoptic.plugins.jfreechart.ChartShape
          extended by jsynoptic.plugins.jfreechart.StandardPlotShape
All Implemented Interfaces:
java.awt.Shape, java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, ContextualActionProvider, Linkable, Resizable, NamedProperties
Direct Known Subclasses:
AreaPlotShape, CyclicPlotShape, ParametricPlotShape

public class StandardPlotShape
extends ChartShape
implements ContextualActionProvider

Author:
nbrodu To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments
See Also:
Serialized Form

Nested Class Summary
protected static class StandardPlotShape.CbxEntry
           
 class StandardPlotShape.PlotPanel
           
 
Nested classes/interfaces inherited from class simtools.shapes.AbstractShape
AbstractShape.AbstractShapePropertiesNames
 
Field Summary
static java.util.ResourceBundle resources
           
 
Fields inherited from class jsynoptic.plugins.jfreechart.ChartShape
chart, chartRenderingInfo, link
 
Fields inherited from class simtools.shapes.AbstractShape
_h, _ox, _oy, _propertyNames, _w, _x, _y, ANTI_ALIASING, currentDialogBox, FONT_NAMES, listeners, REFRESH_PERIOD
 
Fields inherited from interface jsynoptic.base.ContextualActionProvider
EDITOR_CONTEXT, MOUSE_OUT_CONTEXT, MOUSE_OVER_CONTEXT, MOUSE_PRESSED_CONTEXT, SHAPELIST_CONTEXT, SOURCELIST_CONTEXT
 
Constructor Summary
StandardPlotShape(JFreeChart chart)
           
StandardPlotShape(JFreeChart chart, int ox, int oy, int width, int height)
           
 
Method Summary
 boolean canDoAction(double x, double y, java.lang.Object o, java.lang.String action, int context)
          Returns true if, and only if, it is possible to do the action right now
protected  AbstractShape cloneShape()
          Performs a copy of the shape This method has to be overriden to deal with concrete shapes
 boolean doAction(double x, double y, java.lang.Object o, java.lang.String action, javax.swing.undo.CompoundEdit undoableEdit)
          Do one of the actions previously declared by getAction.
 java.lang.String[] getActions(double x, double y, java.lang.Object o, int context)
          Return list of possible actions the contect information may be used, or not.
 
Methods inherited from class jsynoptic.plugins.jfreechart.ChartShape
chartChanged, debugContainer, draw, findTab, getLink, removeListener, resize, setLink, validateObject
 
Methods inherited from class simtools.shapes.AbstractShape
addListener, contains, contains, contains, contains, getAnchor, getBounds, getBounds2D, getInnerProperties, getMax, getMaxTranslated, getMin, getPathIterator, getPathIterator, getPropertyNames, getPropertyValue, intersects, intersects, notifyChange, notifyChange, refresh, setAnchor, setAnchor, setProperties, setPropertyValue, translate, wipeOff
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resources

public static java.util.ResourceBundle resources
Constructor Detail

StandardPlotShape

public StandardPlotShape(JFreeChart chart)

StandardPlotShape

public StandardPlotShape(JFreeChart chart,
                         int ox,
                         int oy,
                         int width,
                         int height)
Method Detail

getActions

public java.lang.String[] getActions(double x,
                                     double y,
                                     java.lang.Object o,
                                     int context)
Description copied from interface: ContextualActionProvider
Return list of possible actions the contect information may be used, or not.

Specified by:
getActions in interface ContextualActionProvider
Parameters:
x - Coordinate, mouse position in the same unit as contains(x,y)
y - Coordinate, mouse position in the same unit as contains(x,y)
o - Object the actions should work on. Possibly null => default or all actions
context - one of the context defined in the ContextualActionProvider class
Returns:
The list of possible actions, possibly null or an empty array

doAction

public boolean doAction(double x,
                        double y,
                        java.lang.Object o,
                        java.lang.String action,
                        javax.swing.undo.CompoundEdit undoableEdit)
Description copied from interface: ContextualActionProvider
Do one of the actions previously declared by getAction.

Specified by:
doAction in interface ContextualActionProvider
Parameters:
x - Coordinate, for example mouse position
y - Coordinate, for example mouse position
o - Object the action should work on.
action - An action returned by a previous getActions call with the same x, y, o parameters It may be null, in which case the default action is requested for this x,y,o.
undoableEdit - current edit for undo/redo operation If not null, this action is undoable.
Returns:
true if the action could be performed

canDoAction

public boolean canDoAction(double x,
                           double y,
                           java.lang.Object o,
                           java.lang.String action,
                           int context)
Description copied from interface: ContextualActionProvider
Returns true if, and only if, it is possible to do the action right now

Specified by:
canDoAction in interface ContextualActionProvider
Parameters:
x - Coordinate, for example mouse position
y - Coordinate, for example mouse position
o - Object the action should work on.
action - An action returned by a previous getActions call with the same x, y, o parameters It may be null, in which case the default action is requested for this x,y,o.
context - one of the context defined in the ContextualActionProvider class
Returns:
true if the action can be performed

cloneShape

protected AbstractShape cloneShape()
Description copied from class: AbstractShape
Performs a copy of the shape This method has to be overriden to deal with concrete shapes

Overrides:
cloneShape in class ChartShape
Returns:
a copy of the shape