Package com.ribs
Class RBListBinder
java.lang.Object
com.ribs.RBListBinder
- All Implemented Interfaces:
EventListener
,ListSelectionListener
This class manages a list of objects provided by a rib file's owner to facilitate binding to UI controls.
It provides access to the list, to the currently selected object and a list selection model. Binders can also be
chained, so that a binder can get a sublist from another binder's selected object.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
List Model implementation for lists using bind key. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when binder's source list has changed.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.static RBListBinder
getBinder
(JComponent aComponent) Returns the binder for a given component.Returns the bind key for this binder.getList()
Return the list that this binder is brokering.Returns the list key for this binder.Returns the list key from master datasource to this binder.getListModel
(JList aList) Returns a list model for given list.Returns the list selection model for this binder.Returns the panel that loaded this binder.getName()
Returns the name of this binder.Returns the parent binder for this binder.Returns the binder name for this binder.Return the selected object in the list that this binder is brokering.void
setBindKey
(String aBindKey) Sets the bind key for this binder.void
Sets the panel that loaded this binder.void
Sets the name of this binder.toXML
(RXArchiver anArchiver) XML archival.void
valueChanged
(ListSelectionEvent anEvent) Called when list selection changes.
-
Constructor Details
-
RBListBinder
public RBListBinder()Create new binder.
-
-
Method Details
-
getMaster
Returns the panel that loaded this binder. -
setMaster
Sets the panel that loaded this binder. -
getName
Returns the name of this binder. -
setName
Sets the name of this binder. -
getBindKey
Returns the bind key for this binder. -
setBindKey
Sets the bind key for this binder. -
getParentBinder
Returns the parent binder for this binder. -
getParentBinderName
Returns the binder name for this binder. -
getListKey
Returns the list key for this binder. -
getListKeyDeep
Returns the list key from master datasource to this binder. -
getList
Return the list that this binder is brokering. -
getSelectedObject
Return the selected object in the list that this binder is brokering. -
getListModel
Returns a list model for given list. -
getListSelectionModel
Returns the list selection model for this binder. -
getBinder
Returns the binder for a given component. -
valueChanged
Called when list selection changes.- Specified by:
valueChanged
in interfaceListSelectionListener
-
fireContentsChanged
public void fireContentsChanged()Called when binder's source list has changed. Can be called by owner/controller or by a parent binder. -
toXML
XML archival. -
fromXML
XML unarchival.
-