org.opensourcephysics.display3d.core
Interface Group

All Superinterfaces:
Data, Element, InteractionSource
All Known Subinterfaces:
Set
All Known Implementing Classes:
Group, Set

public interface Group
extends Element, Data

Title: Group

Description: A Group is an element that is made of other elements

Version:
March 2005
Author:
Francisco Esquembre
See Also:
Element

Nested Class Summary
static class Group.Loader
           
 
Field Summary
 
Fields inherited from interface org.opensourcephysics.display3d.core.Element
TARGET_POSITION, TARGET_SIZE
 
Method Summary
 void addElement(Element element)
          Adds an Element to this Group.
 Element getElement(int index)
          Gets the elements of the group at a given index.
 java.util.List<Element> getElements()
          Gets the cloned list of Elements in the group.
 void removeAllElements()
          Removes all Elements from this Group
 void removeElement(Element element)
          Removes an Element from this Group
 
Methods 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, toSpaceFrame
 
Methods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource
addInteractionListener, getInteractionTarget, removeInteractionListener
 
Methods inherited from interface org.opensourcephysics.display.Data
getColumnNames, getData2D, getData3D, getDataList, getDatasets, getFillColors, getID, getLineColors, getName, setID
 

Method Detail

addElement

void addElement(Element element)
Adds an Element to this Group.

Parameters:
element - Element
See Also:
Element

removeElement

void removeElement(Element element)
Removes an Element from this Group

Parameters:
element - Element
See Also:
Element

removeAllElements

void removeAllElements()
Removes all Elements from this Group

See Also:
Element

getElements

java.util.List<Element> getElements()
Gets the cloned list of Elements in the group. (Should be synchronized.)

Returns:
cloned list

getElement

Element getElement(int index)
Gets the elements of the group at a given index.

Returns:
the given element (null if the index is not within allowed bounds)