edu.umd.cs.piccolox.nodes
Class PClip

java.lang.Object
  extended by edu.umd.cs.piccolo.PNode
      extended by edu.umd.cs.piccolo.nodes.PPath
          extended by edu.umd.cs.piccolox.nodes.PClip
All Implemented Interfaces:
java.awt.print.Printable, java.io.Serializable, java.lang.Cloneable

public class PClip
extends PPath

PClip is a simple node that applies a clip before rendering or picking its children. PClip is a subclass of PPath, the clip applies is the GeneralPath wrapped by its super class. See piccolo/examples ClipExample.

Version:
1.0
Author:
Jesse Grosjean
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.umd.cs.piccolo.PNode
PNode.PSceneGraphDelegate
 
Field Summary
 
Fields inherited from class edu.umd.cs.piccolo.nodes.PPath
PROPERTY_CODE_PATH, PROPERTY_CODE_STROKE, PROPERTY_CODE_STROKE_PAINT, PROPERTY_PATH, PROPERTY_STROKE, PROPERTY_STROKE_PAINT
 
Fields inherited from class edu.umd.cs.piccolo.PNode
PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_CODE_BOUNDS, PROPERTY_CODE_CHILDREN, PROPERTY_CODE_CHILDREN_PICKABLE, PROPERTY_CODE_CLIENT_PROPERTIES, PROPERTY_CODE_FULL_BOUNDS, PROPERTY_CODE_PAINT, PROPERTY_CODE_PARENT, PROPERTY_CODE_PICKABLE, PROPERTY_CODE_TRANSFORM, PROPERTY_CODE_TRANSPARENCY, PROPERTY_CODE_VISIBLE, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE, SCENE_GRAPH_DELEGATE
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
PClip()
           
 
Method Summary
 PBounds computeFullBounds(PBounds dstBounds)
          Compute and return the full bounds of this node.
 boolean fullPick(PPickPath pickPath)
          Try to pick this node and all of its descendents.
protected  void paint(PPaintContext paintContext)
          Paint this node behind any of its children nodes.
protected  void paintAfterChildren(PPaintContext paintContext)
          Subclasses that wish to do additional painting after their children are painted should override this method and do that painting here.
 void repaintFrom(PBounds localBounds, PNode childOrThis)
          Pass the given repaint request up the tree, so that any cameras can invalidate that region on their associated canvas.
 
Methods inherited from class edu.umd.cs.piccolo.nodes.PPath
append, closePath, createEllipse, createLine, createPolyline, createPolyline, createRectangle, curveTo, endResizeBounds, getPathBoundsWithStroke, getPathReference, getStroke, getStrokePaint, internalUpdateBounds, intersects, lineTo, moveTo, paramString, quadTo, reset, setPathTo, setPathToEllipse, setPathToPolyline, setPathToPolyline, setPathToRectangle, setStroke, setStrokePaint, startResizeBounds, updateBoundsFromPath
 
Methods inherited from class edu.umd.cs.piccolo.PNode
addActivity, addAttribute, addChild, addChild, addChildren, addClientProperty, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToTransform, animateToTransparency, animateTransformToBounds, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, findIntersectingNodes, fireChildPropertyChange, firePropertyChange, fullIntersects, fullPaint, getAllNodes, getAllNodes, getAttribute, getAttribute, getBooleanAttribute, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperties, getClientProperty, getClientPropertyKeysEnumeration, getClientPropertyKeysIterator, getDoubleAttribute, getFullBounds, getFullBoundsInvalid, getFullBoundsReference, getGlobalBounds, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getHeight, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getPropertyChangeParentMask, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getVisible, getWidth, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, layoutChildren, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, moveInBackOf, moveInFrontOf, moveToBack, moveToFront, offset, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, position, print, print, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBounds, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, toImage, toImage, toImage, toString, transformBy, translate, validateFullBounds, validateFullPaint
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PClip

public PClip()
Method Detail

computeFullBounds

public PBounds computeFullBounds(PBounds dstBounds)
Description copied from class: PNode
Compute and return the full bounds of this node. If the dstBounds parameter is not null then it will be used to return the results instead of creating a new PBounds.

Overrides:
computeFullBounds in class PNode
Parameters:
dstBounds - if not null the new bounds will be stored here
Returns:
the full bounds in the parent coordinate system of this node

repaintFrom

public void repaintFrom(PBounds localBounds,
                        PNode childOrThis)
Description copied from class: PNode
Pass the given repaint request up the tree, so that any cameras can invalidate that region on their associated canvas.

Overrides:
repaintFrom in class PNode
Parameters:
localBounds - the bounds to repaint
childOrThis - if childOrThis does not equal this then this nodes transform will be applied to the localBounds param

paint

protected void paint(PPaintContext paintContext)
Description copied from class: PNode
Paint this node behind any of its children nodes. Subclasses that define a different appearance should override this method and paint themselves there.

Overrides:
paint in class PPath
Parameters:
paintContext - the paint context to use for painting the node

paintAfterChildren

protected void paintAfterChildren(PPaintContext paintContext)
Description copied from class: PNode
Subclasses that wish to do additional painting after their children are painted should override this method and do that painting here.

Overrides:
paintAfterChildren in class PNode
Parameters:
paintContext - the paint context to sue for painting after the children are painted

fullPick

public boolean fullPick(PPickPath pickPath)
Description copied from class: PNode
Try to pick this node and all of its descendents. Most subclasses should not need to override this method. Instead they should override pick or pickAfterChildren.

Overrides:
fullPick in class PNode
Parameters:
pickPath - the pick path to add the node to if its picked
Returns:
true if this node or one of its descendents was picked.


Copyright 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.

Web Accessibility