| Home >> All >> com >> jgoodies >> binding |
Package Samples:
com.jgoodies.binding.tests.beans: Contains test cases for the JGoodies Binding classes.
com.jgoodies.binding.tutorial.manager
com.jgoodies.binding.tutorial.basics
com.jgoodies.binding.tutorial
com.jgoodies.binding.tests.value
com.jgoodies.binding.tests.event
com.jgoodies.binding.tests
com.jgoodies.binding.extras
Classes:
ChangeTracker: Tracks changes in a set of bound bean properties. The tracker itself provides a read-only bound bean property changed that indicates whether one of the observed properties has changed. The changed state can be reset to false using #reset . The tracker can observe readable bound bean properties if and only if the bean provides the optional support for listening on named properties as described in section 7.4.5 of the Java Bean Secification . The bean class must provide the following pair of methods: public void addPropertyChangeListener(String name, PropertyChangeListener l); public void removePropertyChangeListener(String ...
AbstractVetoableValueModel: A ValueModel that allows to accept or reject proposed value changes. Useful to request information from the user or to perform operations before a value is changed. Wraps a given subject ValueModel and always returns the subject value as this model's value. Observes subject value changes and forwards them to listeners of this model. If a value is set to this model, the abstract method #proposedChange is invoked. In this method implementors define how to accept or reject value changes. Implementors may veto against a proposed change based on the application state or by asking the user, and may also ...
SpinnerAdapterFactory: A factory that vends javax.swing.SpinnerModel implementations that are bound to a ValueModel Can be used to bind a ValueModel to instances of javax.swing.JSpinner . To keep the ValueModel and SpinnerModel synchronized, this class listens to changes in both sides and updates the other silently, i.e. without firing a duplicate change event. Constraints: The ValueModel's type must be compatible with the type required by the referenced SpinnerModel. For example a javax.swing.SpinnerNumberModel requires Number values. Note: This class is not yet part of the binary Binding library; it comes with the ...
AlbumPresentationModel: 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 ...
AlbumManager: Holds a List of Albums and provides operations to add, delete and change a Album. Such a manager is often part of the domain layer. This manager holds the Albums in an ArrayListModel, so we can operate on a List and can expose it as a ListModel. As an alternative, a higher-level presentation model, such as the AlbumManagerModel could turn the List into a ListModel. In the latter case, you would then need to fire the required ListDataEvents. The AlbumManagerModel turns the List of Albums and the operations into a form that can be used in a user interface to display, select, and edit Albums. TODO: ...
DelegatingTableModel: This implementation of the TableModel interface delegates all requests to an underlying TableModel delegate. It can be used to change a JTable 's model while the table is beeing displayed. Note: This class is not yet part of the binary Binding library; it comes with the Binding distributions as an extra. The API is work in progress and may change without notice; this class may even be completely removed from future distributions. If you want to use this class, you may consider copying it into your codebase.
DelayedValueModel: A ValueModel that deferres value changes for a specified delay. Useful to coalesce frequent changes. For example if a heavy computation shall be performed only for a "stable" selection after a series of quick selection changes. Wraps a given subject ValueModel and returns the subject value or the value to be set as this model's value. Observes subject value changes and forwards them to listeners of this model. If a value is set to this model, a Swing Timer is used to delay the value commit to the subject. A previously started timer - if any - will be stopped before.
ListModelHolder: A com.jgoodies.binding.value.ValueHolder implementation that holds instances of javax.swing.ListModel and that is a ListModel itself. Note: This class is not yet part of the binary Binding library; it comes with the Binding distributions as an extra. The API is work in progress and may change without notice; this class may even be completely removed from future distributions. If you want to use this class, you may consider copying it into your codebase.
EditorCopyingExample: Builds an editor that copies data from the domain back and forth. This approach is known as the "copying" approach or "push/pull". The event handling used to enable and disable the composer text field is invoked by a ChangeListener that hooks into the classical check box. Note that this lacks the domain logic, where the composer is set to null if the classical property is set to false. This logic is deferred until the component values are written to the edited Album via #updateModel when OK is pressed.
AlbumManagerModel: Provides the models and Actions for managing and editing Albums. Works with an underlying AlbumManager that provides a ListModel for the Albums and operations to add, remove, and change a Album. In other words, this class turns the raw data and operations form the AlbumManager into a form usable in a user interface. This model keeps the Albums in a SelectionInList, refers to another PresentationModel for editing the selected Album, and provides Actions for the Album operations: add, remove and edit the selected Album.
CommitStylesExample: Demonstrates three different styles when to commit changes: on key typed, on focus lost, on OK/Apply pressed. Therefore we bind 3 JTextFields to 3 String typed ValueModels that honor the commit style. And we bind 3 JLabels directly to these ValueModels that display the current value. The ValueModels used in this example are requested from a PresentationModel that adapts text properties of a TextBean. This is just to demonstrate a consistent binding style. The same techniques work with any ValueModel.
AlbumEditorBuilder: Builds a form to display and edit Albums. The editor components are bound to the domain using BufferedValueModels returned by a PresentationModel that holds a Album. This PresentationModel is the AlbumManagerModel's 'albumEditorModel'. Whenever the AlbumManagerModel changes the selected Album, the PresentationModel updates its bean, in this case the Album.
TestBean: A Java Bean that provides a bunch of properties. The property types are: Object, boolean and int; the access types are: read-write, read-only and write-only. In addition, there's a property that doesn't check for changes - and may cause problems with event notification cycles. This class is intended to be used by the Binding unit test suite.
CustomBean: A Java Bean that provides a bunch of properties. The property types are: Object, boolean and int; the access types are: read-write, read-only and write-only. In addition, there's a property that doesn't check for changes - and may cause problems with event notification cycles. This class is intended to be used by the Binding unit test suite.
Album: Describes a musical Album and provides bound bean properties. This class is used throughout the different tutorial examples. This class has not been marked as final although it is not intended to be subclassed. However some persistency frameworks (like Hibernate) can optimize the data transfer and locking for extensible classes only.
MasterDetailsSelectionInListExample: Builds a list of Albums with an attached editor that edits the current list selection. The editor components are bound to the domain using ValueModels returned by a PresentationModel. The list with selection is held by a SelectionInList, and so, no separate selection listener is required.
EditorBufferedExample: Builds an editor with components bound to the domain object properties using buffered adapting ValueModels created by a PresentationModel. These buffers can be committed on 'Apply' and flushed on 'Reset'. A second set of components displays the domain object properties.
IndirectPropertyChangeSupportTest: A test case for class IndirectPropertyChangeSupport that checks whether listeners are added, removed and re-registered properly. Also tests the classes BeanAdapter and PresentationModel that use the IndirectPropertyChangeSupport directly or indirectly.
ReadWriteHierarchyBean: A Java Bean that inherits a property reader and provides the writer for that property. Can be used to property detection and access that is spread over different classes in a hierachy. This class is intended to be used by the Binding unit test suite.
UnobservableBeanWithNamedPCLSupport: An unobservable Java Bean that can add and remove PropertyChangeListeners for a named property but that lacks support for the general multicast PropertyChangeListeners. This class is intended to be used by the Binding unit test suite.
BeanWithPCLRemover: A Java Bean that can remove a PropertyChangeListener but cannot add one. It doesn't support bound properties, or in other words is unobservable. This class is intended to be used by the Binding unit test suite.
BeanWithPCLAdder: A Java Bean that can add a PropertyChangeListener but cannot remove one. It doesn't support bound properties, or in other words is unobservable. This class is intended to be used by the Binding unit test suite.
AlbumManagerExample: Builds a user interface for managing Albums using a table to display the Albums and buttons to add, edit, and delete the selected album. The models and Actions are provided by an underlying AlbumManagerModel.
AlbumEditorDialog: A dialog for editing a Album. Uses a AlbumEditorBuilder to build the editor form and just adds buttons to accept or cancel the edit. These buttons trigger a commit or flush in the dialog's PresentationModel.
CustomAccessBean: A Java Bean that provides a bunch of properties that are accessed via custom accessors that do not follow the Java Bean naming conventions. This class is intended to be used by the Binding unit test suite.
| Home | Contact Us | Privacy Policy | Terms of Service |