public class World extends Group
A world maintains a list of views in which it is drawn. When a world must be redrawn, it requests a repaint of its views.
A world maintains a set of selected nodes. The selected set of a world is updated when (1) a node is added/removed to/from a world or any group that is part of a world, or (2) a node in a world is selected or deselected.
Constructor and Description |
---|
World() |
Modifier and Type | Method and Description |
---|---|
void |
clearSelected()
Deselects all selected nodes in this world.
|
void |
clearSelectedExcept(Selectable nodeToIgnore)
Deselects all selected nodes in this world, except the specified node.
|
int |
countSelected()
Returns the number of selected nodes in this world.
|
int |
countViews()
Returns the number of views of this world.
|
void |
dirtyBoundingSphere()
Marks dirty the bounding sphere of this world.
|
void |
dirtyDraw()
Marks dirty the drawing of this world.
|
java.util.Iterator<Node> |
getSelected()
Gets an iterator for selected nodes in this world.
|
java.util.Iterator<View> |
getViews()
Gets an iterator for the views of this world.
|
World |
getWorld()
Gets the world for this node.
|
void |
repaint()
Requests a repaint of all view canvases of all views of this world.
|
addChild, computeBoundingSphere, countChildren, cull, draw, getAttributeBits, getChildren, pick, removeChild
countParents, cullApply, cullBegin, cullEnd, drawApply, drawBegin, drawEnd, getBoundingSphere, getParents, getStates, isSelected, pickApply, pickBegin, pickEnd, selectedChanged, setSelected, setStates
public int countViews()
public java.util.Iterator<View> getViews()
public int countSelected()
public java.util.Iterator<Node> getSelected()
public void clearSelected()
public void clearSelectedExcept(Selectable nodeToIgnore)
nodeToIgnore
- the node to ignore. The selected state of this
node will not be changed.public void dirtyDraw()
public void dirtyBoundingSphere()
dirtyBoundingSphere
in class Node
public void repaint()
public World getWorld()
Node.getWorld()
to simply return this world.