uchicago.src.reflector
Class BooleanPropertyDescriptor

java.lang.Object
  extended by uchicago.src.reflector.PropertyDescriptor
      extended by uchicago.src.reflector.BooleanPropertyDescriptor

public class BooleanPropertyDescriptor
extends PropertyDescriptor

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.

Version:
$Revision: 1.4 $ $Date: 2004/11/03 19:51:05 $
Author:
Nick Collier

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

BooleanPropertyDescriptor

public BooleanPropertyDescriptor(java.lang.String name,
                                 boolean isSelected)
Creates a BooleanPropertyDescriptor for the specified property, and the specified selection state.

Parameters:
name - the name of the property
isSelected - whether the checkbox representing the boolean property should be selected or not by default.