|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.displayejs.AbstractInteractiveElement org.opensourcephysics.displayejs.InteractiveParticle
public class InteractiveParticle
An InteractiveParticle is an InteractiveElement that displays a RectangularShape
Field Summary | |
---|---|
static int |
ELLIPSE
|
static int |
NONE
|
static int |
RECTANGLE
|
static int |
ROUND_RECTANGLE
|
static int |
WHEEL
|
Fields inherited from class org.opensourcephysics.displayejs.AbstractInteractiveElement |
---|
SENSIBILITY |
Fields inherited from interface org.opensourcephysics.displayejs.InteractiveElement |
---|
TARGET_POSITION, TARGET_SIZE |
Constructor Summary | |
---|---|
InteractiveParticle()
Default constructor |
|
InteractiveParticle(int _type)
Constructor that accepts a given type. |
Method Summary | |
---|---|
void |
copyFrom(InteractiveElement _element)
|
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. |
boolean |
getPixelSize()
|
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 |
setPixelSize(boolean _s)
If true, the image is drawn as is, without resizing it |
void |
setSensitivity(int _s)
Sets the size of the interaction hot spot (in pixels). |
void |
setShapeType(int _type)
Set the type of the marker |
Methods inherited from class org.opensourcephysics.displayejs.AbstractInteractiveElement |
---|
addListener, canBeMeasured, getControl, getDataObject, getGroup, getResolution, getSensitivity, getSet, getSetIndex, getSizeX, getSizeY, getSizeZ, getStyle, getX, getY, getZ, initializeMemberOfSet, invokeActions, isEnabled, isEnabled, isGroupEnabled, isGroupEnabled, isMeasured, isVisible, needsToProject, removeAllListeners, removeListener, setControl, setDataObject, setEnabled, setEnabled, setGroup, setGroupEnabled, setGroupEnabled, setResolution, setSet, setSizeX, setSizeXY, setSizeXYZ, setSizeY, setSizeZ, setVisible, setX, setXY, setXYZ, setY, setZ, toXML |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int ELLIPSE
public static final int RECTANGLE
public static final int ROUND_RECTANGLE
public static final int WHEEL
Constructor Detail |
---|
public InteractiveParticle()
public InteractiveParticle(int _type)
Method Detail |
---|
public void copyFrom(InteractiveElement _element)
copyFrom
in interface InteractiveElement
copyFrom
in class AbstractInteractiveElement
public void setShapeType(int _type)
public void setPixelSize(boolean _s)
_s
- booleanpublic boolean getPixelSize()
public void setSensitivity(int _s)
InteractiveElement
setSensitivity
in interface InteractiveElement
setSensitivity
in class AbstractInteractiveElement
_s
- intpublic Interactive findInteractive(DrawingPanel _panel, int _xpix, int _ypix)
findInteractive
in interface Interactive
findInteractive
in class AbstractInteractiveElement
public Object3D[] getObjects3D(DrawingPanel3D _panel)
Drawable3D
getObjects3D
in interface Drawable3D
getObjects3D
in class AbstractInteractiveElement
public void draw(DrawingPanel3D _panel, java.awt.Graphics2D _g2, int _index)
Drawable3D
draw
in interface Drawable3D
draw
in class AbstractInteractiveElement
public void drawQuickly(DrawingPanel3D _panel, java.awt.Graphics2D _g2)
Drawable3D
drawQuickly
in interface Drawable3D
drawQuickly
in class AbstractInteractiveElement
public void draw(DrawingPanel _panel, java.awt.Graphics _g)
Drawable
draw
in interface Drawable
draw
in class AbstractInteractiveElement
public double getXMin()
Measurable
getXMin
in interface Measurable
getXMin
in class AbstractInteractiveElement
public double getXMax()
Measurable
getXMax
in interface Measurable
getXMax
in class AbstractInteractiveElement
public double getYMin()
Measurable
getYMin
in interface Measurable
getYMin
in class AbstractInteractiveElement
public double getYMax()
Measurable
getYMax
in interface Measurable
getYMax
in class AbstractInteractiveElement
public double getZMin()
Measurable3D
getZMin
in interface Measurable3D
getZMin
in class AbstractInteractiveElement
public double getZMax()
Measurable3D
getZMax
in interface Measurable3D
getZMax
in class AbstractInteractiveElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |