borland Packages Class Hierarchy dbswing Package
java.lang.Object +----java.util.EventObject +----com.borland.dbswing.StatusLabelEvent
Variables Constructors Properties Methods
Implements VetoableDispatch, Serializable
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
. ValidationException
s actually are wrapped as StatusEvent
s, 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.
public static final int DATASET_CHANGED = 5Indicates
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.
public static final int DATASET_CLOSED = 4Indicates
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 " ".
public static final int DATASET_NAVIGATED = 6Indicates
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.
public static final int DATASET_OPENED = 3Indicates
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.
public static final int DATASET_ROW_CHANGED = 7Indicates
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.
public static final int EXCEPTION = 2Indicates
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
.
public static final int INIT = 0Indicates 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.
public static final int STATUS_EVENT = 1Indicates
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
.
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
.
source
Object
that generated the event.
code
StatusEvent
variables that identifies the event that occurred.
messageObject
JdbStatusLabel
.
public final int getCode()Returns the code that indicates the kind of event that occurred.
public final Object getMessageObject()Returns the message for the event that displays on the
JdbStatusLabel
.