|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectObservable
visualmodeler.ResourceModel
ResourceModels stores and creates the resource objects
Constructor Summary | |
ResourceModel()
Allocates a new ResourceModel object |
Method Summary | |
void |
createResource(int num,
boolean random)
Creates resources based on a specific number |
String |
generateCode(String indent)
Generates a specific Java code for the creation of grid resources |
Vector |
getAllResourceName()
Gets the name of all resources |
int |
getResourceCounter()
Gets the resource counter |
int |
getTotalResource()
Gets the total number of resources |
boolean |
hasChanged()
Checks whether one of grid resource properties has changed or not |
void |
loadXml(org.w3c.dom.NodeList nodeList)
Loads a specific XML code regarding to grid resource |
void |
newValue()
Removes all previous values and starts from fresh |
void |
removeAllResource()
Removes all the resources available |
void |
removeResource(int index)
Removes a resource for a particular given location number |
String |
saveFile(String indent)
Saves grid resource properties into XML format |
void |
showProperty(int index)
Shows the property of a particular grid resource |
void |
showProperty(String value)
Shows the property of a particular grid resource |
Methods inherited from class Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, notifyObservers, notifyObservers, setChanged |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ResourceModel()
Method Detail |
public Vector getAllResourceName()
public int getResourceCounter()
public int getTotalResource()
public void createResource(int num, boolean random)
num
- number of resources to be createdrandom
- true if the resource properties need to be
random, false otherwisepublic void removeAllResource()
public void removeResource(int index)
index
- the location of a resource in the data structurepublic void showProperty(int index)
index
- the location of a resource in the data structurepublic void showProperty(String value)
value
- a grid resource namepublic String generateCode(String indent)
indent
- indentation
public String saveFile(String indent)
indent
- indentation
public boolean hasChanged()
public void newValue()
public void loadXml(org.w3c.dom.NodeList nodeList) throws Exception
nodeList
- a NodeList object
Exception
- if error occurs during loading XML
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |