|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.usc.cse.desi.generate.InputData
This class is called InputData because in many ways its functionality is similar to that of the InputData class in DeSi 1.0. It's job is to hold the data needed to generate a new system. At its heart are two mappings (Min & Max) from property names to Text boxes. Because all of the properties are specified synamically, this InputData must store the TextBox widgets that are created. Then when it is time for a simulation to be generated, it can go back to all of those widgets and get the values that the user has typed in.
| Field Summary | |
private org.eclipse.swt.widgets.Text |
myLevelOfDisconnect
|
private java.util.HashMap |
myMaxValues
|
private java.util.HashMap |
myMinValues
|
private org.eclipse.swt.widgets.Text |
myNumComps
|
private org.eclipse.swt.widgets.Text |
myNumHosts
|
| Constructor Summary | |
InputData()
|
|
| Method Summary | |
void |
addMaxWidget(java.lang.String prop_name,
org.eclipse.swt.widgets.Text text_box)
This method will associate a given Text widget with the given property name as being a Max value for that property. |
void |
addMinWidget(java.lang.String prop_name,
org.eclipse.swt.widgets.Text text_box)
|
double |
getLevelOfDisconnect()
Return the level of host disconnect as entered into the widget by the user. |
java.lang.String |
getMaxValue(java.lang.String prop_name)
Returns the Max value, in String form, for the given property as entered by the user. |
java.lang.String |
getMinValue(java.lang.String prop_name)
|
int |
getNumComps()
|
int |
getNumHosts()
Returns the number of hosts for the new system as specified in the Number of Hosts Text box. |
void |
setLevelOfDisconnectWidget(org.eclipse.swt.widgets.Text widget)
This method will store the widget that holds the user input for the level of host disconnect. |
void |
setNumCompsWidget(org.eclipse.swt.widgets.Text text_box)
|
void |
setNumHostWidget(org.eclipse.swt.widgets.Text text_box)
This object will hold on to a reference to the Number of Hosts text box so that when it's time to generate a sytem, it will read what the user has typed in. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.HashMap myMinValues
private java.util.HashMap myMaxValues
private org.eclipse.swt.widgets.Text myNumHosts
private org.eclipse.swt.widgets.Text myNumComps
private org.eclipse.swt.widgets.Text myLevelOfDisconnect
| Constructor Detail |
public InputData()
| Method Detail |
public void addMaxWidget(java.lang.String prop_name,
org.eclipse.swt.widgets.Text text_box)
prop_name - text_box -
public void addMinWidget(java.lang.String prop_name,
org.eclipse.swt.widgets.Text text_box)
prop_name - text_box - addMaxWidget(String, Text)public void setLevelOfDisconnectWidget(org.eclipse.swt.widgets.Text widget)
widget - Text - The widget.public void setNumHostWidget(org.eclipse.swt.widgets.Text text_box)
text_box - public void setNumCompsWidget(org.eclipse.swt.widgets.Text text_box)
text_box - setNumHostWidget(Text)
public int getNumHosts()
throws java.lang.NumberFormatException
java.lang.NumberFormatException - This exception is thrown if an invalid string is entered into field.
public int getNumComps()
throws java.lang.NumberFormatException
java.lang.NumberFormatExceptiongetNumHosts()
public double getLevelOfDisconnect()
throws java.lang.NumberFormatException
java.lang.NumberFormatExceptionpublic java.lang.String getMinValue(java.lang.String prop_name)
prop_name -
getMinValue(String)public java.lang.String getMaxValue(java.lang.String prop_name)
prop_name -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||