All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.bulletproof.gui.MessageDialog

java.lang.Object
   |
   +----com.bulletproof.gui.Component
           |
           +----com.bulletproof.gui.Container
                   |
                   +----com.bulletproof.gui.Dialog
                           |
                           +----com.bulletproof.gui.MessageDialog

public class MessageDialog
extends Dialog
implements ActionListener
Class MessageDialog represents a message dialog window.


Constructor Index

 o MessageDialog(Frame, String)
 o MessageDialog(Frame, String, String, String[])

Method Index

 o actionPerformed(ActionEvent)
 o addActionListener(ActionListener)
 o display(int, int)
 o getButtonCount()
Get the button count for the dialog.
 o getButtonText(int)
Get the text for the selected button.
 o getMessage()
Get the message for the dialog.
 o getPressedButton()
Get the number of the button that was pressed.
 o removeActionListener(ActionListener)
 o setButtonCount(int)
Set the button count for the dialog.
 o setButtonText(int, String)
Set the text for the selected button.
 o setMessage(String)
Set the message for the dialog.

Constructors

 o MessageDialog
 public MessageDialog(Frame parent,
                      String title)
 o MessageDialog
 public MessageDialog(Frame parent,
                      String title,
                      String message,
                      String buttons[])

Methods

 o display
 public void display(int xpos,
                     int ypos)
Overrides:
display in class Dialog
 o setMessage
 public void setMessage(String text)
Set the message for the dialog.

Parameters:
message - the message for the dialog.
 o getMessage
 public String getMessage()
Get the message for the dialog.

Returns:
the message for the dialog.
 o setButtonCount
 public void setButtonCount(int count)
Set the button count for the dialog.

Parameters:
count - the button count for the dialog.
 o getButtonCount
 public int getButtonCount()
Get the button count for the dialog.

Returns:
the button count for the dialog.
 o setButtonText
 public void setButtonText(int button,
                           String text)
Set the text for the selected button.

Parameters:
button - the button to set the text.
text - the text for the selected button.
 o getButtonText
 public String getButtonText(int button)
Get the text for the selected button.

Parameters:
button - the button to set the text.
Returns:
the text for the selected button.
 o getPressedButton
 public int getPressedButton()
Get the number of the button that was pressed. Returns -1 if dialog was closed.

Returns:
the number of the button that was pressed.
 o actionPerformed
 public void actionPerformed(ActionEvent e)
Overrides:
actionPerformed in class Dialog
 o addActionListener
 public void addActionListener(ActionListener al)
Overrides:
addActionListener in class Dialog
 o removeActionListener
 public void removeActionListener(ActionListener al)
Overrides:
removeActionListener in class Dialog

All Packages  Class Hierarchy  This Package  Previous  Next  Index