jsynoptic.plugins.syn3d
Class View3DShape

java.lang.Object
  extended by simtools.shapes.AbstractShape
      extended by jsynoptic.plugins.syn3d.View3DShape
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable, ContextualActionProvider, Resizable, NamedProperties
Direct Known Subclasses:
Xith3DView3DShape

public abstract class View3DShape
extends AbstractShape
implements ContextualActionProvider, Resizable

Author:
Nicolas Brodu This JSynoptic shape can be included in a Synoptic, and provide a view to a 3D universe
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class simtools.shapes.AbstractShape
AbstractShape.AbstractShapePropertiesNames
 
Field Summary
protected  SynopticViewNode node
           
protected  boolean operating
           
protected  Plugin plugin
           
protected  boolean rotating
           
protected  boolean translating
           
protected  boolean zooming
           
 
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
View3DShape(Plugin plugin, int ox, int oy, int w, int h)
           
 
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
 boolean doAction(double x, double y, java.lang.Object o, java.lang.String action)
           
 void draw(java.awt.Graphics2D g)
          Draws the shape
 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.
 void notifyChange()
          Notify listeners that this shape has changed.
 void resize(int dx, int dy)
          Resize the component
 
Methods inherited from class simtools.shapes.AbstractShape
addListener, cloneShape, contains, contains, contains, contains, getAnchor, getBounds, getBounds2D, getInnerProperties, getMax, getMaxTranslated, getMin, getPathIterator, getPathIterator, getPropertyNames, getPropertyValue, intersects, intersects, notifyChange, refresh, removeListener, setAnchor, setAnchor, setProperties, setPropertyValue, translate, wipeOff
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jsynoptic.base.ContextualActionProvider
doAction
 

Field Detail

node

protected transient SynopticViewNode node

plugin

protected transient Plugin plugin

rotating

protected transient boolean rotating

zooming

protected transient boolean zooming

translating

protected transient boolean translating

operating

protected transient boolean operating
Constructor Detail

View3DShape

public View3DShape(Plugin plugin,
                   int ox,
                   int oy,
                   int w,
                   int h)
Parameters:
ox -
oy -
Method Detail

draw

public void draw(java.awt.Graphics2D g)
Description copied from class: AbstractShape
Draws the shape

Specified by:
draw in class AbstractShape
Parameters:
g - the graphics context

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)

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

resize

public void resize(int dx,
                   int dy)
Description copied from interface: Resizable
Resize the component

Specified by:
resize in interface Resizable
Parameters:
dx - value on x axis
dy - value on y axis

notifyChange

public void notifyChange()
Description copied from class: AbstractShape
Notify listeners that this shape has changed. This is called by the various subclasses when necessary. For example, when connected to dynamic data sources.

Overrides:
notifyChange in class AbstractShape