net.sf.okapi.common
Interface IParametersEditor


public interface IParametersEditor

Common way to call in an editor to modify the parameters of a component. The parameters are implemented through the IParameters interface.


Method Summary
 IParameters createParameters()
          Creates an instance of the parameters object the editor can edit (with the default values).
 boolean edit(IParameters paramsObject, boolean readOnly, IContext context)
          Edits the values for the given parameters.
 

Method Detail

edit

boolean edit(IParameters paramsObject,
             boolean readOnly,
             IContext context)
Edits the values for the given parameters. If the edit succeeds (returns true), the parameters have been updated in p_Parameters to reflect the changes.

Parameters:
paramsObject - the parameters to edit.
readOnly - indicates if the editor is used just to view the parameters. If true, the editor must return false.
context - an implementation of the IContext interface that holds caller-specific information.
Returns:
true if the edit was successful, false if the user canceled or if an error occurred, or if the read-only mode is set.

createParameters

IParameters createParameters()
Creates an instance of the parameters object the editor can edit (with the default values). This allows the user to create new parameters object from the interface, without knowing what exact type of object is created.

Returns:
an instance of the parameters object for the editor.