Properties, Methods, Events
The three most important features of a Java Bean are the set of properties it exposes, the set of methods it allows other components to call, and the set of events it fires.
Properties are read or written by calling methods specifically created for that purpose.
The methods of a Java Bean are just Java methods exposed by the class that implements the Bean. By default, all of a Bean's public methods will be exported, but a Bean can choose to export only a subset of its public methods.
Events provide a way for one component to notify other components that something interesting has happened.
Stuff about properties
- Accessor methods
Properties are always accessed via method calls on their owning object. For readable properties there will be a getter method and for writable properties there will be a setter method.
Properties can be computed values
example
- Indexed properties
Supports range of values
example
- Bound and constrained properties
example
top
Stuff about events
top