Class ConfigSectionImpl

    • Field Detail

      • L10N_SECTION_PREFIX

        public static final java.lang.String L10N_SECTION_PREFIX
        See Also:
        Constant Field Values
      • sectionID

        private final java.lang.String sectionID
      • parentSectionID

        private final java.lang.String parentSectionID
      • minUserMode

        private final int minUserMode
      • defaultMode

        private int defaultMode
      • isBuilt

        private boolean isBuilt
      • defaultUITypes

        private java.lang.String[] defaultUITypes
      • mapPluginParams

        protected final java.util.Map<java.lang.String,​ParameterImpl> mapPluginParams
    • Constructor Detail

      • ConfigSectionImpl

        public ConfigSectionImpl​(java.lang.ref.WeakReference<BasicPluginConfigModel> model_ref)
      • ConfigSectionImpl

        public ConfigSectionImpl​(java.lang.String sectionID,
                                 java.lang.String parentSectionID)
      • ConfigSectionImpl

        public ConfigSectionImpl​(java.lang.String sectionID,
                                 java.lang.String parentSectionID,
                                 int minUserMode)
    • Method Detail

      • getConfigSectionID

        public final java.lang.String getConfigSectionID()
        Description copied from interface: BaseConfigSection
        In order for the plugin to display its section correctly, a key in the Plugin language file will need to contain ConfigView.section.<getConfigSectionID() result>=The Section name.
        Specified by:
        getConfigSectionID in interface BaseConfigSection
        Returns:
        The name of the configuration section
      • getParentSectionID

        public final java.lang.String getParentSectionID()
        Description copied from interface: BaseConfigSection
        Returns section you want your configuration panel to be under. See BasicPluginConfigModel.SECTION_* constants. To add a subsection to your own ConfigSection, return the getConfigSectionID result of your parent.
        Specified by:
        getParentSectionID in interface BaseConfigSection
      • setDefaultUserModeForAdd

        public final void setDefaultUserModeForAdd​(int defaultMode)
        Any Parameters added after this call will be auto-assigned this user mode
      • setDefaultUITypesForAdd

        public final void setDefaultUITypesForAdd​(java.lang.String... defaultUITypes)
        Any Parameters added after this call will be auto-assigned these UI Types
        Parameters:
        defaultUITypes - UIInstance.UIT_SWT, UIInstance.UIT_CONSOLE, etc
      • add

        @SafeVarargs
        protected final <T extends ParameterImpl> T add​(T param,
                                                        java.util.List<Parameter>... otherLists)
      • add

        @SafeVarargs
        protected final <T extends ParameterImpl> T add​(T param,
                                                        int minMode,
                                                        java.util.List<Parameter>... otherLists)
      • add

        @SafeVarargs
        protected final <T extends ParameterImpl> T add​(java.lang.String key,
                                                        T param,
                                                        java.util.List<Parameter>... otherLists)
      • add

        @SafeVarargs
        protected final <T extends ParameterImpl> T add​(java.lang.String key,
                                                        T param,
                                                        int minMode,
                                                        java.util.List<Parameter>... otherLists)
      • guessParamName

        protected java.lang.String guessParamName​(Parameter param,
                                                  boolean warnExists)
      • findPluginParamKey

        public final java.lang.String findPluginParamKey​(Parameter param)
      • saveConfigSection

        public void saveConfigSection()
        Description copied from interface: BaseConfigSection
        User selected Save. All saving of non-plugin tabs have been completed, as well as saving of plugins that implement com.biglybt.pif.ui.config parameters.
        Specified by:
        saveConfigSection in interface BaseConfigSection
      • requestRebuild

        public void requestRebuild()
        Description copied from interface: BaseConfigSection
        Request the UI to rebuild this config section. For SWT, all SWT objects will be disposed and recreated.
        Specified by:
        requestRebuild in interface BaseConfigSection
      • getMaxUserMode

        public final int getMaxUserMode()
        Description copied from interface: BaseConfigSection
        Indicate if additional options are available to display a hint to the users
        Specified by:
        getMaxUserMode in interface BaseConfigSection
        Returns:
        the highest user mode that reveals additional options (0 = Beginner, 1 = Intermediate, 2 = Advanced)
      • getSectionNameKey

        public static java.lang.String getSectionNameKey​(java.lang.String sectionID)