Oracle Data-aware Controls Reference

oracle.dacf.control.swing
Class ColumnModelSupport

java.lang.Object
  extended byjavax.swing.AbstractListModel
      extended byoracle.dacf.control.swing.ColumnModelSupport
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, oracle.dacf.rp.Participant, java.beans.PropertyChangeListener, java.io.Serializable
Direct Known Subclasses:
CachedColumnModelSupport, ListDataSource

public class ColumnModelSupport
extends javax.swing.AbstractListModel
implements javax.infobus.InfoBusMember, javax.infobus.InfoBusDataConsumer, javax.infobus.DataItemChangeListener, oracle.dacf.rp.Consumer, InfoBusManagerListener

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

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

Version:
SDK
See Also:
Serialized Form

Field Summary
protected  boolean bDisableEvent
           
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
ColumnModelSupport(Control control)
          Constructs a ColumnModelSupport object
 
Method Summary
protected  int _findColumnIndex(java.lang.String columnName)
           
protected  java.lang.Object _getItemFromCursor(int rowIndex, int colIndex)
           
protected  boolean _isRowChanged(javax.infobus.DataItemValueChangedEvent e)
           
protected  boolean _isViewRefreshed(javax.infobus.DataItemValueChangedEvent e)
           
protected  void _releaseResourcesInternal(InfoBusManagerReleaseEvent e)
           
 void addInfoBusPropertyListener(java.beans.PropertyChangeListener l)
          Adds a PropertyChangeListener that will be alerted whenever the InfoBusMember's setInfoBus method is called and not vetoed.
 void addInfoBusVetoableListener(java.beans.VetoableChangeListener l)
          Adds a VetoableChangeListener to the list of listeners that will be alerted whenever the InfoBusMember's setInfoBus method is called.
 void available(java.lang.String name, java.lang.Object publishedObject)
           
 void dataItemAdded(javax.infobus.DataItemAddedEvent e)
          Indicates that a new item was added to the bound aggregate data item (e.g.
 void dataItemAvailable(javax.infobus.InfoBusItemAvailableEvent event)
          This method is called by the InfoBus class on behalf of a data producer that is announcing the availability of a new data item by name.
 void dataItemDeleted(javax.infobus.DataItemDeletedEvent e)
          Indicates that an item was deleted from the bound aggregate data item (e.
 void dataItemRevoked(javax.infobus.DataItemRevokedEvent e)
          Indicates that the bound data item (and its sub-items, if any) has been revoked, and is temporarily unavailable.
 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.
 void dataItemValueChanged(javax.infobus.DataItemValueChangedEvent e)
          Indicates a changed value in the bound data item.
protected  javax.infobus.ArrayAccess getArrayAccess()
           
 java.lang.String getDataItemName()
          Gets the name of the dataItem this model uses to get its list of values.
 java.lang.Object getElementAt(int index)
          Get the item at the specifed 0 based index
 javax.infobus.InfoBus getInfoBus()
          Gets the infobus this model is currently connected to.
 java.lang.String getInfoBusName()
          Returns name of the infobus this model is connected to.
protected  javax.infobus.ScrollableRowsetAccess getRowsetAccess()
           
 int getSelection()
          Get the 0 based cursor position of the ScrollableRowsetAccess this model is bound to
 int getSize()
           
 void propertyChange(java.beans.PropertyChangeEvent event)
          This method gets called when the object's InfoBus property is changed.
 void releaseResources(InfoBusManagerReleaseEvent e)
          A signalling method used to indicate the the control should free all resources and unregister any listeners that it has registered.
 void removeInfoBusPropertyListener(java.beans.PropertyChangeListener l)
          Removes a PropertyChangeListener from the list of listeners requesting notification of an InfoBus change.
 void removeInfoBusVetoableListener(java.beans.VetoableChangeListener l)
          Removes a VetoableChangeListener from the list of listeners requesting notification of an InfoBus change.
 void revoked(java.lang.String name, java.lang.Object publishedObject)
           
protected  void rowsAdded(int startIndex, int count)
           
protected  void rowsAvailable()
           
protected  void rowsChanged(int startIndex, int count)
           
protected  void rowsDeleted(int startIndex, int count)
           
 void rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent e)
          Indicates that the cursor for the bound RowsetAccess data item has changed rows.
protected  void rowsRevoked()
           
 void setDataItemName(java.lang.String dataItemName)
          Specifies the name of the dataItem this model uses to get its list of values.
 void setInfoBus(javax.infobus.InfoBus infobus)
          Specifies the infobus this model should be connected to.
 void setInfoBusName(java.lang.String infoBusName)
          Specifies name of the new infobus this model should be connected.
 void setSelection(int selection)
          Convenience method to move the cursor of the bound ScrollableRowsetAccess to the specified position
 
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, toString, wait, wait, wait
 

Field Detail

bDisableEvent

protected boolean bDisableEvent
Constructor Detail

ColumnModelSupport

public ColumnModelSupport(Control control)
Constructs a ColumnModelSupport object

Method Detail

getInfoBusName

public java.lang.String getInfoBusName()
Returns name of the infobus this model is connected to.

Returns:
name of the infobus

setInfoBusName

public void setInfoBusName(java.lang.String infoBusName)
Specifies name of the new infobus this model should be connected.

The model leaves the previous infobus before connecting to the given infobus.


releaseResources

public void releaseResources(InfoBusManagerReleaseEvent e)
Description copied from interface: InfoBusManagerListener
A signalling method used to indicate the the control should free all resources and unregister any listeners that it has registered.

Specified by:
releaseResources in interface InfoBusManagerListener

_releaseResourcesInternal

protected void _releaseResourcesInternal(InfoBusManagerReleaseEvent e)

setDataItemName

public void setDataItemName(java.lang.String dataItemName)
Specifies the name of the dataItem this model uses to get its list of values.


getDataItemName

public java.lang.String getDataItemName()
Gets the name of the dataItem this model uses to get its list of values.

Returns:
Fully qaulified dataItemName

getSize

public int getSize()
Specified by:
getSize in interface javax.swing.ListModel

getElementAt

public java.lang.Object getElementAt(int index)
Get the item at the specifed 0 based index

Specified by:
getElementAt in interface javax.swing.ListModel
Returns:
the item

setSelection

public void setSelection(int selection)
Convenience method to move the cursor of the bound ScrollableRowsetAccess to the specified position

Parameters:
selection - 0 based, new cursor position.

getSelection

public int getSelection()
Get the 0 based cursor position of the ScrollableRowsetAccess this model is bound to

Returns:
cursor postion

_findColumnIndex

protected int _findColumnIndex(java.lang.String columnName)

_getItemFromCursor

protected java.lang.Object _getItemFromCursor(int rowIndex,
                                              int colIndex)

dataItemValueChanged

public void dataItemValueChanged(javax.infobus.DataItemValueChangedEvent e)
Indicates a changed value in the bound data item.

ColumnModelSupport notifies its listeners upon receiving this event.

Specified by:
dataItemValueChanged in interface javax.infobus.DataItemChangeListener
See Also:
DataItemChangeListener.dataItemValueChanged(javax.infobus.DataItemValueChangedEvent)

dataItemAdded

public void dataItemAdded(javax.infobus.DataItemAddedEvent e)
Indicates that a new item was added to the bound aggregate data item (e.g. ArrayAccess, a JDK Collection, etc).

A reference to the data item that was added, and a reference to the one that gained it, can be obtained from the event.

ColumnModelSupport notifies its listeners upon receiving this event.

Specified by:
dataItemAdded in interface javax.infobus.DataItemChangeListener
See Also:
DataItemChangeListener.dataItemAdded(javax.infobus.DataItemAddedEvent)

dataItemDeleted

public void dataItemDeleted(javax.infobus.DataItemDeletedEvent e)
Indicates that an item was deleted from the bound aggregate data item (e. g. ArrayAccess, a JDK Collection, etc).

A reference to the data item that was deleted, and a reference to the one that lost it, can be obtained from the event.

ColumnModelSupport notifies its listeners upon receiving this event.

Specified by:
dataItemDeleted in interface javax.infobus.DataItemChangeListener
See Also:
DataItemChangeListener.dataItemDeleted(javax.infobus.DataItemDeletedEvent)

dataItemRevoked

public void dataItemRevoked(javax.infobus.DataItemRevokedEvent e)
Indicates that the bound data item (and its sub-items, if any) has been revoked, and is temporarily unavailable.

A reference to the data item that was revoked can be obtained from the event.

ColumnModelSupport notifies its listeners upon receiving this event.

Specified by:
dataItemRevoked in interface javax.infobus.DataItemChangeListener
See Also:
DataItemChangeListener.dataItemRevoked(javax.infobus.DataItemRevokedEvent)

rowsetCursorMoved

public void rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent e)
Indicates that the cursor for the bound RowsetAccess data item has changed rows.

A reference to the rowset data item can be obtained from the event.

ColumnModelSupport notifies its listeners upon receiving this event.

Specified by:
rowsetCursorMoved in interface javax.infobus.DataItemChangeListener
See Also:
DataItemChangeListener.rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent)

available

public void available(java.lang.String name,
                      java.lang.Object publishedObject)
Specified by:
available in interface oracle.dacf.rp.Consumer

revoked

public void revoked(java.lang.String name,
                    java.lang.Object publishedObject)
Specified by:
revoked in interface oracle.dacf.rp.Consumer

dataItemAvailable

public void dataItemAvailable(javax.infobus.InfoBusItemAvailableEvent event)
This method is called by the InfoBus class on behalf of a data producer that is announcing the availability of a new data item by name.

Specified by:
dataItemAvailable in interface javax.infobus.InfoBusDataConsumer
Parameters:
event - 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
Parameters:
event - The event.

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
This method gets called when the object's InfoBus property is changed.

The object is removed as a data consumer from its previous InfoBus, and is added as a consumer to its new InfoBus.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
event - The event.

addInfoBusPropertyListener

public void addInfoBusPropertyListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener that will be alerted whenever the InfoBusMember's setInfoBus method is called and not vetoed.

Specified by:
addInfoBusPropertyListener in interface javax.infobus.InfoBusMember
Parameters:
l - the PropertyChangeListener to be added

removeInfoBusPropertyListener

public void removeInfoBusPropertyListener(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener from the list of listeners requesting notification of an InfoBus change.

Specified by:
removeInfoBusPropertyListener in interface javax.infobus.InfoBusMember
Parameters:
l - the listener to be removed

addInfoBusVetoableListener

public void addInfoBusVetoableListener(java.beans.VetoableChangeListener l)
Adds a VetoableChangeListener to the list of listeners that will be alerted whenever the InfoBusMember's setInfoBus method is called.

Specified by:
addInfoBusVetoableListener in interface javax.infobus.InfoBusMember
Parameters:
l - the VetoableChangeListener to be added

removeInfoBusVetoableListener

public void removeInfoBusVetoableListener(java.beans.VetoableChangeListener l)
Removes a VetoableChangeListener from the list of listeners requesting notification of an InfoBus change.

Specified by:
removeInfoBusVetoableListener in interface javax.infobus.InfoBusMember
Parameters:
l - the listener to be removed

getInfoBus

public javax.infobus.InfoBus getInfoBus()
Gets the infobus this model is currently connected to.

Specified by:
getInfoBus in interface javax.infobus.InfoBusMember
Returns:
the infobus

setInfoBus

public void setInfoBus(javax.infobus.InfoBus infobus)
                throws java.beans.PropertyVetoException
Specifies the infobus this model should be connected to.

Specified by:
setInfoBus in interface javax.infobus.InfoBusMember
Parameters:
infobus - to connect to.
Throws:
java.beans.PropertyVetoException - thrown if any of the listeners vetoes this change.

_isViewRefreshed

protected boolean _isViewRefreshed(javax.infobus.DataItemValueChangedEvent e)

_isRowChanged

protected boolean _isRowChanged(javax.infobus.DataItemValueChangedEvent e)

getRowsetAccess

protected javax.infobus.ScrollableRowsetAccess getRowsetAccess()

getArrayAccess

protected javax.infobus.ArrayAccess getArrayAccess()

rowsAvailable

protected void rowsAvailable()

rowsRevoked

protected void rowsRevoked()

rowsAdded

protected void rowsAdded(int startIndex,
                         int count)

rowsDeleted

protected void rowsDeleted(int startIndex,
                           int count)

rowsChanged

protected void rowsChanged(int startIndex,
                           int count)

Oracle Data-aware Controls Reference

 

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