Class ElementBox
java.lang.Object
org.opensourcephysics.display3d.simple3d.Element
org.opensourcephysics.display3d.simple3d.AbstractTile
org.opensourcephysics.display3d.simple3d.ElementBox
- All Implemented Interfaces:
Element,ElementBox,InteractionSource
- Direct Known Subclasses:
ElementObject
Title: ElementBox
Description: Painter's algorithm implementation of a Box
- Version:
- March 2005
- Author:
- Francisco Esquembre
-
Field Summary
Fields inherited from class org.opensourcephysics.display3d.simple3d.AbstractTile
corners, numberOfTilesFields inherited from class org.opensourcephysics.display3d.simple3d.Element
targetPosition, targetSizeFields inherited from interface org.opensourcephysics.display3d.core.Element
TARGET_POSITION, TARGET_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis will be used by subclasses whenever there is a need to recompute the actual values of the corners before drawing.static XML.ObjectLoaderReturns an XML.ObjectLoader to save and load object data.booleanWhether the box is closed at its bottom.booleanWhether the box is closed at its top.voidsetClosedBottom(boolean close) Whether the box should be closed at its bottom.voidsetClosedTop(boolean close) Whether the box should be closed at its top.Methods inherited from class org.opensourcephysics.display3d.simple3d.AbstractTile
getTargetHit, projectPoints, setColorBelowWhenEqual, setColorOriginAndDirection, setColorRegions, setCorners, setDrawQuickInteriorMethods inherited from class org.opensourcephysics.display3d.simple3d.Element
addInteractionListener, getAxesMode, getDrawingPanel3D, getHotSpotBodyCoordinates, getInteractionTarget, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isReallyVisible, isVisible, loadUnmutableObjects, removeInteractionListener, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensourcephysics.display3d.core.Element
getDrawingPanel3D, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isVisible, loadUnmutableObjects, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrameMethods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource
addInteractionListener, getInteractionTarget, removeInteractionListener
-
Constructor Details
-
ElementBox
public ElementBox()
-
-
Method Details
-
setClosedBottom
public void setClosedBottom(boolean close) Description copied from interface:ElementBoxWhether the box should be closed at its bottom.- Specified by:
setClosedBottomin interfaceElementBox- Parameters:
close- the desired value
-
isClosedBottom
public boolean isClosedBottom()Description copied from interface:ElementBoxWhether the box is closed at its bottom.- Specified by:
isClosedBottomin interfaceElementBox- Returns:
- the value
-
setClosedTop
public void setClosedTop(boolean close) Description copied from interface:ElementBoxWhether the box should be closed at its top.- Specified by:
setClosedTopin interfaceElementBox- Parameters:
close- the desired value
-
isClosedTop
public boolean isClosedTop()Description copied from interface:ElementBoxWhether the box is closed at its top.- Specified by:
isClosedTopin interfaceElementBox- Returns:
- the value
-
computeCorners
protected void computeCorners()Description copied from class:AbstractTileThis will be used by subclasses whenever there is a need to recompute the actual values of the corners before drawing. Synchronization is recomended.- Specified by:
computeCornersin classAbstractTile
-
getLoader
Returns an XML.ObjectLoader to save and load object data.- Returns:
- the XML.ObjectLoader
-