Search VisualAge for Java Information Go to Information Home Page Go to VisualAge for Java WWW Site

New Property Feature SmartGuide

Use the SmartGuide - New Property Feature window to add a new property feature. Method features are also added to get and set the property. If the property is readable, a get method feature is added, and if the property is writable, a set method feature is added.

If the property is indexed, it contains individually accessible elements. Get and set method features are added to access an element. These are in addition to the get and set method features for the property as a whole. Note that an array property can either be indexed or not. If it is not indexed, array elements are not accessible in the Visual Composition Editor.

If the property is bound, the propertyChange event and related method features are also added if they have not yet been added. The propertyChange event provides notification of property value changes.

If the property is constrained, the vetoableChange event and related method features are also added if they have not yet been added. The vetoableChange event provides notification of requested property value changes. If a listener of the vetoableChange event throws the PropertyVetoException, the property value change is not committed.

Fields

Property name
The name of the property feature. Enter a name for the feature.
Property type
The data type of the property. The type value is initially java.lang.String. If you need a different type, either enter a data type or select the Browse button to select a fully-qualified type. You can focus the type search by entering a partial type specification in the Property type field before you select the Browse button.
Readable
A readable property can report its value. This means that you can make a connection from the property to obtain its value. This option is initially selected.
Writeable
A writable property can have its value modified. This means that you can make a connection to the property to change its value. This option is initially selected.
Indexed
An indexed property contains individually accessible elements. This means that, if the property is readable and writable, you can make a connection to obtain or change the value of an element. This option is initially not selected.
bound
A bound property can report value changes. This means that you can make a connection from the property to obtain the new value whenever it is changed. VisualAge generates code to report the change using the propertyChange event. This option is initially selected if a BeanInfo class has been created for the bean.

If a property is not bound, you must associate an event with the source and target properties in connection settings to obtain the value change. VisualAge generates listener methods to get the source property value and set the target property when the event occurs. For example, if you want to obtain the text property value from a TextField bean when the Enter key is pressed, you can associate the actionPerformed event with the text source property and the target property.

constrained
A constrained property can have its value changes vetoed. This means that you can make a connection from the vetoableChange event to a method feature or code that could veto the proposed change. This option is initially not selected.


Related references
Generated Code
Class Qualification Dialog
Bean Information SmartGuide
BeanInfo Page Tool Bar
Features--BeanInfo Page