net.sf.okapi.common.uidescription

## Class EditorDescription

- java.lang.Object
- - net.sf.okapi.common.uidescription.EditorDescription

-     public class EditorDescription
      extends java.lang.Object

  Describes the different UI parts and the layout to use for a generic editor.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EditorDescription()` Creates a new EditorDescription object.
    `EditorDescription(java.lang.String caption)` Creates a new EditorDescription object with a given caption.
    `EditorDescription(java.lang.String caption, boolean defaultVertical, boolean defaultLabelFlushed)` Creates a new EditorDescription object with a given caption and given default options.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CheckboxPart` | `addCheckboxPart(ParameterDescriptor paramDescriptor)` Adds a check box UI part to this editor description.
    `CheckListPart` | `addCheckListPart(java.lang.String label, int heightHint)` Adds a check list UI part to this editor description.
    `CodeFinderPart` | `addCodeFinderPart(ParameterDescriptor paramDescriptor)` Adds a code-finder panel part to this editor description.
    `FolderInputPart` | `addFolderInputPart(ParameterDescriptor paramDescriptor, java.lang.String browseTitle)` Adds a folder input field UI part to this editor description.
    `ListSelectionPart` | `addListSelectionPart(ParameterDescriptor paramDescriptor, java.lang.String[] choices)` Adds a selection list UI part to this editor description.
    `PathInputPart` | `addPathInputPart(ParameterDescriptor paramDescriptor, java.lang.String browseTitle, boolean forSaveAs)` Adds a path input field UI part to this editor description.
    `SeparatorPart` | `addSeparatorPart()` Adds a separator part to this editor description.
    `SpinInputPart` | `addSpinInputPart(ParameterDescriptor paramDescriptor)` Adds a spin part to this editor description.
    `TextInputPart` | `addTextInputPart(ParameterDescriptor paramDescriptor)` Adds a default text input UI part to this editor description.
    `TextLabelPart` | `addTextLabelPart(java.lang.String text)`
    `java.lang.String` | `getCaption()` Gets the caption for this editor.
    `AbstractPart` | `getDescriptor(java.lang.String name)` Gets the descriptor for a given UI part.
    `java.util.Map<java.lang.String,AbstractPart>` | `getDescriptors()` Gets a map of the descriptor of all UI parts for this editor.
    `void` | `setCaption(java.lang.String caption)` Sets the caption for this editor.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EditorDescription

          public EditorDescription()

      Creates a new EditorDescription object.

    - #### EditorDescription

          public EditorDescription(java.lang.String caption)

      Creates a new EditorDescription object with a given caption.
      Parameters:
        `caption` - the caption of the editor.

    - #### EditorDescription

          public EditorDescription(java.lang.String caption,
                           boolean defaultVertical,
                           boolean defaultLabelFlushed)

      Creates a new EditorDescription object with a given caption and given default options.
      Parameters:
        `caption` - the caption of the editor.
        `defaultVertical` - default value for this option.
        `defaultLabelFlushed` - default value for this option.

  - ### Method Detail

    - #### getCaption

          public java.lang.String getCaption()

      Gets the caption for this editor.
      Returns:
        the caption for this editor.

    - #### setCaption

          public void setCaption(java.lang.String caption)

      Sets the caption for this editor.
      Parameters:
        `caption` - the caption for this editor.

    - #### getDescriptors

          public java.util.Map<java.lang.String,AbstractPart> getDescriptors()

      Gets a map of the descriptor of all UI parts for this editor.
      Returns:
        a map of all descriptor of the UI parts.

    - #### getDescriptor

          public AbstractPart getDescriptor(java.lang.String name)

      Gets the descriptor for a given UI part.
      Parameters:
        `name` - the name of the UI part to lookup.
      Returns:
        the descriptor for the given UI part.

    - #### addTextInputPart

          public TextInputPart addTextInputPart(ParameterDescriptor paramDescriptor)

      Adds a default text input UI part to this editor description.
      Parameters:
        `paramDescriptor` - the parameter descriptor for this UI part.
      Returns:
        the UI part created by this call.

    - #### addCheckboxPart

          public CheckboxPart addCheckboxPart(ParameterDescriptor paramDescriptor)

      Adds a check box UI part to this editor description.
      Parameters:
        `paramDescriptor` - the parameter descriptor for this UI part.
      Returns:
        the UI part created by this call.

    - #### addCheckListPart

          public CheckListPart addCheckListPart(java.lang.String label,
                                       int heightHint)

      Adds a check list UI part to this editor description.
      Parameters:
        `label` - the text of the label above the list
        `heightHint` - the suggested height of the list.
      Returns:
        the UI part created by this call.

    - #### addListSelectionPart

          public ListSelectionPart addListSelectionPart(ParameterDescriptor paramDescriptor,
                                               java.lang.String[] choices)

      Adds a selection list UI part to this editor description.
      Parameters:
        `paramDescriptor` - the parameter descriptor for this UI part.
        `choices` - the list of items values that can be selected.
      Returns:
        the UI part created by this call.

    - #### addPathInputPart

          public PathInputPart addPathInputPart(ParameterDescriptor paramDescriptor,
                                       java.lang.String browseTitle,
                                       boolean forSaveAs)

      Adds a path input field UI part to this editor description.
      Parameters:
        `paramDescriptor` - the parameter descriptor for this UI part.
        `browseTitle` - the title to use for the path browsing dialog.
        `forSaveAs` - true if the path is to save a file (vs to open one).
      Returns:
        the UI part created by this call.

    - #### addFolderInputPart

          public FolderInputPart addFolderInputPart(ParameterDescriptor paramDescriptor,
                                           java.lang.String browseTitle)

      Adds a folder input field UI part to this editor description.
      Parameters:
        `paramDescriptor` - the parameter descriptor for this UI part.
        `browseTitle` - the title to use for the directory browsing dialog.
      Returns:
        the UI part created by this call.

    - #### addCodeFinderPart

          public CodeFinderPart addCodeFinderPart(ParameterDescriptor paramDescriptor)

      Adds a code-finder panel part to this editor description.
      Parameters:
        `paramDescriptor` - the parameter descriptor for this UI part.
      Returns:
        the UI part created by this call.

    - #### addSpinInputPart

          public SpinInputPart addSpinInputPart(ParameterDescriptor paramDescriptor)

      Adds a spin part to this editor description.
      Parameters:
        `paramDescriptor` - the parameter descriptor for this UI part.
      Returns:
        the UI part created by this call.

    - #### addSeparatorPart

          public SeparatorPart addSeparatorPart()

      Adds a separator part to this editor description.
      Returns:
        the UI part created by this call.

    - #### addTextLabelPart

          public TextLabelPart addTextLabelPart(java.lang.String text)