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

oracle.jbo.uicli.jui
Class JUProgressBarBinding

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
                      extended byoracle.jbo.uicli.jui.JUBoundedRangeBinding
                          extended byoracle.jbo.uicli.jui.JUProgressBarBinding
All Implemented Interfaces:
javax.swing.BoundedRangeModel, javax.swing.event.ChangeListener, java.util.EventListener, JUIteratorChangedListener, java.util.Map, RowNavigationListener, RowSetListener

public class JUProgressBarBinding
extends oracle.jbo.uicli.jui.JUBoundedRangeBinding
implements javax.swing.event.ChangeListener

Implements binding a JProgressBar control with a BC4J RowSetIterator/ViewObject. Use this binding to use JProgressBar to navigate the current row in a RowSetIterator/ViewObject.


Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
 
Fields inherited from class oracle.jbo.uicli.binding.JUCtrlScrollBinding
mExt, mInited, mMax, mMin, mScrollCurrRow, mUseEstRC, 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
JUProgressBarBinding(javax.swing.JProgressBar sb, JUIteratorBinding iterBinding, boolean scrollCurrRow, boolean deferAssignValues, boolean useEstRC)
          Binds a JProgressBar control to a BC4J ViewObject such that JProgressBar can be used to navigate rows in the ViewObject.
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener x)
           
 void addControlToPanel(java.lang.Object panel, java.lang.Object layoutObject, java.lang.Object layoutCons)
          *** For internal framework use only ***
static javax.swing.BoundedRangeModel createViewBinding(JUPanelBinding formBinding, javax.swing.JProgressBar control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, boolean scrollCurrentRow, boolean useEstRC)
          Binds a JProgressBar control to a BC4J ViewObject such that JProgressBar can be used to navigate rows in the ViewObject.
 java.lang.Object getControlModel(java.lang.Object control)
          Gets the associated View's model object.
 int getExtent()
           
static javax.swing.BoundedRangeModel getInstance(JUPanelBinding formBinding, javax.swing.JProgressBar control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, boolean scrollCurrentRow, boolean useEstRC)
          Deprecated. since 9.0.2 use createViewBinding method instead.
 int getMaximum()
           
 int getMinimum()
           
protected  javax.swing.BoundedRangeModel getModelImpl(javax.swing.JProgressBar sb)
          Registers the BoundedRangeModel that this binding works with.
 int getValue()
           
 boolean getValueIsAdjusting()
           
protected  void initFromRSI()
          Sets the control values from the RowSetIterator to which it is bound.
 void iteratorChanged(java.lang.String rsiName, NavigatableRowIterator rsi)
          When the RowSetIterator that this control was working with via its associated IteratorBinding is changed, this method resets the current values and range that this control is working with to reflect the values from the new iterator.
protected  boolean needsEstimatedRowCount()
           
 void removeChangeListener(javax.swing.event.ChangeListener x)
           
 void setExtent(int newExtent)
           
 void setMaximum(int newMaximum)
           
 void setMinimum(int newMinimum)
           
 void setRangeProperties(int value, int extent, int min, int max, boolean adjusting)
           
 void setRangeScrollValue(int val)
          Sets the current value in the ProgressBar to the given value 'val'.
 void setRangeScrollValues(int val, int ext, int minVal, int maxVal)
          Sets the current values for this ProgressBar.
 void setValue(int newValue)
           
 void setValueIsAdjusting(boolean b)
           
 void setValues(int val, int ext, int minVal, int maxVal)
          Sets the current value, extent, minimum, and maximum values for the ProgressBar.
 void stateChanged(javax.swing.event.ChangeEvent e)
          When th current value changes in the ProgressBar, this event handler method updates the associated ViewObject's currency.
 
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlScrollBinding
assignValues, bindRowSetIterator, navigated, rangeRefreshed, rangeScrolled, refreshControl, release, resetInputState, rowDeleted, rowInserted, rowUpdated
 
Methods inherited from class oracle.jbo.uicli.binding.JUControlBinding
getFormBinding, getIteratorBinding, reportException, setFormBinding
 
Methods inherited from class oracle.adf.model.binding.DCControlBinding
addToDCExceptions, executeQuery, executeQueryIfNeeded, get, getAllRowsInRange, getApplicationModule, getBindingContainer, getControl, 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
 

Constructor Detail

JUProgressBarBinding

public JUProgressBarBinding(javax.swing.JProgressBar sb,
                            JUIteratorBinding iterBinding,
                            boolean scrollCurrRow,
                            boolean deferAssignValues,
                            boolean useEstRC)
Binds a JProgressBar control to a BC4J ViewObject such that JProgressBar can be used to navigate rows in the ViewObject. Optionally an application can control the scrolling of current row into the current range of rows and use estimated row count APIs to calculate the maximum row count for the display.

Parameters:
sb - JProgressBar control with which to bind a BC4J ViewObject.
iterBinding - An iterator Binding with which this control is associated.
deferAssignValues - When true, defers the assignement of JProgressBar values till the ViewObject query is executed
useEstRC - When true, uses getEstimatedRowCount() to calculate the max value for the control.
Method Detail

getControlModel

public java.lang.Object getControlModel(java.lang.Object control)
Gets the associated View's model object.

Overrides:
getControlModel in class DCControlBinding

createViewBinding

public static javax.swing.BoundedRangeModel createViewBinding(JUPanelBinding formBinding,
                                                              javax.swing.JProgressBar control,
                                                              java.lang.String voInstanceName,
                                                              java.lang.String voIterName,
                                                              java.lang.String voIterBindingName,
                                                              boolean scrollCurrentRow,
                                                              boolean useEstRC)
Binds a JProgressBar control to a BC4J ViewObject such that JProgressBar can be used to navigate rows in the ViewObject. Optionally an application can control the scrolling of the current row into the current range of rows and use estimated row count APIs to calculate the maximum row count for the display.

Parameters:
formBinding - The containing JUPanelBinding in which the given iterator binding would be found/created.
control - JProgressBar control with which to bind a BC4J ViewObject.
voInstanceName - Name of the instance of the ViewObject in a BC4J ApplicationModule.
voIterName - Runtime instance name of the iterator in the ViewObject (optional).
voIterBindingName - Instance name of the iterator binding that uniquely identifies an iterator binding object used to read/write data in this given JUPanelBinding instance.
scrollCurrentRow - When true, scrolls the current row into the current range of the ViewObject.
useEstRC - When true, uses getEstimatedRowCount() to calculate the max value for the control.

getInstance

public static javax.swing.BoundedRangeModel getInstance(JUPanelBinding formBinding,
                                                        javax.swing.JProgressBar control,
                                                        java.lang.String voInstanceName,
                                                        java.lang.String voIterName,
                                                        java.lang.String voIterBindingName,
                                                        boolean scrollCurrentRow,
                                                        boolean useEstRC)
Deprecated. since 9.0.2 use createViewBinding method instead.


getModelImpl

protected javax.swing.BoundedRangeModel getModelImpl(javax.swing.JProgressBar sb)
Registers the BoundedRangeModel that this binding works with. If the ProgressBar has a model, this method registers that with this binding and returns the model. If the control or model is null, then this method creates a DefaultBoundedRangeModel and returns that.


setValues

public void setValues(int val,
                      int ext,
                      int minVal,
                      int maxVal)
Sets the current value, extent, minimum, and maximum values for the ProgressBar.

Specified by:
setValues in class JUCtrlScrollBinding
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()
Sets the control values from the RowSetIterator to which it is bound. This method sets the minor tick spacing to 1 and snap-to ticks boolean flag to True in the associated JProgressBar control.

Overrides:
initFromRSI in class JUCtrlScrollBinding

setRangeScrollValue

public void setRangeScrollValue(int val)
Sets the current value in the ProgressBar to the given value 'val'.

Overrides:
setRangeScrollValue in class JUCtrlScrollBinding

setRangeScrollValues

public void setRangeScrollValues(int val,
                                 int ext,
                                 int minVal,
                                 int maxVal)
Sets the current values for this ProgressBar.

Specified by:
setRangeScrollValues in class JUCtrlScrollBinding
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.

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
When th current value changes in the ProgressBar, this event handler method updates the associated ViewObject's currency.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener

addControlToPanel

public void addControlToPanel(java.lang.Object panel,
                              java.lang.Object layoutObject,
                              java.lang.Object layoutCons)
*** For internal framework use only ***

Specified by:
addControlToPanel in class JUControlBinding

getMinimum

public int getMinimum()
Specified by:
getMinimum in interface javax.swing.BoundedRangeModel

setMinimum

public void setMinimum(int newMinimum)
Specified by:
setMinimum in interface javax.swing.BoundedRangeModel

getMaximum

public int getMaximum()
Specified by:
getMaximum in interface javax.swing.BoundedRangeModel

setMaximum

public void setMaximum(int newMaximum)
Specified by:
setMaximum in interface javax.swing.BoundedRangeModel

getValue

public int getValue()
Specified by:
getValue in interface javax.swing.BoundedRangeModel

setValue

public void setValue(int newValue)
Specified by:
setValue in interface javax.swing.BoundedRangeModel

setValueIsAdjusting

public void setValueIsAdjusting(boolean b)
Specified by:
setValueIsAdjusting in interface javax.swing.BoundedRangeModel

getValueIsAdjusting

public boolean getValueIsAdjusting()
Specified by:
getValueIsAdjusting in interface javax.swing.BoundedRangeModel

getExtent

public int getExtent()
Specified by:
getExtent in interface javax.swing.BoundedRangeModel

setExtent

public void setExtent(int newExtent)
Specified by:
setExtent in interface javax.swing.BoundedRangeModel

setRangeProperties

public void setRangeProperties(int value,
                               int extent,
                               int min,
                               int max,
                               boolean adjusting)
Specified by:
setRangeProperties in interface javax.swing.BoundedRangeModel

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener x)
Specified by:
addChangeListener in interface javax.swing.BoundedRangeModel

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener x)
Specified by:
removeChangeListener in interface javax.swing.BoundedRangeModel

iteratorChanged

public void iteratorChanged(java.lang.String rsiName,
                            NavigatableRowIterator rsi)
When the RowSetIterator that this control was working with via its associated IteratorBinding is changed, this method resets the current values and range that this control is working with to reflect the values from the new iterator.

Specified by:
iteratorChanged in interface JUIteratorChangedListener
Parameters:
rsiName - Name of the JUIteratorBinding for which the RowSetIterator is changed.
rsi - The new RowSetIterator (could be null) to which an iterator binding should be bound.

needsEstimatedRowCount

protected boolean needsEstimatedRowCount()
Overrides:
needsEstimatedRowCount in class JUCtrlScrollBinding

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

 

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