|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolo.PNode
edu.umd.cs.piccolo.PLayer
public class PLayer
PLayer is a node that can be viewed directly by multiple camera nodes. Generally child nodes are added to a layer to give the viewing cameras something to look at.
A single layer node may be viewed through multiple cameras with each camera using its own view transform. This means that any node (since layers can have children) may be visible through multiple cameras at the same time.
PCamera
,
PInputEvent
,
PPickPath
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class edu.umd.cs.piccolo.PNode |
---|
PNode.PSceneGraphDelegate |
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_CAMERAS
The property name that identifies a change in the set of this layer's cameras (see getCamera , getCameraCount , getCamerasReference ). |
static int |
PROPERTY_CODE_CAMERAS
|
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
PLayer()
|
Method Summary | |
---|---|
void |
addCamera(int index,
PCamera camera)
Add a camera to this layer's camera list at the specified index. |
void |
addCamera(PCamera camera)
Add a camera to this layer's camera list. |
PCamera |
getCamera(int index)
Get the camera in this layer's camera list at the specified index. |
int |
getCameraCount()
Get the number of cameras viewing this layer. |
java.util.List |
getCamerasReference()
Get the list of cameras viewing this layer. |
protected void |
notifyCameras(PBounds parentBounds)
|
PCamera |
removeCamera(int index)
Remove the camera at the given index from this layer's camera list. |
PCamera |
removeCamera(PCamera camera)
Remove the camera from this layer's camera list. |
void |
repaintFrom(PBounds localBounds,
PNode childOrThis)
Override repaints and forward them to the cameras that are viewing this layer. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_CAMERAS
getCamera
, getCameraCount
, getCamerasReference
). In
any property change event the new value will be a reference to the list
of cameras, but old value will always be null.
public static final int PROPERTY_CODE_CAMERAS
Constructor Detail |
---|
public PLayer()
Method Detail |
---|
public java.util.List getCamerasReference()
public int getCameraCount()
public PCamera getCamera(int index)
public void addCamera(PCamera camera)
public void addCamera(int index, PCamera camera)
public PCamera removeCamera(PCamera camera)
public PCamera removeCamera(int index)
public void repaintFrom(PBounds localBounds, PNode childOrThis)
repaintFrom
in class PNode
localBounds
- the bounds to repaintchildOrThis
- if childOrThis does not equal this then this nodes transform will be applied to the localBounds paramprotected void notifyCameras(PBounds parentBounds)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |