borland Packages  Class Hierarchy  dx.dataset Package 

AccessEvent class

java.lang.Object
   +----java.util.EventObject
           +----com.borland.jb.util.DispatchableEvent
                   +----com.borland.dx.dataset.AccessEvent

About the AccessEvent class

Variables  Constructors  Properties  Methods  

Implements Serializable

The AccessEvent is the internal event generated when a DataSet is opened, closed, or restructured. The AccessEvent class may be useful for component writers. Not for general usage.

The AccessListener class responds to the AccessEvent class.


AccessEvent variables

Variables implemented in this class

Variables implemented in java.util.EventObject

AccessEvent constructors

AccessEvent properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in com.borland.jb.util.DispatchableEvent

Properties implemented in java.lang.Object

Properties implemented in java.util.EventObject

AccessEvent methods

Methods implemented in this class

Methods implemented in com.borland.jb.util.DispatchableEvent

Methods implemented in java.lang.Object


AccessEvent variables

CLOSE

  public static final int CLOSE = 2
Event type. Returned from getID().

COLUMN_ADD

  public static final int COLUMN_ADD = 3
Reason for an OPEN event. Structural change where a Column was added to the DataSet.

COLUMN_CHANGE

  public static final int COLUMN_CHANGE = 5
Reason for an OPEN event. Structural change where a Column was changed in the DataSet.

COLUMN_DROP

  public static final int COLUMN_DROP = 4
Reason for an OPEN event. Structural change where a Column was dropped from the DataSet.

COLUMN_MOVE

  public static final int COLUMN_MOVE = 6
Reason for an OPEN event. Structural change where a Column was moved in the DataSet.

DATA_CHANGE

  public static final int DATA_CHANGE = 2
Reason for an OPEN event. Indicates that data has changed, but no structural changes were made. This is used when a DataSet's sort property is changed or a DataSet.empty() is called. It is also used when DataSet.enableDataSetEvents(true) is called.

OPEN

  public static final int OPEN = 1
Event type. Returned from getID().

PROPERTY_CHANGE

  public static final int PROPERTY_CHANGE = 9
Will get pertinent information when a following OPEN event occurs. Reason for CLOSE event. This is called when a non-structural property change like Column Font or Color is changed. Also used when DataSet.enableDataSetEvents(false) is called. Note that this event will not be sent to a DataSetView that is listening to its associated StorageDataSet. In practice, this event only makes its way to visual components that listen to Access events.

STRUCTURE_CHANGE

  public static final int STRUCTURE_CHANGE = 8
Reason for CLOSE event. Indicates that DataSet was closed and it is expected to be reopened in a short time period. Usually called to perform a sort order change or structural property change.

UNKNOWN

  public static final int UNKNOWN = 7
Reason for a CLOSE event. Indicates that DataSet was closed and it is not known whether it will be opened again. Calling DataSet.close() will cause this event.

UNSPECIFIED

  public static final int UNSPECIFIED = 1
Reason for an OPEN event. Unknown DataSet.open() will cause this. Returned from getReason().

AccessEvent constructors

AccessEvent(java.lang.Object, com.borland.dx.dataset.AccessEvent)

  public AccessEvent(Object source, AccessEvent event)
Creates an internal event from the given source for the specified event.

Parameters:

source
The event source.
event
The type of event that changed a DataSet.

AccessEvent(java.lang.Object, int)

  public AccessEvent(Object source, int id)
Creates an internal event from the given source with the specified event type.

Parameters:

source
The event source.
id
The event type: An OPEN event is 1; a CLOSE event is 2.

AccessEvent(java.lang.Object, int, int)

  public AccessEvent(Object source, int id, int reason)
Creates an internal event from the given source with the specified event type and reason.

Parameters:

source
The event source.
id
The event type: An OPEN event is 1; a CLOSE event is 2.
reason
The reason for the event. Reasons for OPEN events include: Reasons for CLOSE events include:

AccessEvent(java.lang.Object, int, int, com.borland.dx.dataset.Column)

  public AccessEvent(Object source, int id, int reason, Column dropColumn)
Creates an internal event from the given source with the specified event type and reason. The internal event drops the specified column.

Parameters:

source
The event source.
id
The event type: An OPEN event is 1; a CLOSE event is 2.
reason
The reason for the event. Reasons for OPEN events include: Reasons for CLOSE events include:
dropColumn
The name of the column being dropped.

AccessEvent(java.lang.Object, int, int, com.borland.dx.dataset.Column, com.borland.dx.dataset.Column)

  public AccessEvent(Object source, int id, int reason, Column oldColumn, Column newColumn)
Creates an internal event from the given source with the specified event type and reason. The internal event restructures the table.

Parameters:

source
The event source.
id
The event type: An OPEN event is 1; a CLOSE event is 2.
reason
The reason for the event. Reasons for OPEN events include: Reasons for CLOSE events include:
oldColumn
The name of the column to replace.
newColumn
The name of the column to replace oldColumn with.

AccessEvent(java.lang.Object, int, int, int, int)

  public AccessEvent(Object source, int id, int reason, int oldOrdinal, int newOrdinal)
Creates an internal event from the given source with the specified event type and reason. The internal event restructures the table.

Parameters:

source
The event source.
id
The event type: An OPEN event is 1; a CLOSE event is 2.
reason
The reason for the event. Reasons for OPEN events include: Reasons for CLOSE events include:
oldOrdinal
The ordinal number of the column to replace.
newOrdinal
The ordinal number of the column to replace oldOrdinal with.

AccessEvent properties

dropColumn

 public Column getDropColumn()
Read-only property that returns information about which Column was dropped from a COLUMN_DROP operation.

ID

 public final int getID()
The event type. Valid return values for this method are defined as variables in this class.

newColumn

 public Column getNewColumn()
Read-only property that returns information on a new Column from a COLUMN_CHANGE operation.

newOrdinal

 public int getNewOrdinal()
Read-only property that returns the new ordinal position when a Column is moved.

oldColumn

 public Column getOldColumn()
Read-only property that returns the old Column from a COLUMN_CHANGE operation.

oldOrdinal

 public int getOldOrdinal()
Read-only property that returns the previous ordinal position when a Column is moved.

reason

 public final int getReason()
Read-only property that returns the reason for the event. Valid values are defined in the variables section of this class.

AccessEvent methods

dispatch(java.util.EventListener)

  public void dispatch(EventListener listener)
This method is used internally by other com.borland classes. You should never use this method directly.

Overrides: com.borland.jb.util.DispatchableEvent.dispatch(java.util.EventListener)