|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
backend.information.InformationModel
public class InformationModel
InformationModel is a model of all the information that the user would like to see about our program It takes InformationNuggets and stores them appropriatly. If a class extends InformationNugget then it is perfectly alright to add it to the InformationModel
Constructor Summary | |
---|---|
InformationModel()
InformationModel default constructor |
Method Summary | |
---|---|
void |
addNugget(InformationNugget addMe)
addNugget will add a nugget to the InformationModel |
InformationNugget |
getLastNuggetAdded()
getLastNuggetAdded will return the last nugget added to the InformationModel |
InformationNugget |
getLastNuggetRemoved()
getLastNuggetRemove returns the last nugget removed from the model |
InformationNugget |
getNugget(int index)
getNugget returns the nugget at the specified instance |
int |
getNuggetCount()
getNuggetCount returns the amount of nuggets we have stored |
void |
readNuggetsSphereFile(SphereFileReader myFileReader)
readNuggetsSphereFile will read information nuggets from a SphereFile and reset the InformationModel as well |
void |
removeNugget(InformationNugget removeMe)
removeNugget will remove a nugget from the InformationModel |
void |
reset()
reset the InformationModel |
void |
setAreaActual()
setAreaActual will change areas to be given just as you would expect. |
void |
setAreaPercent()
setAreaPercent will change areas to be computed as a percentage of total area of the sphere |
void |
setToDegrees()
The relevant information in the InformationModel will be set to degrees |
void |
setToRadians()
The relevent information in the InformationModel will be set to degrees |
void |
update(java.util.Observable arg0,
java.lang.Object arg1)
|
void |
writeNuggetsToFile(SphereFileWriter myFileWriter)
writeNuggetsToFile will write the nuggets in this file out to a SphereFileWriter |
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 |
---|
public InformationModel()
Method Detail |
---|
public void addNugget(InformationNugget addMe)
addMe
- is the nugget to add to the information modelpublic InformationNugget getLastNuggetAdded()
public void update(java.util.Observable arg0, java.lang.Object arg1)
update
in interface java.util.Observer
public void removeNugget(InformationNugget removeMe)
removeMe
- the nugget to removepublic int getNuggetCount()
public InformationNugget getNugget(int index)
index
- the nugget to work with
public InformationNugget getLastNuggetRemoved()
public void reset()
public void readNuggetsSphereFile(SphereFileReader myFileReader)
myFileReader
- the file to read information nuggets frompublic void writeNuggetsToFile(SphereFileWriter myFileWriter)
myFileWriter
- the SphereFileWriter to send the nuggets topublic void setToDegrees()
public void setToRadians()
public void setAreaPercent()
public void setAreaActual()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |