borland Packages  Class Hierarchy  dbswing Package 

StatusLabelEvent class

java.lang.Object
   +----java.util.EventObject
           +----com.borland.dbswing.StatusLabelEvent

About the StatusLabelEvent class

Variables  Constructors  Properties  Methods  

Implements VetoableDispatch, Serializable

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

StatusLabelEvent informs all StatusLabelListeners that a JdbStatusLabel is about to display a message. A listener may suppress or replace the message. To replace it, the listener sets the JdbStatusLabel's text property, then throws a com.borland.jb.util.VetoException, which instructs JdbStatusLabel to do nothing further with the StatusEvent. To suppress the message, the listener just throws a VetoException. If no listener vetoes a StatusEvent, JdbStatusLabel displays the message as usual. A listener is not restricted to setting the JdbStatusLabel's text property; it can also display an icon or set other visible properties.

The read-only code property tells the source of the message and the reason for it. A message can come from the JdbStatusLabel itself, from a StatusEvent, or from a ValidationException. ValidationExceptions actually are wrapped as StatusEvents, but for convenience StatusLabelEvent assigns them a separate code. No event is fired when the JdbStatusLabel's displayMessages property is false or when a user message is displayed through JdbStatusLabel's setText() method.


StatusLabelEvent variables

Variables implemented in this class

Variables implemented in java.util.EventObject

StatusLabelEvent constructors

StatusLabelEvent properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

Properties implemented in java.util.EventObject

StatusLabelEvent methods

Methods implemented in this class

Methods implemented in java.lang.Object

Methods implemented in java.util.EventObject


StatusLabelEvent variables

DATASET_CHANGED

  public static final int DATASET_CHANGED = 5
Indicates JdbStatusLabel is about to display a message because the currently focused DataSet changed. The string about to be displayed by the JdbStatusLabel is the messageObject. If the text property has not been set, the string is "(empty dataset) Use <Insert> to insert new row." if the DataSet is empty, or "Record n of m" if the DataSet is not empty.

DATASET_CLOSED

  public static final int DATASET_CLOSED = 4
Indicates JdbStatusLabel is about to display a message because the DataSet closed. The string about to be displayed by the JdbStatusLabel is the messageObject. The string is " ".

DATASET_NAVIGATED

  public static final int DATASET_NAVIGATED = 6
Indicates JdbStatusLabel is about to display a message because the user navigated to a new row in the DataSet. The string about to be displayed by the JdbStatusLabel is the messageObject. The string is "(empty dataset) Use <Insert> to insert new row." if the DataSet is empty, or "Record n of m" if the DataSet not empty.

DATASET_OPENED

  public static final int DATASET_OPENED = 3
Indicates JdbStatusLabel is about to display a message because the DataSet opened. The string about to be displayed by the JdbStatusLabel is the messageObject. The string is "(empty dataset) Use <Insert> to insert new row." if the DataSet is empty, or "Record n of m" if the DataSet not empty.

DATASET_ROW_CHANGED

  public static final int DATASET_ROW_CHANGED = 7
Indicates JdbStatusLabel is about to display a message because it received a DataChangeEvent.ROW_CHANGED event. This event occurs whenever a column value has changed (but the row has not yet been posted). The string about to be displayed by the JdbStatusLabel is the messageObject. JdbStatusLabel sets the string to " " to clear any remaining validation exception messages.

EXCEPTION

  public static final int EXCEPTION = 2
Indicates JdbStatusLabel is about to display a message generated by an Exception. The string "EXCEPTION OBJECT WHOSE MESSAGE IS" that is about to be displayed by the JdbStatusLabel is the messageObject.

INIT

  public static final int INIT = 0
Indicates the JdbStatusLabel is about to display its initial message. If the label's text property has been set, the string in messageObject is its value. If the text property has not been set, the string is "(empty dataset) Use <Insert> to insert new row." if the DataSet is empty, or "Record n of m" if the DataSet is not empty.

STATUS_EVENT

  public static final int STATUS_EVENT = 1
Indicates JdbStatusLabel is about to display a message generated by a StatusEvent. The messageObject is the actual StatusEvent whose message is about to be displayed by JdbStatusLabel.

StatusLabelEvent constructors

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

  public StatusLabelEvent(Object source, int code, Object messageObject)
Constructs a StatusLabelEvent with the specified source of the event, the code indicating what event occurred, and the messageObject that displays on the JdbStatusLabel.

Parameters:

source
The source Object that generated the event.
code
One of the StatusEvent variables that identifies the event that occurred.
messageObject
The message that appears on the JdbStatusLabel.

StatusLabelEvent properties

code

 public final int getCode()
Returns the code that indicates the kind of event that occurred.

messageObject

 public final Object getMessageObject()
Returns the message for the event that displays on the JdbStatusLabel.