jeters.components
Class FileIO

java.lang.Object
  extended by jeters.components.FileIO
All Implemented Interfaces:
Component, InputComponent<EditableText>, OutputComponent<EditableText>

public class FileIO
extends java.lang.Object
implements InputComponent<EditableText>, OutputComponent<EditableText>

default implementation of a combined input and output component reading from and writing to text files in the local file system.


Constructor Summary
FileIO()
           
 
Method Summary
 EditableText getInput(UIComponent uiForRequests)
          receive a text that can be edited by the program
 void output(EditableText text, UIComponent uiForRequests)
          receive a text that can be edited by the program
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileIO

public FileIO()
Method Detail

getInput

public EditableText getInput(UIComponent uiForRequests)
Description copied from interface: InputComponent
receive a text that can be edited by the program

Specified by:
getInput in interface InputComponent<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(EditableText text,
                   UIComponent uiForRequests)
Description copied from interface: OutputComponent
receive a text that can be edited by the program

Specified by:
output in interface OutputComponent<EditableText>
Parameters:
text - the text that has been edited and should now be printed/written/etc. as the result
uiForRequests - UI-component for communication with the user (if necessary)