Oracle Data-aware Controls Reference

oracle.dacf.control.swing
Class ListDataSource

java.lang.Object
  extended byjavax.swing.AbstractListModel
      extended byoracle.dacf.control.swing.ColumnModelSupport
          extended byoracle.dacf.control.swing.ListDataSource
All Implemented Interfaces:
oracle.dacf.rp.Consumer, javax.infobus.DataItemChangeListener, java.util.EventListener, javax.infobus.InfoBusDataConsumer, javax.infobus.InfoBusEventListener, InfoBusManagerListener, javax.infobus.InfoBusMember, javax.swing.ListModel, javax.swing.event.ListSelectionListener, oracle.dacf.rp.Participant, java.beans.PropertyChangeListener, java.io.Serializable

public class ListDataSource
extends ColumnModelSupport
implements javax.swing.event.ListSelectionListener, java.beans.PropertyChangeListener

ListDataSource provides a JFC's ListModel implementation which gets its items from a infobus ScrollableRowsetAccess.

ListDataSource binds itself to the given column in a ScrollableRowsetAccess dataItem and provides a read-only access to all the column values.

ListDataSource works with a JList. It listens on the JList's selection model and keeps the list selection and ScrollableRowsetAccess currency in sync.

Version:
SDK
See Also:
Serialized Form

Field Summary
 
Fields inherited from class oracle.dacf.control.swing.ColumnModelSupport
bDisableEvent
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
ListDataSource(javax.swing.JList list, ListControl control)
          Constructs a default ListDataSource for the given list
 
Method Summary
 void dataItemRevoked(javax.infobus.InfoBusItemRevokedEvent event)
          This method is called by the InfoBus class on behalf of a data producer that is revoking the availability of a previously announced data item.
 java.lang.String getName(java.lang.Object newDataItem)
          get the value of the data item as a string
 void propertyChange(java.beans.PropertyChangeEvent e)
          Called when JList's selectionModel changes.
 void selectionChanged(java.lang.Object anObject)
          Notification from a ListSelectionModel about the change in a selection.Used when it is thie to update
 java.lang.String toString()
          obtain a string representation
 void valueChanged(javax.swing.event.ListSelectionEvent event)
          Notification from a ListSelectionModel about the change in a selection.
 
Methods inherited from class oracle.dacf.control.swing.ColumnModelSupport
_findColumnIndex, _getItemFromCursor, _isRowChanged, _isViewRefreshed, _releaseResourcesInternal, addInfoBusPropertyListener, addInfoBusVetoableListener, available, dataItemAdded, dataItemAvailable, dataItemDeleted, dataItemRevoked, dataItemValueChanged, getArrayAccess, getDataItemName, getElementAt, getInfoBus, getInfoBusName, getRowsetAccess, getSelection, getSize, releaseResources, removeInfoBusPropertyListener, removeInfoBusVetoableListener, revoked, rowsAdded, rowsAvailable, rowsChanged, rowsDeleted, rowsetCursorMoved, rowsRevoked, 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
 

Constructor Detail

ListDataSource

public ListDataSource(javax.swing.JList list,
                      ListControl control)
Constructs a default ListDataSource for the given list

Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Called when JList's selectionModel changes.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class ColumnModelSupport
Parameters:
e - The event.

dataItemRevoked

public void dataItemRevoked(javax.infobus.InfoBusItemRevokedEvent event)
This method is called by the InfoBus class on behalf of a data producer that is revoking the availability of a previously announced data item.

Specified by:
dataItemRevoked in interface javax.infobus.InfoBusDataConsumer
Overrides:
dataItemRevoked in class ColumnModelSupport
Parameters:
event - The event.

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent event)
Notification from a ListSelectionModel about the change in a selection.

Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener

selectionChanged

public void selectionChanged(java.lang.Object anObject)
Notification from a ListSelectionModel about the change in a selection.Used when it is thie to update


toString

public java.lang.String toString()
obtain a string representation

Returns:
a string representation

getName

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

Parameters:
newDataItem - data item whose string value has to be obtained
Returns:
string value of the data item

Oracle Data-aware Controls Reference

 

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