net.sf.jeters.components
Class UserIO
java.lang.Object
net.sf.jeters.util.AssistedTranslatable
net.sf.jeters.components.UserIO
- All Implemented Interfaces:
- Component, InputComponent<net.sf.jeters.componentInterface.editables.EditableText>, OutputComponent<net.sf.jeters.componentInterface.editables.EditableText>, Translatable
public class UserIO
- extends AssistedTranslatable
- implements InputComponent<net.sf.jeters.componentInterface.editables.EditableText>, OutputComponent<net.sf.jeters.componentInterface.editables.EditableText>
default implementation of a combined input and output component
reading from and writing to the user interface component.
The output component can handle any implementation of EditableText.
If, however, the text is an instance of MediaWikiText, it will display
the additionally available information, too.
- Author:
- Tobias Knerr
Method Summary |
net.sf.jeters.componentInterface.editables.PlainText |
getInput(UIComponent uiForRequests)
receive a text that can be edited by the program |
void |
output(net.sf.jeters.componentInterface.editables.EditableText text,
UIComponent uiForRequests)
the output method necessary for all output components. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserIO
public UserIO()
getInput
public net.sf.jeters.componentInterface.editables.PlainText getInput(UIComponent uiForRequests)
- Description copied from interface:
InputComponent
- receive a text that can be edited by the program
- Specified by:
getInput
in interface InputComponent<net.sf.jeters.componentInterface.editables.EditableText>
- Parameters:
uiForRequests
- UI-component for communication with the user (if necessary)
- Returns:
- the text for editing, is allowed to be null in cases where loading fails for some reason
output
public void output(net.sf.jeters.componentInterface.editables.EditableText text,
UIComponent uiForRequests)
- the output method necessary for all output components.
Instead of directly handling the output, this method chooses a more specialized method
depending on the true type of the parameter "text".
- Specified by:
output
in interface OutputComponent<net.sf.jeters.componentInterface.editables.EditableText>
- Parameters:
text
- the text that has been edited and should now be printed/written/etc. as the resultuiForRequests
- UI-component for communication with the user (if necessary)