Class Group
java.lang.Object
org.opensourcephysics.display3d.simple3d.Element
org.opensourcephysics.display3d.simple3d.Group
- All Implemented Interfaces:
Data,Element,Group,InteractionSource
- Direct Known Subclasses:
Set
Title: Group
Description: A Group is an element that is made of other elements.
The group's position, size, visibility and transformation do affect the elements in the group. The group's style doesn't, though.- Version:
- March 2005
- Author:
- Francisco Esquembre
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intan integer ID that identifies this objectFields 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 TypeMethodDescriptionvoidaddElement(Element element) Adds an Element to this Group.voidaddElements(Collection<Element> elements) String[]The column names to be used in the data display tooldouble[][]Gets a 2D array of data.double[][][]Gets a 3D array of data.Some Data objects (e.g., a Group) do not contain data, but a list of Data objects which do.Gets a list of OSP Datasets.getElement(int index) Gets the elements of the group at a given index.Gets the cloned list of Elements in the group.voidgetExtrema(double[] min, double[] max) Color[]Fill color to use for this dataintgetID()Returns a unique identifier for this Data.Color[]Line color to use for this datastatic XML.ObjectLoadergetTargetHit(int x, int y) Gets the target that is under the (x,y) position of the screenvoidRemoves all Elements from this GroupvoidremoveElement(Element element) Removes an Element from this GroupvoidsetID(int id) Sets the ID number of this Data.Methods 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
-
Field Details
-
datasetID
protected int datasetIDan integer ID that identifies this object
-
-
Constructor Details
-
Group
public Group()
-
-
Method Details
-
addElement
Description copied from interface:GroupAdds an Element to this Group.- Specified by:
addElementin interfaceGroup- Parameters:
element- Element- See Also:
-
addElements
-
removeElement
Description copied from interface:GroupRemoves an Element from this Group- Specified by:
removeElementin interfaceGroup- Parameters:
element- Element- See Also:
-
removeAllElements
public void removeAllElements()Description copied from interface:GroupRemoves all Elements from this Group- Specified by:
removeAllElementsin interfaceGroup- See Also:
-
getElements
Description copied from interface:GroupGets the cloned list of Elements in the group. (Should be synchronized.)- Specified by:
getElementsin interfaceGroup- Returns:
- cloned list
-
getElement
Description copied from interface:GroupGets the elements of the group at a given index.- Specified by:
getElementin interfaceGroup- Returns:
- the given element (null if the index is not within allowed bounds)
-
getExtrema
public void getExtrema(double[] min, double[] max) -
getTargetHit
Description copied from class:ElementGets the target that is under the (x,y) position of the screen- Overrides:
getTargetHitin classElement- Parameters:
x- inty- int- Returns:
- InteractionTarget
-
setID
public void setID(int id) Sets the ID number of this Data. -
getID
public int getID()Returns a unique identifier for this Data. -
getData2D
public double[][] getData2D()Description copied from interface:DataGets a 2D array of data. The first column, double[0][] often contains x-values; Remaining columns often contain y values. May return null if data not yet generated or object does not support 2D data. -
getData3D
public double[][][] getData3D()Description copied from interface:DataGets a 3D array of data. May return null if data not yet generated or object does not support 3D data. -
getColumnNames
Description copied from interface:DataThe column names to be used in the data display tool- Specified by:
getColumnNamesin interfaceData- Returns:
- an array of names
-
getLineColors
Description copied from interface:DataLine color to use for this data- Specified by:
getLineColorsin interfaceData- Returns:
- a color
-
getFillColors
Description copied from interface:DataFill color to use for this data- Specified by:
getFillColorsin interfaceData- Returns:
- a color
-
getDataList
Description copied from interface:DataSome Data objects (e.g., a Group) do not contain data, but a list of Data objects which do. This method is used by Data displaying tools to create as many pages as needed.- Specified by:
getDataListin interfaceData- Returns:
- a list of Data objects, or null if this object contains data
-
getDatasets
Description copied from interface:DataGets a list of OSP Datasets. May return null if data not yet generated or object does not support Datasets.- Specified by:
getDatasetsin interfaceData- Returns:
- list of Datasets
-
getLoader
-