borland Packages  Class Hierarchy  dbswing Package 

DBDisposeMonitor component

java.lang.Object
   +----com.borland.dbswing.DBDisposeMonitor

About the DBDisposeMonitor component

Constructors  Properties  Methods  

Implements Designable, ComponentListener, WindowListener, Serializable, EventListener

Note: This is a feature of JBuilder Professional and Enterprise.

DBDisposeMonitor is a utility component which helps ensure that DataSet resources used by dbSwing data-aware controls are released when the Window containing the controls (usually a Frame) is disposed. In particular, when the Window the DBDisposeMonitor is monitoring is disposed (or, optionally, closed), DBDisposeMonitor will search for all data-aware components in the Window and set their DataSet property to null.

DBDisposeMonitor is also a useful monitoring tool when developing applications which use DataExpress DataStore components. A DBDisposeMonitor which has been assigned a container will automatically close any DataStores it detects when the container is disposed. You can alter this behavior by setting the closeDataStores property, which is true by default.

There are two ways to set up a DBDisposeMonitor for use in an application. The simplest way is to set the dataAwareComponentContainer property to the container (usually a JFrame, but could also be a JPanel) to monitor. Alternatively, you can explicitly specify an array of data-aware components to monitor via the dataSetAwareComponents property.


DBDisposeMonitor constructors

DBDisposeMonitor properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

DBDisposeMonitor methods

Methods implemented in this class

Methods implemented in java.lang.Object


DBDisposeMonitor constructors

DBDisposeMonitor()

  public DBDisposeMonitor()
Constructs a DBDisposeMonitor component.

DBDisposeMonitor properties

closeConnections

 public boolean isCloseConnections()
 public void setCloseConnections(boolean closeConnections)
Returns and sets whether the DBDisposeMonitor should automatically close any open database connections it finds when its container is disposed. This property is true by default.

closeDataStores

 public boolean isCloseDataStores()
 public void setCloseDataStores(boolean closeDataStores)
Returns and sets whether DBDisposeMonitor automatically detects and closes any DataStore components when its container is disposed. This property is true by default.

dataAwareComponentContainer

 public Container getDataAwareComponentContainer()
 public void setDataAwareComponentContainer(Container container)
Returns and sets the array of data-aware components which should be deregistered as DataSet listeners when DBDisposeMonitor detects that a window is being disposed.

If set, this property overrides the dataSetAwareComponents property.

See also: dataAwareComponentContainer

dataSetAwareComponents

 public DataSetAware[] getDataSetAwareComponents()
 public void setDataSetAwareComponents(DataSetAware[] dataAwareComponents)
Returns and sets the array of data-aware components which should be deregistered as DataSet listeners when DBDisposeMonitor detects that a window is being disposed or closed.

The dataAwareComponentContainer property has precedence over this property.

executeOnWindowClosing

 public boolean isExecuteOnWindowClosing()
 public void setExecuteOnWindowClosing(boolean doOnClosing)
Determines whether DBDisposeMonitor will execute on Window.CLOSING events as well as Window.CLOSE (dispose) events.

This property is true by default.