|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uchicago.src.reflector.PropertyDescriptor
|
+--uchicago.src.reflector.BooleanPropertyDescriptor
Descriptor for a model's boolean properties/parameters. Using a BooleanPropertyDescriptor allows a boolean property to be represented as a on/off checkbox in the properties panel.
A BooleanPropertyDescriptor is typically setup in a model's constructor
as follows:
BooleanPropertyDescriptor bd1 = new BooleanPropertyDescriptor("RecordData",
false);
descriptors.put("RecordData", bd1);
This property descriptor describes the RecordData property/parameter of some model, and thus assumes that the model contains a setRecordData and a getRecordData or a isRecordData method. A BooleanPropertyDescriptor's constructor takes a the name of the boolean property, and the default state of that property, in this case false. The BooleanPropertyDescriptor is then placed in the hashtable "descriptors" (an ivar of the SimModelImpl class). When the model parameters are displayed in gui mode, the RecordData will then be displayed as a check box.
| Constructor Summary | |
BooleanPropertyDescriptor(String name,
boolean isSelected)
Creates a BooleanPropertyDescriptor for the specified property, and the specified selection state. |
|
| Method Summary | |
PropertyWidget |
getWidget()
Gets the widget associated with this property. |
| Methods inherited from class uchicago.src.reflector.PropertyDescriptor |
getName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BooleanPropertyDescriptor(String name,
boolean isSelected)
name - the name of the propertyisSelected - whether the checkbox representing the boolean
property should be selected or not by default.| Method Detail |
public PropertyWidget getWidget()
getWidget in class PropertyDescriptor
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||