jsynoptic.plugins.syn3d
Class View3DShape
java.lang.Object
simtools.shapes.AbstractShape
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
Fields inherited from class simtools.shapes.AbstractShape |
_h, _ox, _oy, _propertyNames, _w, _x, _y, ANTI_ALIASING, currentDialogBox, FONT_NAMES, listeners, REFRESH_PERIOD |
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 |
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
View3DShape
public View3DShape(Plugin plugin,
int ox,
int oy,
int w,
int h)
- Parameters:
ox
- oy
-
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 actionscontext
- 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 positiony
- Coordinate, for example mouse positiono
- 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 axisdy
- 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