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.
-
bFinished
-
-
PickDialog(AgentLauncher, Frame, Vector, String)
- Constructor, save the frame, AgentLauncher, String Vector
and header string for future use.
-
ShowAndLayout()
- Size the dialog to something appropriate, then make it
non-resizeable so that users don't go resizing it themselves.
-
action(Event, Object)
- Deal with the user either hitting the OK/Cancel button or
selecting an item from the list.
-
getSelected()
- Return the String item which was selected from the list by
the user.
bFinished
public boolean bFinished
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.
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.
ShowAndLayout
public void ShowAndLayout()
- Size the dialog to something appropriate, then make it
non-resizeable so that users don't go resizing it themselves.
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.