Suppose you define simpleString, the most basic
property useful for visual composition: readable, writable, and bound to
an event. VisualAge generates the following items:
- fieldSimpleString, a field of type
java.lang.String with default (package-private)
access
- propertyChange, a field of type
java.beans.PropertyChangeSupport declared as
protected transient
- getSimpleString( ) and
setSimpleString(java.lang.String) methods
- add- and
removePropertyChangeListener(java.beans.PropertyChangeListener)
methods
- firePropertyChange(java.lang.String,
java.lang.Object, java.lang.Object)
If simpleString is indexed, VisualAge also generates the
following items:
- getSimpleString(int)
- setSimpleString(int, java.lang.String)
Suppose you define an existing event set, action, for use in
your class using default values in the New Event Set SmartGuide.
VisualAge generates the following items:
- aActionListener, a field of type
java.awt.event.ActionListener declared as
protected transient
- add- and
removeActionListener(java.awt.event.ActionListener)
methods
- fireActionPerformed(java.awt.event.ActionEvent)
Suppose you define stringModified, a new listener event
specifically for your class. VisualAge generates the following
items:
- StringModifiedListener, an interface.
- StringModifiedEvent and
StringModifiedEventMulticaster classes.
- add- and
removeStringModifiedListener(StringModifiedListener) methods in the
class being edited.
- A listener method stub, for example,
signalStringModification(StringModifiedEvent e). You must
enter a name for this stub yourself.
Generated Code
Generated BeanInfo Descriptor Code (an advanced topic)
Code Generated from Visually Composed Beans
How Generated Code Coexists with User-Written Code
Defining Bean Interfaces for Visual Composition
Example of Code Generated from Visual Composite
Beans for Visual Composition