kiwi.event
Class DialogDismissEvent

java.lang.Object
  |
  +--kiwi.event.DialogDismissEvent

public class DialogDismissEvent
extends Object

Event generated by one of the Kiwi dialog classes when it has been dismissed via an OK or Cancel button. The event object stores the type of dismissal.

Version:
1.0 (10/98)
Author:
Mark Lindner, PING Software Group
See Also:
DialogDismissListener

Field Summary
static int CANCEL
          Dismissal type; the Cancel button was pressed.
static int OK
          Dismissal type; the OK button was pressed.
 
Constructor Summary
DialogDismissEvent(Dialog source, int type)
          Construct a new DialogDismissEvent.
DialogDismissEvent(Dialog source, int type, Object userObject)
          Construct a new DialogDismissEvent.
 
Method Summary
 Dialog getSource()
          Get the source of this event.
 int getType()
          Get the dismissal type.
 Object getUserObject()
          Get the user object associated with this event.
 boolean isCancelled()
          Determine if the dialog was cancelled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CANCEL

public static final int CANCEL
Dismissal type; the Cancel button was pressed.

OK

public static final int OK
Dismissal type; the OK button was pressed.
Constructor Detail

DialogDismissEvent

public DialogDismissEvent(Dialog source,
                          int type)
Construct a new DialogDismissEvent.
Parameters:
source - The dialog that is the source of this event.
type - The dismissal type; one of the numeric constants defined above.

DialogDismissEvent

public DialogDismissEvent(Dialog source,
                          int type,
                          Object userObject)
Construct a new DialogDismissEvent.
Parameters:
source - The dialog that is the source of this event.
type - The dismissal type; one of the numeric constants defined above.
userObject - An arbitrary user object to associate with this event.
Method Detail

getSource

public Dialog getSource()
Get the source of this event.
Returns:
the Dialog that generated this event.

getUserObject

public Object getUserObject()
Get the user object associated with this event.
Returns:
The user object associated with this event, or null if none was associated.

isCancelled

public boolean isCancelled()
Determine if the dialog was cancelled.
Returns:
true if the dialog was dismissed via the Cancel button; equivalent to getType() == CANCEL.

getType

public int getType()
Get the dismissal type.
Returns:
The dismissal type; one of the numeric constants defined above.