org.cishell.service.guibuilder
Interface GUI


public interface GUI

A simple GUI for user interaction. A single SelectionListener can be set to be informed when the user enters information and hits Ok.

Author:
Bruce Herr (bh2@bh2.net)

Method Summary
 void close()
          Closes the GUI
 boolean isClosed()
          Returns if the GUI is closed
 void open()
          Opens the GUI and shows it to the user
 Dictionary openAndWait()
          Pops up this GUI, gets data from the user, and returns what they entered.
 void setSelectionListener(SelectionListener listener)
          Sets the selection listener to be informed when the user finishes entering information and hits 'Ok' or cancels
 

Method Detail

openAndWait

Dictionary openAndWait()
Pops up this GUI, gets data from the user, and returns what they entered. This is a convenience method that first opens the GUI, then shows the GUI to the user, who then enters in the needed information, which is then taken and put into a Dictionary, and is given to this method's caller.

Returns:
The data the user entered or null if the operation was cancelled

open

void open()
Opens the GUI and shows it to the user


close

void close()
Closes the GUI


isClosed

boolean isClosed()
Returns if the GUI is closed

Returns:
If the GUI has been closed or not

setSelectionListener

void setSelectionListener(SelectionListener listener)
Sets the selection listener to be informed when the user finishes entering information and hits 'Ok' or cancels

Parameters:
listener - The listener to notify