Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

oracle.jbo.uicli.binding
Class JUCtrlScrollBinding

java.lang.Object
  extended byjava.util.AbstractMap
      extended byoracle.jbo.common.JboAbstractMap
          extended byoracle.adf.model.binding.DCControlBinding
              extended byoracle.jbo.uicli.binding.JUControlBinding
                  extended byoracle.jbo.uicli.binding.JUCtrlScrollBinding
All Implemented Interfaces:
java.util.EventListener, java.util.Map, RowNavigationListener, RowSetListener
Direct Known Subclasses:
oracle.jbo.uicli.jui.JUBoundedRangeBinding

public abstract class JUCtrlScrollBinding
extends JUControlBinding
implements RowSetListener

Implements binding of controls like Scrollbar, Slider, etc to a ViewObject. This class listens to the RowSet events from the associated BC4J RowSet and resets/updates the control/model with appropriate currency and range.


Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
protected  int mExt
           
protected  boolean mInited
           
protected  int mMax
           
protected  int mMin
           
protected  boolean mScrollCurrRow
           
protected  boolean mUseEstRC
           
protected  int mVal
           
 
Fields inherited from class oracle.adf.model.binding.DCControlBinding
ATTR_CURRENTROW, ATTR_DEF, ATTR_ERROR, ATTR_ERRORS, ATTR_FULLNAME, ATTR_ITER, ATTR_NAME, mInternalGet_KeyResolved, ROW_KEY_STR
 
Constructor Summary
JUCtrlScrollBinding(java.lang.Object control, JUIteratorBinding iterBinding, boolean scrollCurrRow, boolean deferAssignValues, boolean useEstRC)
          Creates an instance of this class bound to the given control and iterator Binding object.
 
Method Summary
protected  void assignValues()
          Initializes the binding member variables from the current settings in the associated RowSetIterator.
protected  void bindRowSetIterator(RowSetIterator rsi)
          Associates the given RowSet iterator with this Binding object.
protected  void initFromRSI()
          Uses the current RowSetIterator to calculate the current values from the associated RowSetIterator.
 void navigated(NavigationEvent event)
          Invoked when the current-row designation changes.
protected  boolean needsEstimatedRowCount()
           
 void rangeRefreshed(RangeRefreshEvent event)
          Invoked when the range changes.
 void rangeScrolled(ScrollEvent event)
          Invoked when the range is scrolled.
 void refreshControl()
          *** For internal framework use only ***
protected  void release(int flags)
           
protected  void resetInputState()
          Empty method to support DCControlBinding contract.
 void rowDeleted(DeleteEvent event)
          Invoked when a row has been deleted.
 void rowInserted(InsertEvent event)
          Invoked when a row has been inserted.
 void rowUpdated(UpdateEvent event)
          Invoked when an attribute of the row has been changed.
 void setRangeScrollValue(int newVal)
          Sets the currency to the given row index in the current range of rows that the associated iterator is working with.
protected abstract  void setRangeScrollValues(int val, int ext, int minVal, int maxVal)
          Sets the current iterator state by setting the given set of values on the iterator.
protected abstract  void setValues(int val, int ext, int minVal, int maxVal)
          Reflects the current iterator state by setting the given set of values on the associated control.
 
Methods inherited from class oracle.jbo.uicli.binding.JUControlBinding
addControlToPanel, getFormBinding, getIteratorBinding, reportException, setFormBinding
 
Methods inherited from class oracle.adf.model.binding.DCControlBinding
addToDCExceptions, executeQuery, executeQueryIfNeeded, get, getAllRowsInRange, getApplicationModule, getBindingContainer, getControl, getControlModel, getCurrentRow, getDCIteratorBinding, getDef, getDefFullName, getDefName, getError, getErrors, getFullName, getLayoutObject, getName, getRowAtRangeIndex, getRowIterator, getTransaction, getViewObject, hashCode, internalGet, internalSetName, isControlQueriable, processInputException, removeFromDCExceptions, reportException, resetAttributeExceptionInRow, setBindingContainer, setControl, setName, toString
 
Methods inherited from class oracle.jbo.common.JboAbstractMap
entrySet, equals
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

mMin

protected int mMin

mMax

protected int mMax

mVal

protected int mVal

mExt

protected int mExt

mScrollCurrRow

protected boolean mScrollCurrRow

mUseEstRC

protected boolean mUseEstRC

mInited

protected boolean mInited
Constructor Detail

JUCtrlScrollBinding

public JUCtrlScrollBinding(java.lang.Object control,
                           JUIteratorBinding iterBinding,
                           boolean scrollCurrRow,
                           boolean deferAssignValues,
                           boolean useEstRC)
Creates an instance of this class bound to the given control and iterator Binding object.

Parameters:
scrollCurrRow - Not used.
deferAssignValues - If true, indicates that the iterator's current settings should be immediately applied to the bound control.
useEstRC - If true, indicates that the binding should use getEstimatedRowCount() on the associated iterator to figure out the maximum number of rows in the associated iterator. Otherwise, in-memory row count of the iterator is used.
Method Detail

setValues

protected abstract void setValues(int val,
                                  int ext,
                                  int minVal,
                                  int maxVal)
Reflects the current iterator state by setting the given set of values on the associated control.

Parameters:
val - The current value which indicates the row index of the current row in the current range.
ext - The extent value which is used by a control to scroll that many rows up or down.
minVal - The minimum value that this control allows.
maxVal - The maximum value that this control allows.

setRangeScrollValues

protected abstract void setRangeScrollValues(int val,
                                             int ext,
                                             int minVal,
                                             int maxVal)
Sets the current iterator state by setting the given set of values on the iterator.

Parameters:
val - The current value which indicates the row index of the current row in the current range.
ext - The extent value which is used by a control to scroll that many rows up or down.
minVal - The minimum value that this control allows.
maxVal - The maximum value that this control allows.

initFromRSI

protected void initFromRSI()
Uses the current RowSetIterator to calculate the current values from the associated RowSetIterator.


assignValues

protected void assignValues()
Initializes the binding member variables from the current settings in the associated RowSetIterator. Then sets these values into the model/control using setValues() method.


setRangeScrollValue

public void setRangeScrollValue(int newVal)
Sets the currency to the given row index in the current range of rows that the associated iterator is working with. This method scrolls the current row in the current range, if it falls out of the current range.


rangeRefreshed

public void rangeRefreshed(RangeRefreshEvent event)
Description copied from interface: RowSetListener
Invoked when the range changes.

Specified by:
rangeRefreshed in interface RowSetListener
Parameters:
event - a description of the new ranges.

rangeScrolled

public void rangeScrolled(ScrollEvent event)
Description copied from interface: RowSetListener
Invoked when the range is scrolled.

Specified by:
rangeScrolled in interface RowSetListener
Parameters:
event - a description of the new range.

rowInserted

public void rowInserted(InsertEvent event)
Description copied from interface: RowSetListener
Invoked when a row has been inserted.

Specified by:
rowInserted in interface RowSetListener
Parameters:
event - a description of the new Row object.

rowDeleted

public void rowDeleted(DeleteEvent event)
Description copied from interface: RowSetListener
Invoked when a row has been deleted.

Specified by:
rowDeleted in interface RowSetListener
Parameters:
event - a description of the deleted Row object.

rowUpdated

public void rowUpdated(UpdateEvent event)
Description copied from interface: RowSetListener
Invoked when an attribute of the row has been changed.

Specified by:
rowUpdated in interface RowSetListener
Parameters:
event - a description of the modified Row object.

navigated

public void navigated(NavigationEvent event)
Description copied from interface: RowSetListener
Invoked when the current-row designation changes.

Specified by:
navigated in interface RowSetListener
Parameters:
event - a description of the new and previous current rows.

bindRowSetIterator

protected void bindRowSetIterator(RowSetIterator rsi)
Associates the given RowSet iterator with this Binding object. If this object was working with another RowSet, removes it from the RowSetListener's list of the first RowSet. Adds this object as a RowSetListener in the given RowSet, so that this binding can track rowset scroll and navigation events.


refreshControl

public void refreshControl()
*** For internal framework use only ***

Updates the values in a control that is bound using an Iterator already in use. (a valid row iterator) If you do not call this method, your control won't update unless you refresh the Iterator.

Specified by:
refreshControl in class DCControlBinding

release

protected void release(int flags)
Overrides:
release in class DCControlBinding

resetInputState

protected void resetInputState()
Empty method to support DCControlBinding contract.

Specified by:
resetInputState in class DCControlBinding

needsEstimatedRowCount

protected boolean needsEstimatedRowCount()
Overrides:
needsEstimatedRowCount in class DCControlBinding

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

 

Copyright © 1997, 2004, Oracle. All rights reserved.