net.sf.freecol.client.control
Class InGameInputHandler.ShowConfirmDialogSwingTask

java.lang.Object
  extended by net.sf.freecol.client.control.InGameInputHandler.SwingTask
      extended by net.sf.freecol.client.control.InGameInputHandler.ShowConfirmDialogSwingTask
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
InGameInputHandler

 class InGameInputHandler.ShowConfirmDialogSwingTask
extends InGameInputHandler.SwingTask

This class shows a dialog and saves the answer (ok/cancel).


Field Summary
private  java.lang.String _cancelText
           
private  java.lang.String _okText
           
private  java.lang.String[] _replace
           
private  java.lang.String _text
           
 
Constructor Summary
InGameInputHandler.ShowConfirmDialogSwingTask(java.lang.String text, java.lang.String okText, java.lang.String cancelText, java.lang.String... replace)
          Constructor.
 
Method Summary
 boolean confirm()
          Show dialog and wait for selection.
protected  java.lang.Object doWork()
          Override this method to do the actual work.
 
Methods inherited from class net.sf.freecol.client.control.InGameInputHandler.SwingTask
getResult, invokeAndWait, invokeLater, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_text

private java.lang.String _text

_okText

private java.lang.String _okText

_cancelText

private java.lang.String _cancelText

_replace

private java.lang.String[] _replace
Constructor Detail

InGameInputHandler.ShowConfirmDialogSwingTask

public InGameInputHandler.ShowConfirmDialogSwingTask(java.lang.String text,
                                                     java.lang.String okText,
                                                     java.lang.String cancelText,
                                                     java.lang.String... replace)
Constructor.

Parameters:
text - The key for the question.
okText - The key for the OK button.
cancelText - The key for the Cancel button.
replace - The replacement values.
Method Detail

confirm

public boolean confirm()
Show dialog and wait for selection.

Returns:
true if OK, false if Cancel.

doWork

protected java.lang.Object doWork()
Description copied from class: InGameInputHandler.SwingTask
Override this method to do the actual work.

Specified by:
doWork in class InGameInputHandler.SwingTask
Returns:
result.