|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.displayejs.Group org.opensourcephysics.displayejs.GroupDrawable
public class GroupDrawable
Constructor Summary | |
---|---|
GroupDrawable()
|
Method Summary | |
---|---|
void |
add(InteractiveElement element)
Adds an element to the group |
void |
addListener(InteractionListener _listener)
Adds the specified interaction listener to receive interaction events to any of its targets from this source |
void |
draw(DrawingPanel3D _panel,
java.awt.Graphics2D _g2,
int _index)
Draws a given Object3D (indicated by its index). |
void |
draw(DrawingPanel _panel,
java.awt.Graphics _g)
Draws a representation of an object in a drawing panel. |
void |
drawQuickly(DrawingPanel3D _panel,
java.awt.Graphics2D _g2)
Sketches the drawable |
Interactive |
findInteractive(DrawingPanel _panel,
int _xpix,
int _ypix)
|
Object3D[] |
getObjects3D(DrawingPanel3D _panel)
Returns an array of Objects3D to (sort according to its distance and) draw. |
double |
getXMax()
Gets the maximum x needed to draw this object. |
double |
getXMin()
Gets the minimum x needed to draw this object. |
double |
getYMax()
Gets the maximum y needed to draw this object. |
double |
getYMin()
Gets the minimum y needed to draw this object. |
double |
getZMax()
Gets the maximum z needed to draw this object. |
double |
getZMin()
Gets the minimum z needed to draw this object. |
void |
invokeActions(InteractionEvent _event)
Invokes actions on all listeners with the prescribed event |
boolean |
isEnabled()
Whether any of the targets of this source is enabled |
boolean |
isEnabled(int _target)
Whether a particular target of this source is enabled |
boolean |
isMeasured()
Determines if information is available to set min/max values. |
void |
needsToProject(DrawingPanel _panel)
Tells the drawable that it should reproject its points because this panel has changed its projection parameters. |
void |
remove(InteractiveElement element)
removes an element from the group |
void |
removeAll()
|
void |
removeAllListeners()
Removes all the interaction listeners |
void |
removeListener(InteractionListener _listener)
Removes the specified interaction listener |
void |
setEnabled(boolean _enabled)
Enables all the targets of this source |
void |
setEnabled(int _target,
boolean _enabled)
Enables a particular target of this source |
Methods inherited from class org.opensourcephysics.displayejs.Group |
---|
getSizeX, getSizeY, getSizeZ, getX, getY, getZ, isVisible, reportChange, setSizeX, setSizeXY, setSizeXYZ, setSizeY, setSizeZ, setVisible, setX, setXY, setXYZ, setY, setZ |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display.Interactive |
---|
getX, getY, setX, setXY, setY |
Constructor Detail |
---|
public GroupDrawable()
Method Detail |
---|
public void add(InteractiveElement element)
_element
- the InteractiveElement to be addedpublic void remove(InteractiveElement element)
_element
- the InteractiveElement to be removedpublic void removeAll()
public void setEnabled(boolean _enabled)
InteractionSource
setEnabled
in interface Interactive
setEnabled
in interface InteractionSource
public boolean isEnabled()
InteractionSource
isEnabled
in interface Interactive
isEnabled
in interface InteractionSource
public void setEnabled(int _target, boolean _enabled)
InteractionSource
setEnabled
in interface InteractionSource
public boolean isEnabled(int _target)
InteractionSource
isEnabled
in interface InteractionSource
public Interactive findInteractive(DrawingPanel _panel, int _xpix, int _ypix)
findInteractive
in interface Interactive
public void needsToProject(DrawingPanel _panel)
Drawable3D
needsToProject
in interface Drawable3D
_panel
- the DrawingPanel that has changed or null if the drawable should update
its projection in all possible panelspublic Object3D[] getObjects3D(DrawingPanel3D _panel)
Drawable3D
getObjects3D
in interface Drawable3D
public void draw(DrawingPanel3D _panel, java.awt.Graphics2D _g2, int _index)
Drawable3D
draw
in interface Drawable3D
public void drawQuickly(DrawingPanel3D _panel, java.awt.Graphics2D _g2)
Drawable3D
drawQuickly
in interface Drawable3D
public void draw(DrawingPanel _panel, java.awt.Graphics _g)
Drawable
draw
in interface Drawable
public boolean isMeasured()
Measurable
isMeasured
in interface Measurable
public double getXMin()
Measurable
getXMin
in interface Measurable
public double getXMax()
Measurable
getXMax
in interface Measurable
public double getYMin()
Measurable
getYMin
in interface Measurable
public double getYMax()
Measurable
getYMax
in interface Measurable
public double getZMin()
Measurable3D
getZMin
in interface Measurable3D
public double getZMax()
Measurable3D
getZMax
in interface Measurable3D
public void addListener(InteractionListener _listener)
InteractionSource
addListener
in interface InteractionSource
InteractionListener
public void removeListener(InteractionListener _listener)
InteractionSource
removeListener
in interface InteractionSource
InteractionListener
public void removeAllListeners()
InteractionSource
removeAllListeners
in interface InteractionSource
public void invokeActions(InteractionEvent _event)
InteractionSource
invokeActions
in interface InteractionSource
InteractionEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |