ConForM.CoopnTools.CoKer
Interface CoopnOption

All Known Subinterfaces:
CoopnParamOption
All Known Implementing Classes:
CoopnFlag

public interface CoopnOption

Option in CO-OPN tools environments. The values of these options may be given by decoding a specific option in the command line or by an apposite graphical dialog.

See Also:

Field Summary
static int ALL
          Maximal option level.
static int BASIC
          Standard option level.
static int EXTENDED
          Minimal option level.
 
Method Summary
 boolean decodeCommandLine(java.util.List elements, java.util.Map decodedOptions)
          Decode the command line.
 boolean decodeDialog(java.util.Map decodedOptions)
          Decode the dialog component.
 javax.swing.JComponent getDialogComponent()
          Return the SWING component associated to the option; for instance, a checkbox in the case of "-a".
 java.lang.String getHelpText()
          Return the help text associated to the option; for instance, "get all items" for "-a".
 java.lang.String getLabel()
          Return the label of the option; for instance "all" for "-a".
 int getLevel()
          Get the level of the option.
 java.lang.String getName()
          Return the name of the option; for instance, "a" for option "-a".
 

Field Detail

ALL

public static final int ALL
Maximal option level.

BASIC

public static final int BASIC
Standard option level.

EXTENDED

public static final int EXTENDED
Minimal option level.
Method Detail

getName

public java.lang.String getName()
Return the name of the option; for instance, "a" for option "-a".

getLabel

public java.lang.String getLabel()
Return the label of the option; for instance "all" for "-a".

getHelpText

public java.lang.String getHelpText()
Return the help text associated to the option; for instance, "get all items" for "-a".

getDialogComponent

public javax.swing.JComponent getDialogComponent()
Return the SWING component associated to the option; for instance, a checkbox in the case of "-a". There is one dialog component per flag object; multiple invocations to this method of the same object will return each time the same JComponent.

getLevel

public int getLevel()
Get the level of the option.

decodeCommandLine

public boolean decodeCommandLine(java.util.List elements,
                                 java.util.Map decodedOptions)
Decode the command line. The words of the command line are stored into a list; if the option is found in the command line, the associated elements are discarded form the list, and the association is put in a map
Parameters:
elements - A list of String
decodedOptions - The mapping of options
Returns:
false iff the option is found, but erroneous in the elements.

decodeDialog

public boolean decodeDialog(java.util.Map decodedOptions)
Decode the dialog component.
Returns:
false iff the option is found, but erroneous in the dialog.