|
||||||||||
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 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
The property code that identifies a change in the set of this layer's cameras (see getCamera , getCameraCount , getCamerasReference ). |
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
PLayer()
Creates a PLayer without any cameras attached to it. |
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. |
List |
getCamerasReference()
Get the list of cameras viewing this layer. |
protected void |
notifyCameras(PBounds parentBounds)
Dispatches repaint notification to all registered cameras. |
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 repaintSource)
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, toString, wait, wait, wait |
Field Detail |
---|
public static final 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
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.
Constructor Detail |
---|
public PLayer()
Method Detail |
---|
public List getCamerasReference()
public int getCameraCount()
public PCamera getCamera(int index)
index
- index of camera to fetch
public void addCamera(PCamera camera)
camera
- the camera to add to this layerpublic void addCamera(int index, PCamera camera)
index
- index at which the camera should be insertedcamera
- Camera to add to layerpublic PCamera removeCamera(PCamera camera)
camera
- the camera to remove from the layer, does nothing if not
found
public PCamera removeCamera(int index)
index
- the index of the camera we wish to remove
public void repaintFrom(PBounds localBounds, PNode repaintSource)
repaintFrom
in class PNode
localBounds
- bounds flagged as needing repaintingrepaintSource
- the source of the repaint notificationprotected void notifyCameras(PBounds parentBounds)
parentBounds
- bounds needing repainting in parent coordinate system
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |