Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.1.0)

E17483-02

oracle.jbo.uicli.jui
Class JUScrollBarAttrBinding

java.lang.Object
  extended by java.util.AbstractMap
      extended by oracle.jbo.common.JboAbstractMap
          extended by oracle.adf.model.binding.DCControlBinding
              extended by oracle.jbo.uicli.binding.JUControlBinding
                  extended by oracle.jbo.uicli.binding.JUCtrlValueBinding
                      extended by oracle.jbo.uicli.binding.JUCtrlAttrsBinding
                          extended by oracle.jbo.uicli.jui.JUScrollBarAttrBinding
All Implemented Interfaces:
java.awt.event.AdjustmentListener, java.util.EventListener, java.util.Map, javax.swing.BoundedRangeModel, AttributeBinding, ControlBinding, StructureDef, JUCtrlInputValueHandler, JUCtrlValueHandler

public class JUScrollBarAttrBinding
extends JUCtrlAttrsBinding
implements javax.swing.BoundedRangeModel, java.awt.event.AdjustmentListener

Implements binding a JScrollBar control with an Attribute in a BC4J RowSet.

This binding sets the minimum, maximum, and the extent values of the ScrollBar. When currency changes in the associated rowset, it displays the associated value by adjusting the ScrollBar between the minimum and maximum values. Note that the minimum and maximum values should be provided such that all possible values of the associated attribute in a RowSet can be displayed in the ScrollBar.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class oracle.jbo.uicli.binding.JUCtrlValueBinding
ATTR_ATTRIBUTE, ATTR_ATTRIBUTE_DEF, ATTR_ATTRIBUTE_DEFS, ATTR_ATTRIBUTE_VALUE, ATTR_ATTRIBUTE_VALUES, ATTR_ATTRIBUTES, ATTR_AUTOSUBMIT, ATTR_CATEGORY, ATTR_DISPLAY_HEIGHT, ATTR_DISPLAY_HINT, ATTR_DISPLAY_WIDTH, ATTR_FIELD_ORDER, ATTR_FORMAT, ATTR_FORMATS, ATTR_HINTS, ATTR_INPUT_VALUE, ATTR_LABEL, ATTR_LABELS, ATTR_LABELSET, ATTR_MANDATORY, ATTR_PATH, ATTR_TOOLTIP, ATTR_UPDATEABLE, ATTR_VIEWABLE, DATACHANGE_EVENT_POLICY, GET_ALLOWS, mAttrs, mHasInputVal, mInputVal, SEP_LIST_DISPLAY
 
Fields inherited from class oracle.adf.model.binding.DCControlBinding
ATTR_CURRENTROW, ATTR_DEF, ATTR_ERROR, ATTR_ERRORS, ATTR_FULLNAME, ATTR_ITER, ATTR_NAME, DC_BINDING_ERROR, mAttributeListener, mInternalGet_KeyResolved, mPermission, mPermissionInfo, ROW_KEY_STR
 
Fields inherited from class oracle.jbo.common.JboAbstractMap
MAP_NULL_VALUE
 
Constructor Summary
JUScrollBarAttrBinding(javax.swing.JScrollBar control, JUIteratorBinding iterBinding, java.lang.String attrName, int min, int max, int ext)
          Binds the given ScrollBar control to display and update values from the given attribute in a BC4J RowSet.
 
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 ***
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
          Sets the BC4J attribute value based on the change in the JScrollBar current value.
static javax.swing.BoundedRangeModel createAttributeBinding(JUFormBinding formBinding, javax.swing.JScrollBar control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName, int min, int max, int ext)
          Creates a binding for the JScrollBar control.
 java.lang.Object getControlModel(java.lang.Object control)
          Gets the associated View's model object.
 int getExtent()
           
static javax.swing.BoundedRangeModel getInstance(JUFormBinding formBinding, javax.swing.JScrollBar control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName, int min, int max, int ext)
          Deprecated. since 9.0.2 use createAttributeBinding method instead.
 int getMaximum()
           
 int getMinimum()
           
protected  javax.swing.BoundedRangeModel getModelImpl(javax.swing.JScrollBar sb)
          Registers the BoundedRangeModel that this binding works with.
 int getValue()
           
 java.lang.Object getValueAt(int attrIndex)
          Returns the current value indicated by the JScrollBar control.
 boolean getValueIsAdjusting()
           
 void removeChangeListener(javax.swing.event.ChangeListener x)
           
 void setDataValueAt(java.lang.Object value, int attrIndex)
          Use this method to update the ScrollBar value, as well as the value in the associated BC4J attribute.
 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 setValue(int newValue)
           
 void setValueAt(java.lang.Object value, int attrIndex)
          Sets the current value in the JScrollBar control.
 void setValueIsAdjusting(boolean b)
           
 
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlAttrsBinding
createAttributeBinding, isControlQueriable, refreshControl, setControlEnabled, toString, updateValuesFromRow, updateValuesFromRows
 
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlValueBinding
addBindingContainerChangeListenerForCtxEvent, addDataChangeListener, clearAttrDefs, clearEventsCache, compareAndSetAttribute, createAndNotifyDCE, createEventProducer, displayInShortForm, ensureVariableManager, eventForMyRow, fetchAttrDefs, findAttributeDef, generateDCE, getAttribute, getAttribute, getAttribute, getAttributeCount, getAttributeDef, getAttributeDef, getAttributeDefs, getAttributeDefsForRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeIndexOf, getAttributeNames, getAttributes, getAttributes, getAttributeUIHelper, getAttributeValidators, getAttributeValidators, getAttributeValue, getAttributeValue, getAttributeValueFromRow, getAttributeValues, getAttributeValues, getAttrViewExpressions, getBindingHint, getCachedEvents, getCategory, getChangeEventPolicy, getColumnNameForQuery, getControlType, getDataChangeEventPolicy, getDataChangeListener, getDisplayHeight, getDisplayHint, getDisplayWidth, getError, getErrors, getEventProducer, getFieldOrder, getFormat, getFormats, getFormattedAttributeValue, getHint, getHint, getHints, getInputErrorsForRowKey, getInputValue, getInputValue, getInputValueHandler, getInputValueInRow, getInputValueOnError, getIteratorBindingForDCE, getIteratorRenderHint, getLabel, getLabel, getLabels, getLabelSet, getLastEventId, getLocaleContext, getMasterKeyPathForDCE, getMergedAttributeValues, getNullValueString, getPath, getPermissionDef, getPermissionHolder, getPermissionInfo, getSelectionDef, getState, getTooltip, getTooltip, hasEventProducer, hasFormatInformation, hasServerBindingChanged, hasVariables, initResources, internalGet, internalGetRow, internalHasPermission, internalHasPermission, isArrayIteratorType, isAttributeMandatory, isAttributeUpdateable, isAttributeUpdateable, isAttributeUpdateable, isAttributeUpdateable, isAutoSubmit, isEventsCachingEnabled, isMandatory, isNewInputValue, isNullInsertKeyPathForDCE, isPushDataChangeEvents, isPushOrPollDataChangeEvents, isUpdateable, isViewable, lookupAttributeDef, notifyDataChangeEvent, notifyDataExceptionEvent, notifyDCE, pinDataControl, processInputException, processNewInputValue, put, release, removeAttrName, removeDataChangeListener, removeFromDCExceptions, resetAttributeDefs, resetInputState, resolvePath, restoreFromState, setArrayIteratorType, setAttribute, setAttribute, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeNames, setAttributes, setAttributeValue, setAttributeValuesInRow, setAttrViewExpressions, setDef, setError, setEventProducer, setEventsCaching, setInputValue, setInputValue, setInputValueHandler, setInputValueInRow, setIteratorBinding, setListener, setNullValueString, startEvents, stopEditing, stopEvents, updateNavigated, updateRangeScrolled, updateRow, updateRowDeleted, updateRowInserted, useRowSpecificHints, validateInputValue
 
Methods inherited from class oracle.jbo.uicli.binding.JUControlBinding
getCurrentRow, getFormBinding, getIteratorBinding, reportException, setFormBinding
 
Methods inherited from class oracle.adf.model.binding.DCControlBinding
addToDCExceptions, evaluateBooleanExpression, executeQuery, executeQueryIfNeeded, get, getAllRowsInRange, getApplicationModule, getAttributeListener, getBindingContainer, getControl, getDCIteratorBinding, getDef, getDefFullName, getDefName, getFullName, getLayoutObject, getName, getPermission, getPermissionTargetName, getRowAtRangeIndex, getRowIterator, getTransaction, getViewableExpr, getViewObject, hasAttributeListener, hashCode, internalSetName, isControlViewable, isReleased, needsEstimatedRowCount, release, reportException, resetAttributeExceptionInRow, setBindingContainer, setControl, setDataControlPinned, setListener, setName, setViewableExpr
 
Methods inherited from class oracle.jbo.common.JboAbstractMap
entrySet, equals, internalPut, setThrowIfPropertyNotFoundOnGet
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.adf.model.AttributeBinding
getErrors, getInputValue, getLabel, isUpdateable, processNewInputValue, setInputValue, validateInputValue
 
Methods inherited from interface oracle.adf.model.ControlBinding
release, setListener
 
Methods inherited from interface oracle.binding.ControlBinding
getName, getPath, release, resolvePath, setListener
 
Methods inherited from interface oracle.jbo.StructureDef
getDefFullName, getDefName, getFullName, getName
 

Constructor Detail

JUScrollBarAttrBinding

public JUScrollBarAttrBinding(javax.swing.JScrollBar control,
                              JUIteratorBinding iterBinding,
                              java.lang.String attrName,
                              int min,
                              int max,
                              int ext)
Binds the given ScrollBar control to display and update values from the given attribute in a BC4J RowSet.

Parameters:
control - JScrollBar control to bind a BC4J attribute with.
iterBinding - Iterator binding that provides the RowSet with which this binding should work.
attrName - The attribute name in the RowSet with which this binding works.
min - Minimum value that the JScrollBar displays (what the starting value should be in the JScrollBar control).
max - Maximum value that the JScrollBar displays (what the end value should be in the control).
ext - Determines the Extent value for the JScrollBar control.
Method Detail

getModelImpl

protected javax.swing.BoundedRangeModel getModelImpl(javax.swing.JScrollBar sb)
Registers the BoundedRangeModel that this binding works with. If the ScrollBar 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.


addControlToPanel

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

Overrides:
addControlToPanel in class JUCtrlAttrsBinding

getValueAt

public java.lang.Object getValueAt(int attrIndex)
Returns the current value indicated by the JScrollBar control.

Overrides:
getValueAt in class JUCtrlAttrsBinding

setValueAt

public void setValueAt(java.lang.Object value,
                       int attrIndex)
Sets the current value in the JScrollBar control. This method adjusts the position of JScrollBar current value indicator based on the input value and the minimum and maximum value the JScrollBar is set to handle.

Overrides:
setValueAt in class JUCtrlAttrsBinding

setDataValueAt

public void setDataValueAt(java.lang.Object value,
                           int attrIndex)
Use this method to update the ScrollBar value, as well as the value in the associated BC4J attribute.

Overrides:
setDataValueAt in class JUCtrlAttrsBinding

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
Sets the BC4J attribute value based on the change in the JScrollBar current value.

Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener

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

getControlModel

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

Overrides:
getControlModel in class DCControlBinding

createAttributeBinding

public static javax.swing.BoundedRangeModel createAttributeBinding(JUFormBinding formBinding,
                                                                   javax.swing.JScrollBar control,
                                                                   java.lang.String voInstanceName,
                                                                   java.lang.String voIterName,
                                                                   java.lang.String voIterBindingName,
                                                                   java.lang.String attrName,
                                                                   int min,
                                                                   int max,
                                                                   int ext)
Creates a binding for the JScrollBar control.

Parameters:
formBinding - The containing JUPanelBinding in which the given iterator binding would be found/created.
control - JScrollBar control with which to bind a BC4J attribute.
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.
attrName - The attribute name in the RowSet with which this binding works.
min - Minimum value that the JScrollBar displays (what the starting value should be in the JScrollBar control).
max - Maximum value that the JScrollBar displays (what the end value should be in the control).
ext - Determines the Extent value for the JScrollBar control.

getInstance

public static javax.swing.BoundedRangeModel getInstance(JUFormBinding formBinding,
                                                        javax.swing.JScrollBar control,
                                                        java.lang.String voInstanceName,
                                                        java.lang.String voIterName,
                                                        java.lang.String voIterBindingName,
                                                        java.lang.String attrName,
                                                        int min,
                                                        int max,
                                                        int ext)
Deprecated. since 9.0.2 use createAttributeBinding method instead.


Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.1.0)

E17483-02

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