|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.reflector.PropertyDescriptor
uchicago.src.reflector.BooleanPropertyDescriptor
public class 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.
This class's widget is a PropertyCheckBox.
| Field Summary |
|---|
| Fields inherited from class uchicago.src.reflector.PropertyDescriptor |
|---|
widget |
| Constructor Summary | |
|---|---|
BooleanPropertyDescriptor(java.lang.String name,
boolean isSelected)
Creates a BooleanPropertyDescriptor for the specified property, and the specified selection state. |
|
| Method Summary |
|---|
| Methods inherited from class uchicago.src.reflector.PropertyDescriptor |
|---|
getName, getWidget |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BooleanPropertyDescriptor(java.lang.String name,
boolean isSelected)
name - the name of the propertyisSelected - whether the checkbox representing the boolean
property should be selected or not by default.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||