backend.spheremodel
Class SphereBasicObject

java.lang.Object
  extended by java.util.Observable
      extended by backend.spheremodel.SphereBasicObject
Direct Known Subclasses:
SphereMultiPointBase, SphereParaTransModel, SpherePointModel

public abstract class SphereBasicObject
extends java.util.Observable

SphereBasicObject should be the base of anything that goes into the SphereWorldModel


Constructor Summary
SphereBasicObject()
          default SphereBasicObject constructor should be called
 
Method Summary
 void addChild(SphereBasicObject newChild)
          addChild will add a child to this SphereBasicObject
 SphereBasicObject getChild(int index)
          getChild will return the child at the appropriate index
 int getChildCount()
          getChildCount will return the amount of children this SphereBasicObject has at the moment.
 boolean getSelected()
          getSelected will return whether or not this object is selected
 boolean isBeingRemoved()
          Get whether this point is being removed or not
 boolean isHidden()
          isHidden will return whether this object is hidden or not
 void notifyFamily()
          notifyFamily should be called when this SphereBasicObject is going to be destroyed
 void removeChild(SphereBasicObject removeMe)
          removeChild will take away a child from the parent
 void setBeingRemoved()
          This should be set when the point is in the process of being removed it helps us avoid issues with parent updating.
 void setHidden(boolean newStatus)
          setHidden will change whether this is hidden or not.
 void setSelected(boolean selectMe)
          setSelected will this object to the selected state
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SphereBasicObject

public SphereBasicObject()
default SphereBasicObject constructor should be called

Method Detail

getChildCount

public int getChildCount()
getChildCount will return the amount of children this SphereBasicObject has at the moment.

Returns:
current number of kids

getChild

public SphereBasicObject getChild(int index)
getChild will return the child at the appropriate index

Parameters:
index - is the 0 based index to retrieve a child from
Returns:
a SphereBasicObject that is the child

addChild

public void addChild(SphereBasicObject newChild)
addChild will add a child to this SphereBasicObject

Parameters:
newChild - the child to add

removeChild

public void removeChild(SphereBasicObject removeMe)
removeChild will take away a child from the parent

Parameters:
removeMe - - the child to remove

setSelected

public void setSelected(boolean selectMe)
setSelected will this object to the selected state

Parameters:
selectMe - is the new state for this object to be selected or not

notifyFamily

public void notifyFamily()
notifyFamily should be called when this SphereBasicObject is going to be destroyed


getSelected

public boolean getSelected()
getSelected will return whether or not this object is selected

Returns:
true if selected false if it's not

setBeingRemoved

public void setBeingRemoved()
This should be set when the point is in the process of being removed it helps us avoid issues with parent updating. It is a one way street once changed you better remove it!


isBeingRemoved

public boolean isBeingRemoved()
Get whether this point is being removed or not

Returns:
true if it will be removed or false if it won't

isHidden

public boolean isHidden()
isHidden will return whether this object is hidden or not

Returns:
true if this object is hidden and false if it is not

setHidden

public void setHidden(boolean newStatus)
setHidden will change whether this is hidden or not. Additionally this function will automatically update all children as to what happened

Parameters:
newStatus - will set the new hidden status of this object. If one tried to set the status to what it already is then nothing will happen