public class DataAvailableEvent
extends java.util.EventObject
DataAccess to a view and to notify the view when the DataAccess is no longer usable. Views listen for this event in order to remain current with the data provider.| Modifier and Type | Field and Description |
|---|---|
protected DataAccess |
_provider |
protected int |
_type |
static int |
DATA_AVAILABLE
Data is now available.
|
static int |
DATA_UNAVAILABLE
Data is no longer available.
|
| Constructor and Description |
|---|
DataAvailableEvent(java.lang.Object source, DataAccess provider)
Constructor for data availability only.
|
DataAvailableEvent(java.lang.Object source, int type, DataAccess provider)
Constructor for specifying either availability or unavailability.
|
| Modifier and Type | Method and Description |
|---|---|
DataAccess |
getDataAccess()
Retrieves the
DataAccess for this event. |
int |
getType()
Retrieves the type of change in availability.
|
public static final int DATA_AVAILABLE
public static final int DATA_UNAVAILABLE
protected int _type
protected DataAccess _provider
public DataAvailableEvent(java.lang.Object source,
int type,
DataAccess provider)
source - The source of this event.type - A constant that specifies whether the data is available or unavailable.provider - The DataAccess. If type is DATA_AVAILABLE, the DataAccess that provides access to the data. If type is DATA_UNAVAILABLE, the DataAccess that did provide access to the data but is no longer usable.
public DataAvailableEvent(java.lang.Object source,
DataAccess provider)
source - The source of this event.provider - The DataAccess that provides access to the data.public int getType()
public DataAccess getDataAccess()
DataAccess for this event.DataAccess that provides access to the data (if the getType method returns DATA_AVAILABLE), or that is no longer usable (if the getType method returns DATA_UNAVAILABLE).