Class PickDialog

Class PickDialog

PickDialog

class PickDialog
extends Dialog
A modal dialog box that allows the user to pick one item from a Vector of strings.

Variable Index

 o bFinished

Constructor Index

 o PickDialog(AgentLauncher, Frame, Vector, String)
Constructor, save the frame, AgentLauncher, String Vector and header string for future use.

Method Index

 o ShowAndLayout()
Size the dialog to something appropriate, then make it non-resizeable so that users don't go resizing it themselves.
 o action(Event, Object)
Deal with the user either hitting the OK/Cancel button or selecting an item from the list.
 o getSelected()
Return the String item which was selected from the list by the user.

Variables

 o bFinished
  public boolean bFinished

Constructors

 o PickDialog
  public PickDialog(AgentLauncher a,
                    Frame p,
                    Vector al,
                    String header)
Constructor, save the frame, AgentLauncher, String Vector and header string for future use. The AgentLauncher is used to callback when the user hits ok.
Parameters:
a - An AgentLauncher to call back to when OK is hit
p - The parent frame of this dialog, needed for the Dialog constructor
al - The Vector of Strings that will appear in the list box for the user to choose from.
header - The String which will appear as a header OVER the list of possible choices.

Methods

 o getSelected
  public String getSelected()
Return the String item which was selected from the list by the user.
Returns:
String The String item that was selected from the Vector displayed in the dialog.
 o ShowAndLayout
  public void ShowAndLayout()
Size the dialog to something appropriate, then make it non-resizeable so that users don't go resizing it themselves.
 o action
  public boolean action(Event e,
                        Object o)
Deal with the user either hitting the OK/Cancel button or selecting an item from the list. Shows a nag box if the user hits ok without an item selected. Tells the AgentLauncher to load the class if the user hits OK.
Returns:
false if the user hasn't selected a proper item, false otherwise.