summaryrefslogtreecommitdiff
path: root/java/gjt/MessageDialog.java
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-09-23 07:40:53 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-09-23 07:40:53 +0000
commitf7fc0a325de3ed035ba49b57bce59f40e3e47334 (patch)
tree0ee9b34bda3d7c4e6edb2a849b7e8fb249aba464 /java/gjt/MessageDialog.java
parentad435afda0158f2154ae04cb764766f17f5f24bd (diff)
downloadATCD-f7fc0a325de3ed035ba49b57bce59f40e3e47334.tar.gz
This commit was manufactured by cvs2svn to create tag 'TAO-0_2_14'.TAO-0_2_14
Diffstat (limited to 'java/gjt/MessageDialog.java')
-rw-r--r--java/gjt/MessageDialog.java77
1 files changed, 0 insertions, 77 deletions
diff --git a/java/gjt/MessageDialog.java b/java/gjt/MessageDialog.java
deleted file mode 100644
index 4b00bc7033f..00000000000
--- a/java/gjt/MessageDialog.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package gjt;
-
-import java.awt.*;
-
-/**
- * A dialog that displays a message and comes equipped with an
- * Ok button with which the dialog is dismissed.<p>
- *
- * Note that there is only one MessageDialog, that gets
- * reused. Clients must call getMessageDialog() in order to
- * access the one and only MessageDialog.<p>
- *
- * <em>Note: The 1.0.2 version of the AWT seems to have
- * introduced a bug that causes pack() to work incorrectly
- * under Win95.</em>
- *
- * @version 1.0, Apr 1 1996
- * @author David Geary
- * @see GJTDialog
- * @see gjt.test.MessageDialogTest
- * @see gjt.test.DialogTest
- */
-public class MessageDialog extends GJTDialog {
- static private MessageDialog _theMessageDialog;
-
- private Button okButton;
- private String message;
- private ButtonPanel buttonPanel = new ButtonPanel();
-
- static public MessageDialog getMessageDialog(Frame frame,
- DialogClient client,
- String title,
- String message) {
- if(_theMessageDialog == null)
- _theMessageDialog = new MessageDialog(frame,
- client,
- title,
- message);
- else {
- _theMessageDialog.setClient (client);
- _theMessageDialog.setTitle (title);
- _theMessageDialog.setMessage(message);
- }
- return _theMessageDialog;
- }
- private MessageDialog(Frame frame, DialogClient client,
- String title, String message) {
- super(frame, title, client, true);
- okButton = buttonPanel.add("Ok");
-
- setLayout(new BorderLayout());
- add("Center", new MessagePanel(message));
- add("South", buttonPanel);
- pack();
- }
- public void show() {
- okButton.requestFocus();
- super.show();
- }
- public boolean action(Event event, Object what) {
- hide();
- client.dialogDismissed(this);
- return true;
- }
- private void setMessage(String message) {
- this.message = message;
- }
-}
-
-class MessagePanel extends Panel {
- public MessagePanel(String message) {
- add("Center", new Label(message, Label.CENTER));
- }
- public Insets insets() {
- return new Insets(10,10,10,10);
- }
-}