net.sf.jeters.componentInterface
Interface UIComponent

All Superinterfaces:
Component
All Known Subinterfaces:
UIComponent_HomeView
All Known Implementing Classes:
DefaultCLI, DefaultGUI

public interface UIComponent
extends Component

the interface making a class a JETERS-UI-component.

for details about user interface components and other JETERS concepts read the documentation provided for the project.

Author:
Tobias Knerr

Method Summary
 java.lang.String confirmChanges(java.lang.String label, java.lang.String oldVersion, java.lang.String newVersion, java.lang.String descriptionOfChanges, boolean allowCancel)
          allows the user to accept/decline changes made by a replacer component (i.e. an implementation of ReplacerComponent).
 net.sf.jeters.componentInterface.dataStructs.NamedDataSet request(net.sf.jeters.componentInterface.dataStructs.UIRequest... requests)
          way for other components to communicate with the user via the UI
 

Method Detail

confirmChanges

java.lang.String confirmChanges(java.lang.String label,
                                java.lang.String oldVersion,
                                java.lang.String newVersion,
                                java.lang.String descriptionOfChanges,
                                boolean allowCancel)
allows the user to accept/decline changes made by a replacer component (i.e. an implementation of ReplacerComponent). UIComponents should at least offer the possibility of choosing between the old and the new version of the text. Additionally, they can allow manual editing.

Parameters:
label - a kind of "name" (filename, article title, ...); can be "", but not null.
oldVersion - the text before the replacer's actions; can be "", but not null.
newVersion - the text after the replacer's actions; can be "", but not null.
descriptionOfChanges - an explanation of the differences between oldVersion and newVersion provided by the replacer component; can be "", but not null.
allowCancel - if false, cancelling must not be possible; if true, possibility depends on UI
Returns:
String containing the corrected text as the user wants it, may also be different from both oldVersion and newVersion; null indicates that the user chose to cancel the editing process and is only possible if allowCancel == true.

request

net.sf.jeters.componentInterface.dataStructs.NamedDataSet request(net.sf.jeters.componentInterface.dataStructs.UIRequest... requests)
way for other components to communicate with the user via the UI

Parameters:
requests - array of UIRequests (can use vararg-syntax). Neither the array nor the array's entries may be null.
Returns:
user's replies to the requests, as a NamedDataSet.
The name of a reply must equal the name of the answered request. null has a special meaning here: It indicates that the user intentionally cancels the request. Otherwise, null must not be returned! If getting proper replies fails, return a NamedDataSet that is empty or contains at least those replies which were properly entered.