public class VertexList<P extends VertexComponent> extends RenderableComponentList<P> implements ScalableUnits
ModelComponent.NavpanelVisibility
CompositeComponent.NavpanelDisplay
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_SELECTABLE |
static PropertyList |
myProps |
DEFAULT_NAVPANEL_DISPLAY
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
VertexList(java.lang.Class<P> type,
java.lang.String name,
java.lang.String shortName) |
Modifier and Type | Method and Description |
---|---|
RenderProps |
createRenderProps()
Factory method to create render properties appropriate to this object.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
void |
getSelection(java.util.LinkedList<java.lang.Object> list,
int qid)
Append to
list the component (or components) associated with
the qid -th selection query issued by this component's render
method. |
void |
invalidateRenderObject() |
boolean |
isSelectable()
Returns true if this object is in fact selectable.
|
void |
notifyParentOfChange(ComponentChangeEvent e)
Notifies the parent of this component (if any) of changes within in its
descendants.
|
int |
numSelectionQueriesNeeded()
If this selectable manages its own selection (by issuing selection
queries within its
render method), then this method should
return the maximum number of selection queries that will be
required. |
void |
prerender(RenderList list)
Called prior to rendering to allow this object to update the internal
state required for rendering (such as by caching rendering coordinates).
|
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
boolean |
rendersSubComponents()
Queries if this list automatically renders any subcomponents which do
not have their own render props.
|
void |
scaleDistance(double s)
Scales all distance coordinates.
|
void |
scaleMass(double s)
Scales all mass units.
|
void |
setSelectable(boolean enable) |
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
getRenderHints, getRenderProps, setRenderProps
add, add, addAll, addComponents, addFixed, addNumbered, clear, clone, componentChanged, contains, contains, containsAll, copy, ensureCapacity, findComponent, get, get, getByNumber, getChildren, getNavpanelDisplay, getNumberLimit, getOneBasedNumbering, getParameterType, getShortName, hasChildren, hasParameterizedType, hierarchyContainsReferences, indexOf, invalidateNumbers, isEditable, isEmpty, iterator, nextComponentNumber, numComponents, postscan, remove, remove, removeAll, removeAll, removeComponents, resetNumbersToIndices, retainAll, scan, set, setEditable, setNavpanelDisplay, setNumbered, setOneBasedNumbering, setShortName, size, toArray, toArray, updateNameMap
checkFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasState, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contains, get, get, getByNumber, getName, getShortName, indexOf, iterator, nextComponentNumber, size
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
postscan
isWritable, write
public static boolean DEFAULT_SELECTABLE
public static PropertyList myProps
public VertexList(java.lang.Class<P> type, java.lang.String name, java.lang.String shortName)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class RenderableComponentList<P extends VertexComponent>
public RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface RenderableComponentListView<P extends VertexComponent>
createRenderProps
in interface HasRenderProps
createRenderProps
in class RenderableComponentList<P extends VertexComponent>
public void invalidateRenderObject()
public void prerender(RenderList list)
IsRenderable
list.addIfVisible (obj);
for each of the objects in question.prerender
in interface IsRenderable
prerender
in class RenderableComponentList<P extends VertexComponent>
list
- list of objects to be renderedpublic void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
render
in class RenderableComponentList<P extends VertexComponent>
renderer
- provides the functionality used to perform the rendering.flags
- flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT
and
Renderer.SORT_FACES
.public boolean rendersSubComponents()
RenderableComponentList
rendersSubComponents
in class RenderableComponentList<P extends VertexComponent>
true
if this list renders subcomponents
without render propspublic boolean isSelectable()
isSelectable
in interface IsSelectable
isSelectable
in class RenderableComponentList<P extends VertexComponent>
public void setSelectable(boolean enable)
public int numSelectionQueriesNeeded()
IsSelectable
render
method), then this method should
return the maximum number of selection queries that will be
required. Otherwise, this method should return -1.numSelectionQueriesNeeded
in interface IsSelectable
numSelectionQueriesNeeded
in class RenderableComponentList<P extends VertexComponent>
public void getSelection(java.util.LinkedList<java.lang.Object> list, int qid)
IsSelectable
list
the component (or components) associated with
the qid
-th selection query issued by this component's render
method. This will only be called if this component manages its own
selection (i.e., the number nums
returned by IsSelectable.numSelectionQueriesNeeded()
is positive), and qid
will in
turn be a number between 0 and nums
-1.getSelection
in interface IsSelectable
getSelection
in class RenderableComponentList<P extends VertexComponent>
list
- selected objects are appended to the end of this listqid
- index of the selection querypublic void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
s
- scaling factorpublic void scaleMass(double s)
ScalableUnits
scaleMass
in interface ScalableUnits
s
- scaling factorpublic void notifyParentOfChange(ComponentChangeEvent e)
ModelComponentBase
componentChanged
method.notifyParentOfChange
in interface ModelComponent
notifyParentOfChange
in class ModelComponentBase
e
- optional argument giving specific information about the changepublic void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderable
updateBounds
in interface IsRenderable
updateBounds
in class RenderableComponentList<P extends VertexComponent>
pmin
- minimum pointpmax
- maximum point