borland Packages  Class Hierarchy  jbcl.model Package  Index 

ModelEvent class (abstract)

java.lang.Object
   +----java.util.EventObject
           +----borland.jbcl.util.DispatchableEvent
                   +----borland.jbcl.model.ModelEvent
                           +----borland.jbcl.model.SingletonModelEvent
                           +----borland.jbcl.model.VectorModelEvent
                           +----borland.jbcl.model.MatrixModelEvent
                           +----borland.jbcl.model.GraphModelEvent

About the ModelEvent class

Variables  Constructors  Properties  Methods  

Implements Serializable

ModelEvent is an abstract class that other model-event classes extend. It contains the variables that identify the basic type of event that occurred: a content change or a structure change within the model. These variables are the possible values of the ID property. The ModelEvent object has a paramString() method that displays the parameters of the event object.


ModelEvent variables

Variables implemented in this class

Variables implemented in java.util.EventObject

ModelEvent constructors

ModelEvent properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in borland.jbcl.util.DispatchableEvent

Properties implemented in java.lang.Object

Properties implemented in java.util.EventObject

ModelEvent methods

Methods implemented in this class

Methods implemented in borland.jbcl.util.DispatchableEvent

Methods implemented in java.lang.Object


ModelEvent variables

CONTENT_CHANGED

  public static final int CONTENT_CHANGED = 0x0001
Used to indicate that the content within the model changed. For example, a data item was edited.

STRUCTURE_CHANGED

  public static final int STRUCTURE_CHANGED = 0x0002
Used to indicate that the structure within the model changed. For example, a new item was added to the list in a VectorModel object or a row was added to the matrix in a MatrixModel object.

ModelEvent constructors

ModelEvent(java.lang.Object, int)

  public ModelEvent(java.lang.Object source, int id)
Constructs a model event object and passes the object specified as the source to its superclass and initializes the ID property.

Parameters:

source
The object that generates, or fires, this event.
id
The variable that identifies the basic type of event. Use one the ModelEvent variables.

ModelEvent properties

ID

 public int getID()
Returns the event-type ID for the event. The integer returned is one of the ModelEvent variables.

ModelEvent methods

paramString()

  protected String paramString()
Displays the parameters of the event as a string. The string is this:

"id=" + idString

where idString is one of the ModelEvent variables.

Classes that extend ModelEvent override paramString() by first calling paramString() of ModelEvent and then appending their unique parameters to the string.

Overrides: borland.jbcl.util.DispatchableEvent.paramString()