oracle.dacf.control.swing
Class ComboBoxDataSource
java.lang.Object
|
+--javax.swing.AbstractListModel
|
+--oracle.dacf.control.swing.ColumnModelSupport
|
+--oracle.dacf.control.swing.CachedColumnModelSupport
|
+--oracle.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
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
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, 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 |
_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
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 controllistDataItemName
- data item name for the combo
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
- Overrides:
toString
in class java.lang.Object
- Returns:
- string representation