Package com.ribs

Class RBListBinder

java.lang.Object
com.ribs.RBListBinder
All Implemented Interfaces:
EventListener, ListSelectionListener

public class RBListBinder extends Object implements 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.
  • Constructor Details

    • RBListBinder

      public RBListBinder()
      Create new binder.
  • Method Details

    • getMaster

      public RJPanel getMaster()
      Returns the panel that loaded this binder.
    • setMaster

      public void setMaster(RJPanel aPanel)
      Sets the panel that loaded this binder.
    • getName

      public String getName()
      Returns the name of this binder.
    • setName

      public void setName(String aName)
      Sets the name of this binder.
    • getBindKey

      public String getBindKey()
      Returns the bind key for this binder.
    • setBindKey

      public void setBindKey(String aBindKey)
      Sets the bind key for this binder.
    • getParentBinder

      public RBListBinder getParentBinder()
      Returns the parent binder for this binder.
    • getParentBinderName

      public String getParentBinderName()
      Returns the binder name for this binder.
    • getListKey

      public String getListKey()
      Returns the list key for this binder.
    • getListKeyDeep

      public String getListKeyDeep()
      Returns the list key from master datasource to this binder.
    • getList

      public List getList()
      Return the list that this binder is brokering.
    • getSelectedObject

      public Object getSelectedObject()
      Return the selected object in the list that this binder is brokering.
    • getListModel

      public ListModel getListModel(JList aList)
      Returns a list model for given list.
    • getListSelectionModel

      public ListSelectionModel getListSelectionModel()
      Returns the list selection model for this binder.
    • getBinder

      public static RBListBinder getBinder(JComponent aComponent)
      Returns the binder for a given component.
    • valueChanged

      public void valueChanged(ListSelectionEvent anEvent)
      Called when list selection changes.
      Specified by:
      valueChanged in interface ListSelectionListener
    • fireContentsChanged

      public void fireContentsChanged()
      Called when binder's source list has changed. Can be called by owner/controller or by a parent binder.
    • toXML

      public RXElement toXML(RXArchiver anArchiver)
      XML archival.
    • fromXML

      public Object fromXML(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.