Oracle Data-aware Controls Reference

oracle.dacf.control.swing
Class ComboBoxDataSource

java.lang.Object
  extended byjavax.swing.AbstractListModel
      extended byoracle.dacf.control.swing.ColumnModelSupport
          extended byoracle.dacf.control.swing.CachedColumnModelSupport
              extended byoracle.dacf.control.swing.ComboBoxDataSource
All Implemented Interfaces:
javax.swing.ComboBoxModel, oracle.dacf.rp.Consumer, javax.infobus.DataItemChangeListener, java.util.EventListener, javax.infobus.InfoBusDataConsumer, javax.infobus.InfoBusEventListener, InfoBusManagerListener, javax.infobus.InfoBusMember, javax.swing.ListModel, oracle.dacf.rp.Participant, java.beans.PropertyChangeListener, java.io.Serializable
Direct Known Subclasses:
MappedComboBoxDataSource

public class ComboBoxDataSource
extends CachedColumnModelSupport
implements javax.swing.ComboBoxModel

ComboBoxDataSource provides a JFC's ComboBoxModel implementation which gets its items from a infobus ScrollableRowsetAccess.

The ComboBoxDataSource provides support for performing a lookup between what is displayed in the list to what is updated. ColumnModelSupport - holds the 'value' item in update mode.

Version:
INTERNAL
See Also:
Serialized Form

Nested Class Summary
static interface ComboBoxDataSource.ValueLocator
           
 
Field Summary
protected  boolean _cachedSelectedItemInvalid
           
protected  ComboBoxControl _comboBox
           
protected  javax.infobus.ImmediateAccess _detailItem
           
protected  java.lang.String _listValueDataItemName
           
protected  javax.infobus.ScrollableRowsetAccess _rowsetForUpdateableItem
           
protected  javax.infobus.ImmediateAccess _selectedItem
           
protected  ComboBoxDataSource.ValueLocator _valueLocator
           
 
Fields inherited from class oracle.dacf.control.swing.ColumnModelSupport
bDisableEvent
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
ComboBoxDataSource(ComboBoxControl comboBox)
          Constructor
ComboBoxDataSource(ComboBoxControl comboBox, java.lang.String listDataItemName)
          Constructor
 
Method Summary
protected  java.lang.Object _getUpdateableValue(int masterRowIndex)
           
protected  int _itemToIndex(java.lang.Object o)
           
protected  void _releaseResourcesInternal(InfoBusManagerReleaseEvent e)
           
protected  void _syncSelectionWithDetailColumnValue(javax.infobus.ImmediateAccess item)
           
 java.lang.String getListDataItemName()
          Get the name of the dataItem being used for populating the list
 java.lang.String getListKeyDataItemName()
           
 java.lang.String getListValueDataItemName()
           
 java.lang.String getMode()
          get the current mode
 java.lang.String getName(java.lang.Object newDataItem)
          get the value of the data item as a string
protected  javax.infobus.ScrollableRowsetAccess getRowsetAccessForUpdateableItem()
           
 java.lang.Object getSelectedItem()
          get the selected item
 ComboBoxDataSource.ValueLocator getValueLocator()
           
protected  void rowsAvailable()
           
protected  void rowsRevoked()
           
 void setListDataItemName(java.lang.String modelDataItemName)
          Set the name of the dataItem to be used for populating the list
 void setListKeyDataItemName(java.lang.String diName)
           
 void setListValueDataItemName(java.lang.String name)
           
 void setSelectedIndex(int _newIndex)
          change the selected index
 void setSelectedItem(java.lang.Object anObject)
           
protected  void setSelectedItemInternal(javax.infobus.ImmediateAccess item)
           
 void setValueLocator(ComboBoxDataSource.ValueLocator valueLocator)
          ValueLocator is used to search in master rowset for a specific detail value
 java.lang.String toString()
          get string representation
 
Methods inherited from class oracle.dacf.control.swing.CachedColumnModelSupport
findCachedItem, getElementAt, isCachingEnabled, revokeAllRows, rowsAdded, rowsChanged, setCachingEnabled
 
Methods inherited from class oracle.dacf.control.swing.ColumnModelSupport
_findColumnIndex, _getItemFromCursor, _isRowChanged, _isViewRefreshed, addInfoBusPropertyListener, addInfoBusVetoableListener, available, dataItemAdded, dataItemAvailable, dataItemDeleted, dataItemRevoked, dataItemRevoked, dataItemValueChanged, getArrayAccess, getDataItemName, getInfoBus, getInfoBusName, getRowsetAccess, getSelection, getSize, propertyChange, releaseResources, removeInfoBusPropertyListener, removeInfoBusVetoableListener, revoked, rowsDeleted, rowsetCursorMoved, setDataItemName, setInfoBus, setInfoBusName, setSelection
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
 

Field Detail

_comboBox

protected ComboBoxControl _comboBox

_selectedItem

protected javax.infobus.ImmediateAccess _selectedItem

_detailItem

protected javax.infobus.ImmediateAccess _detailItem

_rowsetForUpdateableItem

protected javax.infobus.ScrollableRowsetAccess _rowsetForUpdateableItem

_valueLocator

protected ComboBoxDataSource.ValueLocator _valueLocator

_listValueDataItemName

protected java.lang.String _listValueDataItemName

_cachedSelectedItemInvalid

protected boolean _cachedSelectedItemInvalid
Constructor Detail

ComboBoxDataSource

public ComboBoxDataSource(ComboBoxControl comboBox)
Constructor

Parameters:
comboBox - a handle to the parent control

ComboBoxDataSource

public ComboBoxDataSource(ComboBoxControl comboBox,
                          java.lang.String listDataItemName)
Constructor

Parameters:
comboBox - a handle to the parent control
listDataItemName - data item name for the combo
Method Detail

getValueLocator

public ComboBoxDataSource.ValueLocator getValueLocator()

setValueLocator

public void setValueLocator(ComboBoxDataSource.ValueLocator valueLocator)
ValueLocator is used to search in master rowset for a specific detail value


setListDataItemName

public void setListDataItemName(java.lang.String modelDataItemName)
Set the name of the dataItem to be used for populating the list

Returns:
modelDataItemName property

getListDataItemName

public java.lang.String getListDataItemName()
Get the name of the dataItem being used for populating the list

Returns:
modelDataItemName property

setListKeyDataItemName

public void setListKeyDataItemName(java.lang.String diName)

getListKeyDataItemName

public java.lang.String getListKeyDataItemName()

setListValueDataItemName

public void setListValueDataItemName(java.lang.String name)

getListValueDataItemName

public java.lang.String getListValueDataItemName()

getName

public java.lang.String getName(java.lang.Object newDataItem)
get the value of the data item as a string

Returns:
dataitem value as string

setSelectedItem

public void setSelectedItem(java.lang.Object anObject)
Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel

_getUpdateableValue

protected java.lang.Object _getUpdateableValue(int masterRowIndex)

_releaseResourcesInternal

protected void _releaseResourcesInternal(InfoBusManagerReleaseEvent e)
Overrides:
_releaseResourcesInternal in class CachedColumnModelSupport

setSelectedIndex

public final void setSelectedIndex(int _newIndex)
change the selected index

Parameters:
_newIndex - new index

getSelectedItem

public java.lang.Object getSelectedItem()
get the selected item

Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
Returns:
the selected item

setSelectedItemInternal

protected void setSelectedItemInternal(javax.infobus.ImmediateAccess item)

getMode

public java.lang.String getMode()
get the current mode

Returns:
a string representing the mode - navigate/update

_syncSelectionWithDetailColumnValue

protected void _syncSelectionWithDetailColumnValue(javax.infobus.ImmediateAccess item)

getRowsetAccessForUpdateableItem

protected javax.infobus.ScrollableRowsetAccess getRowsetAccessForUpdateableItem()

_itemToIndex

protected int _itemToIndex(java.lang.Object o)

rowsAvailable

protected void rowsAvailable()
Overrides:
rowsAvailable in class CachedColumnModelSupport

rowsRevoked

protected void rowsRevoked()
Overrides:
rowsRevoked in class CachedColumnModelSupport

toString

public java.lang.String toString()
get string representation

Returns:
string representation

Oracle Data-aware Controls Reference

 

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