Class CMAEditorInterface.Control

  • Enclosing class:
    CMAEditorInterface

    public static class CMAEditorInterface.Control
    extends java.lang.Object
    This class represents one control of the editor interface.
    • Constructor Detail

      • Control

        public Control()
    • Method Detail

      • getFieldId

        public java.lang.String getFieldId()
        Returns:
        the field id this control applies to.
      • setFieldId

        public CMAEditorInterface.Control setFieldId​(java.lang.String fieldId)
        Change the id of the field for this control.
        Parameters:
        fieldId - new id to be set.
        Returns:
        this instance for chaining.
      • addSetting

        public CMAEditorInterface.Control addSetting​(java.lang.String key,
                                                     java.lang.String value)
        Adds a new custom setting to the settings.

        Side effect: might create a new map, if no map was created before.

        Parameters:
        key - the settings key to be added.
        value - the value of the key to be added.
        Returns:
        this instance for chaining.
      • addHelpText

        public CMAEditorInterface.Control addHelpText​(java.lang.String helpText)
        Adds a new custom help text to the settings.

        Side effect: might create a new map, if no map was created before.

        Parameters:
        helpText - display this text to the user.
        Returns:
        this instance for chaining.
      • getHelpText

        public java.lang.String getHelpText()
        Returns:
        the set help text or null if none is set.
      • getSettings

        public java.util.Map<java.lang.String,​java.lang.String> getSettings()
        Returns:
        a list of currently set settings, or null if none is set.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        a human readable string, representing the object.