| In addition to its superclass this class provides a bound
read-only property composerEnabled that is true
if and only if the underlying Album is non-null and classical.
This property is intended to be used by a variety of presentation properties,
not just a component's enabled state. You can enable or disable
a composer presentation, or switch a composer field's editable
property, or to hide and show a larger composer editor section.
I've added the composerEnabled property primarily for learning
and demonstration purposes. And I wanted to closely follow the example
used in Martin Fowler's description of the
Presentation
Model pattern. This example shows how "raw" domain object properties
can be aggregated or filtered by the presentation model layer for use in
the presentation layer. In cases where there's a direct mapping between
a raw property and the aggregated property used in the UI, it may be easier
to observe the raw property. But if this mapping becomes more complex
an aggregated property is recommended.
Note that a UI that buffers the classical property cannot use
composerEnabled but requires a separate aggregated property,
for example bufferedComposerEnabled. To keep this code close
to Fowler's original, I've implemented this feature in a subclass, see
com.jgoodies.binding.tutorial.manager.BufferedAlbumPresentationModel .
The buffered composer enabled property is an example where the eager
property aggregation adds overhead and complexity, and it may turn out
that using the buffered classical property would be easier to understand.
author: Karsten Lentzsch version: $Revision: 1.11 $ See Also: com.jgoodies.binding.tutorial.manager.BufferedAlbumPresentationModel |