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  StringTemplate text
           
private  Tile tile
           
 
Constructor Summary
InGameInputHandler.ShowConfirmDialogSwingTask(Tile tile, StringTemplate text, java.lang.String okText, java.lang.String cancelText)
          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, invokeSpecial, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tile

private Tile tile

text

private StringTemplate text

okText

private java.lang.String okText

cancelText

private java.lang.String cancelText
Constructor Detail

InGameInputHandler.ShowConfirmDialogSwingTask

public InGameInputHandler.ShowConfirmDialogSwingTask(Tile tile,
                                                     StringTemplate text,
                                                     java.lang.String okText,
                                                     java.lang.String cancelText)
Constructor.

Parameters:
tile - An optional tile to make visible.
text - The key for the question.
okText - The key for the OK button.
cancelText - The key for the Cancel button.
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.