KDialog is a trivial extension of JDialog
that provides support for tiling the background of the dialog with an
image and for firing dismissal events.
KDialog introduces the notion of a cancelled
dialog versus an accepted dialog. Collectively, these are known as
dialog dismissals. A dialog may be cancelled by
pressing a Cancel button or by closing the dialog window
altogether. A dialog may be accepted by pressing an OK button
or entering a value in one of the dialog's input components. It is
ultimately up to the subclasser to determine what constitutes a dialog
dismissal. The convenience method fireDialogDismissed() is
provided to generate dialog dismissal events. See
ComponentDialog for an example of this functionality.
Fire a dialog dismissed event. Notifies listeners that this dialog
is being dismissed.
Parameters:
type - The event type.
userObj - An arbitrary user object argument to pass in the event.
setVisible
public void setVisible(boolean flag)
Show or hide the dialog.
Parameters:
flag - A flag specifying whether the dialog should be shown or
hidden. If true, the startFocus() method is called
to allow the subclasser to request focus for a given child component.
This method is called when the dialog is made visible; it should
transfer focus to the appropriate child component. The default
implementation does nothing.
setBusyCursor
public void setBusyCursor(boolean flag)
Turn the busy cursor on or off for this dialog.
Parameters:
flag - If true, the wait cursor will be set for this dialog,
otherwise the default cursor will be set.
canClose
protected boolean canClose()
Determine if this dialog can be closed.
Returns:
true if the dialog may be closed, and false
otherwise. The default implementation returns true.
destroy
public void destroy()
Destroy this dialog. Call this method when the dialog is no longer
needed. The dialog will detach its listeners from the
UIChanageManager.