fdda.dialog
Interface DialogControl

All Known Implementing Classes:
AlgorithmDialogControl, OptionsDialogControl, StatisticsDialogControl

public interface DialogControl

Generic interface for classes that control dialogs.

Author:
Jörg Rüdenauer

Method Summary
 boolean canClose(boolean closedByOK)
          Returns whether the dialog can be closed.
 void executeCommand(int command)
          Executes a command (e.g. the user pressed a button).
 String getErrors()
          If the dialog can't be closed because data is not valid, this method returns an error message for the user.
 

Method Detail

executeCommand

public void executeCommand(int command)
                    throws NoSuchCommandException
Executes a command (e.g. the user pressed a button).

Parameters:
command - the command ID
Throws:
NoSuchCommandException - if no such command is supported by this dialog control

canClose

public boolean canClose(boolean closedByOK)
Returns whether the dialog can be closed. If parameter is true, checks should be performed whether the current data is valid. If the data is valid and the dialog can be closed, processing may occur before the dialog really closes. To avoid awkward situations, consider processing in an extra thread.

Parameters:
closedByOK - whether the user closed the dialog with a confirming choice
Returns:
whether the dialog can be closed

getErrors

public String getErrors()
If the dialog can't be closed because data is not valid, this method returns an error message for the user.

Returns:
error message


API documentation for FDDA version 0.9. Generated on 17/02/2004 14:12.