kirk.gui.dialog
Interface Retriever

All Known Implementing Classes:
SingleInputRetriever

public interface Retriever

This interface allows classes to retrieve the value(s) from an InputDialog. It prescribes one method: public boolean retrieve(InputDialog inputdialog), which will be called when the InputDialog is confirmed.

Version:
1
Author:
Berend "Kirk" Wouda
See Also:
InputDialog

Method Summary
 boolean retrieve(InputDialog inputdialog)
          The method that is called of the implementing Retriever.
 

Method Detail

retrieve

public boolean retrieve(InputDialog inputdialog)
The method that is called of the implementing Retriever. This method is generally used for retrieving the data from the passed InputDialog (after casting it to the correct subclass). If the data you retrieved was incorrect, you might want to return false, which indicates that the InputDialog should not close and bother the user some more, until he enters a correct value. If you wish to alert the user that the input was not valid, you can pop up another PopupDialog, on the active InputDialog (it is passed to retrieve() after all :) ). Alternatively, you could catch the false return in your custom InputDialog and make it display a message.

If you get null or similar values from the InputDialog, it might have been cancelled.

Parameters:
inputdialog - The InputDialog which the data should be retrieved of.
Returns:
true if the InputDialog should close, false if it should stay open.