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
 ZNode findNode()
           
 java.lang.Object getAppData()
          Always returns false
static ZDummyVisualComponent getInstance()
          Returns the one and only ZDummyVisualComponent
 ZBounds getLocalBounds()
          always a noop
 float getMaxMag()
          always return 0
 float getMinMag()
          always returns 0
 ZScenegraphObject getParent()
          always return null
 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 setAppData(java.lang.Object data)
          Always a noop
 void setMaxMag(float maxMag)
          always a noop
 void setMinMag(float minMag)
          always a noop
 void setParent(ZScenegraphObject parent)
          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 unselect()
          always a noop
 void updateBounds()
          always a noop
 void updateChildBounds()
          always a noop
 void updateLocalBounds()
          always a noop
 
Methods inherited from class edu.umd.cs.jazz.scenegraph.ZVisualComponent
clone, computeLocalBounds, damage, findVisualComponent, isFindable, pick, pickBounds, select, setFindable, setSelected, setState, toString, 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

findNode

public ZNode findNode()
Overrides:
findNode in class ZVisualComponent

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

getAppData

public java.lang.Object getAppData()
Always returns false

setAppData

public void setAppData(java.lang.Object data)
Always a noop
Parameters:
data -  

getMinMag

public float getMinMag()
always returns 0

setMinMag

public void setMinMag(float minMag)
always a noop
Parameters:
minMag -  

getMaxMag

public float getMaxMag()
always return 0

setMaxMag

public void setMaxMag(float maxMag)
always a noop
Parameters:
maxMag -  

isSelected

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

setSelected

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

getParent

public ZScenegraphObject getParent()
always return null
Overrides:
getParent in class ZVisualComponent

setParent

public void setParent(ZScenegraphObject parent)
always a noop
Parameters:
parent -  
Overrides:
setParent in class ZVisualComponent

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

updateBounds

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

updateChildBounds

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

updateLocalBounds

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

getLocalBounds

public ZBounds getLocalBounds()
always a noop
Overrides:
getLocalBounds 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