|
||||||||||
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.AbstractInteractiveTile org.opensourcephysics.displayejs.InteractiveCylinder
public class InteractiveCylinder
This class implements a general 3D Cylinder. The user can specify the three main axes for the Cylinder resultig, for instance in non-straight Cylinders. The Cylinder can be repositioned but cannot be resized.
for a simpler 3D Cylinder.
Field Summary | |
---|---|
static int |
USER_DEFINED
|
static int |
X_AXIS
|
static int |
Y_AXIS
|
static int |
Z_AXIS
|
Fields inherited from class org.opensourcephysics.displayejs.AbstractInteractiveElement |
---|
SENSIBILITY |
Fields inherited from interface org.opensourcephysics.displayejs.InteractiveElement |
---|
TARGET_POSITION, TARGET_SIZE |
Constructor Summary | |
---|---|
InteractiveCylinder()
Default constructor. |
|
InteractiveCylinder(int direction)
Constructor for a given direction. |
Method Summary | |
---|---|
void |
copyFrom(InteractiveElement _element)
|
Interactive |
findInteractive(DrawingPanel _panel,
int _xpix,
int _ypix)
|
int |
getDirection()
Get the element's main direction. |
int |
getMaxAngleU()
Gets the maximum angle used to build the top and bottom sides of the element. |
int |
getMinAngleU()
Gets the minimum angle used to build the top and bottom sides of the element. |
boolean |
isClosedBottom()
Whether the element is closed at its bottom. |
boolean |
isClosedLeft()
Whether the element is closed at its left side. |
boolean |
isClosedRight()
Whether the element is closed at its right side. |
boolean |
isClosedTop()
Whether the element is closed at its top. |
void |
setClosedBottom(boolean close)
Whether the element should be closed at its bottom. |
void |
setClosedLeft(boolean close)
Whether an incomplete element should be closed at its left side. |
void |
setClosedRight(boolean close)
Whether an incomplete element should be closed at its right side. |
void |
setClosedTop(boolean close)
Whether the element should be closed at its top. |
void |
setCustomAxes(double[] axesData)
Set custom axes for the element. |
void |
setDirection(int direction)
Sets the element's main direction. |
void |
setMaxAngleU(int angle)
Sets the maximum angle to build the top and bottom sides of the element. |
void |
setMinAngleU(int angle)
Sets the minimum angle to build the top and bottom sides of the element. |
Methods inherited from class org.opensourcephysics.displayejs.AbstractInteractiveTile |
---|
draw, draw, drawQuickly, GetDisplacementFactor, getObjects3D, getXMax, getXMin, getYMax, getYMin, getZMax, getZMin, setColorBelowWhenEqual, setColorOriginAndDirection, setColorRegions, setDisplacementFactor, setDrawQuickInterior, setOrigin, setTransformation, toBodyFrame, toSpaceFrame |
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, setSensitivity, 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 X_AXIS
public static final int Y_AXIS
public static final int Z_AXIS
public static final int USER_DEFINED
Constructor Detail |
---|
public InteractiveCylinder()
public InteractiveCylinder(int direction)
direction
- The direction for the sides of the Cylinder. Must be one of X_AXIS, Y_AXIS, or Z_AXIS.Method Detail |
---|
public void copyFrom(InteractiveElement _element)
copyFrom
in interface InteractiveElement
copyFrom
in class AbstractInteractiveTile
public void setMinAngleU(int angle)
angle
- the minimum anglepublic int getMinAngleU()
public void setMaxAngleU(int angle)
angle
- the maximum anglepublic int getMaxAngleU()
public void setClosedBottom(boolean close)
closed
- the desired valuepublic boolean isClosedBottom()
public void setClosedTop(boolean close)
closed
- the desired valuepublic boolean isClosedTop()
public void setClosedLeft(boolean close)
closed
- the desired valuepublic boolean isClosedLeft()
public void setClosedRight(boolean close)
closed
- the desired valuepublic boolean isClosedRight()
public void setDirection(int direction)
direction
- The direction for the sides of the element. Must be one of X_AXIS, Y_AXIS, or Z_AXIS.public int getDirection()
public void setCustomAxes(double[] axesData)
axesData
- an array of nine doubles, three for each of the axes.public Interactive findInteractive(DrawingPanel _panel, int _xpix, int _ypix)
findInteractive
in interface Interactive
findInteractive
in class AbstractInteractiveTile
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |