Business Components

oracle.jbo.uicli.binding
Class JUCtrlAttrsBinding

java.lang.Object
  |
  +--oracle.jbo.uicli.binding.JUControlBinding
        |
        +--oracle.jbo.uicli.binding.JUCtrlValueBinding
              |
              +--oracle.jbo.uicli.binding.JUCtrlAttrsBinding
All Implemented Interfaces:
AttributeList
Direct Known Subclasses:
JUCtrlListBinding, JUDefaultControlBinding, JULabelBinding, JUProgressBarAttrBinding, JUScrollBarAttrBinding, JUSliderAttrBinding, JUTextFieldBinding

public abstract class JUCtrlAttrsBinding
extends JUCtrlValueBinding

A JUControlBinding class responsible for binding controls/models that are bound to a single Row object in the BC4J layer. This class is responsible for:

This class defines the abstract APIs for subclasses to implement, so that Row's attributes can be passed to the Binding object for appropriate display/update.


Constructor Summary
TypeConstructor
protected JUCtrlAttrsBinding()
          *** For internal framework use only ***
  JUCtrlAttrsBinding(java.lang.Object control, JUIteratorBinding iterBinding, java.lang.String[] attrNames)
          Creates a binding between the given control and attributes in the Rows returned by the passed in Iterator Binding.
 
Method Summary
TypeMethod
abstract  java.lang.Object getValueAt(int attrIndex)
          Gets the value from the control for the attribute at the given index.
abstract  void setDataValueAt(java.lang.Object value, int attrIndex)
           
abstract  void setValueAt(java.lang.Object value, int attrIndex)
          Updates the control/control-binding with the latest value of the attribute at the given index with the given value.
 void updateNavigated(NavigationEvent event)
          Overridden as a no-op.
 void updateRangeScrolled(ScrollEvent event)
          Overridden as a no-op.
 void updateValuesFromRow(Row row)
          Updates the control-binding and hence the control with attribute values from the attributes of this Row.
 void updateValuesFromRows(Row[] rows, boolean clear)
          Passes on the first row from the given array of rows to updateValuesFromRow() method to update the bound control's display.
 
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlValueBinding
findAttributeDef, getAttribute, getAttribute, getAttributeCount, getAttributeDef, getAttributeDefs, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeIndexOf, getAttributeNames, isAttributeUpdateable, setAttribute, setAttribute, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, stopEditing, updateRowDeleted, updateRowInserted
 
Methods inherited from class oracle.jbo.uicli.binding.JUControlBinding
addControlToPanel, executeQuery, executeQueryIfNeeded, getAllRowsInRange, getApplicationModule, getControl, getCurrentRow, getDef, getFormBinding, getIteratorBinding, getLayoutObject, getName, getRowAtRangeIndex, getRowIterator, getTransaction, getViewObject, isControlQueriable, reportException, setFormBinding, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUCtrlAttrsBinding

protected JUCtrlAttrsBinding()
*** For internal framework use only ***

JUCtrlAttrsBinding

public JUCtrlAttrsBinding(java.lang.Object control,
                          JUIteratorBinding iterBinding,
                          java.lang.String[] attrNames)
Creates a binding between the given control and attributes in the Rows returned by the passed in Iterator Binding.
Method Detail

getValueAt

public abstract java.lang.Object getValueAt(int attrIndex)
Gets the value from the control for the attribute at the given index. (The index is calculated from the list of attributes this control binding is bound to as passed in the constructor). Framework uses this method to get the attribute value from the control and pass it on to the Row object on the BC4J side.

setValueAt

public abstract void setValueAt(java.lang.Object value,
                                int attrIndex)
Updates the control/control-binding with the latest value of the attribute at the given index with the given value. This method is used by the framework to update the control with attribute values from a BC4J row.

setDataValueAt

public abstract void setDataValueAt(java.lang.Object value,
                                    int attrIndex)

updateValuesFromRow

public void updateValuesFromRow(Row row)
Updates the control-binding and hence the control with attribute values from the attributes of this Row. Invokes setValueAt() with the attribute value and attribute index with respect to attributes for which this binding is interested.

This method also enables/disables the Swing control based on the updateability of the first (Default) attribute to which this control is bound.

Overrides:
updateValuesFromRow in class JUCtrlValueBinding

updateValuesFromRows

public void updateValuesFromRows(Row[] rows,
                                 boolean clear)
Passes on the first row from the given array of rows to updateValuesFromRow() method to update the bound control's display.
Overrides:
updateValuesFromRows in class JUCtrlValueBinding

updateRangeScrolled

public void updateRangeScrolled(ScrollEvent event)
Overridden as a no-op. Since this control is bound to only one row, when that row becomes current the framework uses updateValuesFromRow to update the display
Overrides:
updateRangeScrolled in class JUCtrlValueBinding
Following copied from class: oracle.jbo.uicli.binding.JUCtrlValueBinding
See Also:
ScrollEvent

updateNavigated

public void updateNavigated(NavigationEvent event)
Overridden as a no-op. Since this control is bound to only one row, when that row becomes current the framework uses updateValuesFromRow to update the display
Overrides:
updateNavigated in class JUCtrlValueBinding

Business Components