Class CancelDialog
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Dialog
|
+----CancelDialog
- public class CancelDialog
- extends Dialog
- implements ActionListener
Class definition for a dialog window which displays a message
and allows the user to press a Cancel button.
- Version:
- $Revision: 1.5 $, $Date: 2000/10/12 14:07:47 $
- Author:
- John Cavanaugh
-
buttonPanel
- A panel for the 'Cancel' button.
-
CANCEL
-
-
cancelled
- An indication of whether the Cancel button has been pressed.
-
owner
- The frame which owns the dialog window.
-
textPanel
- A panel for the text message.
-
CancelDialog(Frame, String, String[])
- Constructs a dialog window.
-
actionPerformed(ActionEvent)
- Action for ActionListener interface; called when the Cancel
button is pressed.
-
centerDialog()
- Center the dialog in the parent frame.
-
isCancelled()
- Get the cancellation status
CANCEL
private static final String CANCEL
owner
private Frame owner
- The frame which owns the dialog window.
cancelled
protected boolean cancelled
- An indication of whether the Cancel button has been pressed.
buttonPanel
protected Panel buttonPanel
- A panel for the 'Cancel' button.
textPanel
protected Panel textPanel
- A panel for the text message.
CancelDialog
public CancelDialog(Frame owner,
String title,
String text[])
- Constructs a dialog window.
- Parameters:
- frame - The frame which owns the dialog window.
- title - A title for the dialog window.
- text - The text message to be displayed.
isCancelled
public boolean isCancelled()
- Get the cancellation status
- Returns:
- True if the Cancel button has been pressed;
false otherwise.
centerDialog
protected void centerDialog()
- Center the dialog in the parent frame.
actionPerformed
public void actionPerformed(ActionEvent e)
- Action for ActionListener interface; called when the Cancel
button is pressed.
- Parameters:
- e - The event that triggered the action.