edu.umd.cs.jazz.scenegraph
Class ZDummyVisualComponent

java.lang.Object
  |
  +--edu.umd.cs.jazz.scenegraph.ZVisualComponent
        |
        +--edu.umd.cs.jazz.scenegraph.ZDummyVisualComponent

public class ZDummyVisualComponent
extends ZVisualComponent

ZDummyVisualComponent is the default Visual Component to all ZNodes. It serves as a placeholder until a ZNode has a real visual component. Using ZDummyVisualComponent allows us to 'decouple` ZNodes and Visual Components because a ZNode need not check if it contains a Visual Component before performing some operation on it (i.e. pick, paint, etc). There will always be a Visual Component (even if it's only a Dummy that does nothing). Also, the ZDummyVisualComponent is a singleton type object. Do not call the constructor directly. Use the getInstance method


Field Summary
protected static ZDummyVisualComponent instance
          Hang onto the one and only instance allowed to be created.
 
Fields inherited from class edu.umd.cs.jazz.scenegraph.ZVisualComponent
cacheVolatile, findable, findable_DEFAULT, isVolatile, localBounds, localBoundsDirty, parent, pickable, pickable_DEFAULT, selected
 
Constructor Summary
ZDummyVisualComponent()
          Do not call this method directly.
 
Method Summary
 void damage()
          always a noop
static ZDummyVisualComponent getInstance()
          Returns the one and only ZDummyVisualComponent
 boolean isPickable()
          always return false
 boolean isSelected()
          always return false
 boolean isVolatile()
          Always returns false
 void paint(ZRenderContext renderContext)
          always a noop
 boolean pick(java.awt.geom.Point2D pt)
          always a noop
 void select(ZCamera camera)
          always a noop
 void setPickable(boolean pickable)
          always a noop
 void setSelected(boolean b)
          always a noop
 void setVisualComponent(ZVisualComponent child)
          always a noop
 void setVolatile(boolean v)
          Always a noop
 void transformChanged(java.awt.geom.AffineTransform origTransform)
          always a noop
 void unselect()
          always a noop
 
Methods inherited from class edu.umd.cs.jazz.scenegraph.ZVisualComponent
clone, computeLocalBounds, damage, findNode, findVisualComponent, getLocalBounds, getParent, isFindable, pick, pickBounds, select, setFindable, setParent, setSelected, setState, toString, updateBounds, updateChildBounds, updateLocalBounds, updateVolatility, writeObject, writeObjectRecurse
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

instance

protected static ZDummyVisualComponent instance
Hang onto the one and only instance allowed to be created.
Constructor Detail

ZDummyVisualComponent

public ZDummyVisualComponent()
                      throws ZOperationNotAllowedException
Do not call this method directly. Use the static method getInstance
Throws:
ZOperationNotAllowedException - An attempt to create more than one ZDummyVisualComponent
See Also:
getInstance()
Method Detail

getInstance

public static ZDummyVisualComponent getInstance()
Returns the one and only ZDummyVisualComponent

isVolatile

public boolean isVolatile()
Always returns false
Overrides:
isVolatile in class ZVisualComponent

setVolatile

public void setVolatile(boolean v)
Always a noop
Parameters:
v -  
Overrides:
setVolatile in class ZVisualComponent

isSelected

public boolean isSelected()
always return false
Overrides:
isSelected in class ZVisualComponent

setSelected

public void setSelected(boolean b)
always a noop
Parameters:
b -  

isPickable

public boolean isPickable()
always return false
Overrides:
isPickable in class ZVisualComponent

setPickable

public void setPickable(boolean pickable)
always a noop
Parameters:
pickable -  
Overrides:
setPickable in class ZVisualComponent

select

public void select(ZCamera camera)
always a noop
Overrides:
select in class ZVisualComponent

unselect

public void unselect()
always a noop
Overrides:
unselect in class ZVisualComponent

paint

public void paint(ZRenderContext renderContext)
always a noop
Parameters:
g2 -  
Overrides:
paint in class ZVisualComponent

damage

public void damage()
always a noop
Overrides:
damage in class ZVisualComponent

pick

public boolean pick(java.awt.geom.Point2D pt)
always a noop
Parameters:
pt -  

setVisualComponent

public void setVisualComponent(ZVisualComponent child)
always a noop
Parameters:
child -  
Overrides:
setVisualComponent in class ZVisualComponent

transformChanged

public void transformChanged(java.awt.geom.AffineTransform origTransform)
always a noop
Parameters:
child -  
Overrides:
transformChanged in class ZVisualComponent