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

Variable Index

 o buttonPanel
A panel for the 'Cancel' button.
 o CANCEL
 o cancelled
An indication of whether the Cancel button has been pressed.
 o owner
The frame which owns the dialog window.
 o textPanel
A panel for the text message.

Constructor Index

 o CancelDialog(Frame, String, String[])
Constructs a dialog window.

Method Index

 o actionPerformed(ActionEvent)
Action for ActionListener interface; called when the Cancel button is pressed.
 o centerDialog()
Center the dialog in the parent frame.
 o isCancelled()
Get the cancellation status

Variables

 o CANCEL
 private static final String CANCEL
 o owner
 private Frame owner
The frame which owns the dialog window.

 o cancelled
 protected boolean cancelled
An indication of whether the Cancel button has been pressed.

 o buttonPanel
 protected Panel buttonPanel
A panel for the 'Cancel' button.

 o textPanel
 protected Panel textPanel
A panel for the text message.

Constructors

 o 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.

Methods

 o isCancelled
 public boolean isCancelled()
Get the cancellation status

Returns:
True if the Cancel button has been pressed; false otherwise.
 o centerDialog
 protected void centerDialog()
Center the dialog in the parent frame.

 o 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.