Package com.biglybt.ui.config
Class ConfigSectionImpl
java.lang.Object
com.biglybt.ui.config.ConfigSectionImpl
- All Implemented Interfaces:
BaseConfigSection
- Direct Known Subclasses:
BasicPluginConfigImpl
,ConfigSectionBackupRestore
,ConfigSectionConnection
,ConfigSectionConnectionAdvanced
,ConfigSectionConnectionDNS
,ConfigSectionConnectionEncryption
,ConfigSectionConnectionProxy
,ConfigSectionFile
,ConfigSectionFileMove
,ConfigSectionFilePerformance
,ConfigSectionFileTorrents
,ConfigSectionFileTorrentsDecoding
,ConfigSectionHolder
,ConfigSectionInterfaceAlertsSWT
,ConfigSectionInterfaceColorSWT
,ConfigSectionInterfaceDisplaySWT
,ConfigSectionInterfaceLanguage
,ConfigSectionInterfaceLegacySWT
,ConfigSectionInterfacePasswordSWT
,ConfigSectionInterfaceStartSWT
,ConfigSectionInterfaceSWT
,ConfigSectionInterfaceTablesSWT
,ConfigSectionInterfaceTags
,ConfigSectionIPFilter
,ConfigSectionLogging
,ConfigSectionMode
,ConfigSectionPlugins
,ConfigSectionSecurity
,ConfigSectionSharing
,ConfigSectionStartShutdown
,ConfigSectionStats
,ConfigSectionTracker
,ConfigSectionTrackerClient
,ConfigSectionTrackerServer
,ConfigSectionTransfer
,ConfigSectionTransferAutoSpeedClassic
,ConfigSectionTransferAutoSpeedSelect
,ConfigSectionTransferAutoSpeedV2
,ConfigSectionTransferLAN
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private String[]
private boolean
static final String
protected final Map<String,
ParameterImpl> private final int
private final String
private ConfigSectionRebuildRunner
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionConfigSectionImpl
(WeakReference<BasicPluginConfigModel> model_ref) ConfigSectionImpl
(String sectionID, String parentSectionID) ConfigSectionImpl
(String sectionID, String parentSectionID, int minUserMode) -
Method Summary
Modifier and TypeMethodDescriptionprotected final <T extends ParameterImpl>
Tprotected final <T extends ParameterImpl>
Tprotected final <T extends ParameterImpl>
Tprotected final <T extends ParameterImpl>
Tvoid
Config view is closingfinal String
findPluginParamKey
(Parameter param) final String
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.final int
Indicate if additional options are available to display a hint to the usersfinal int
Returns the minimum user mode needed for this section to be displayed.final Parameter[]
final String
Returns section you want your configuration panel to be under.final ParameterImpl
getPluginParam
(String key) static String
getSectionNameKey
(String sectionID) protected String
guessParamName
(Parameter param, boolean warnExists) final boolean
isBuilt()
final void
void
Request the UI to rebuild this config section.void
User selected Save.final void
setDefaultUITypesForAdd
(String... defaultUITypes) Any Parameters added after this call will be auto-assigned these UI Typesfinal void
setDefaultUserModeForAdd
(int defaultMode) Any Parameters added after this call will be auto-assigned this user modevoid
setRebuildRunner
(ConfigSectionRebuildRunner rebuildRunner) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.ui.config.BaseConfigSection
build
-
Field Details
-
L10N_SECTION_PREFIX
- See Also:
-
sectionID
-
parentSectionID
-
minUserMode
private final int minUserMode -
defaultMode
private int defaultMode -
isBuilt
private boolean isBuilt -
defaultUITypes
-
rebuildRunner
-
mapPluginParams
-
-
Constructor Details
-
ConfigSectionImpl
-
ConfigSectionImpl
-
ConfigSectionImpl
-
-
Method Details
-
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 interfaceBaseConfigSection
- Returns:
- The name of the configuration section
-
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 interfaceBaseConfigSection
-
postBuild
public final void postBuild()- Specified by:
postBuild
in interfaceBaseConfigSection
-
isBuilt
public final boolean isBuilt()- Specified by:
isBuilt
in interfaceBaseConfigSection
-
setDefaultUserModeForAdd
public final void setDefaultUserModeForAdd(int defaultMode) Any Parameters added after this call will be auto-assigned this user mode -
setDefaultUITypesForAdd
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, List<Parameter>... otherLists) -
add
@SafeVarargs protected final <T extends ParameterImpl> T add(T param, int minMode, List<Parameter>... otherLists) -
add
@SafeVarargs protected final <T extends ParameterImpl> T add(String key, T param, List<Parameter>... otherLists) -
add
@SafeVarargs protected final <T extends ParameterImpl> T add(String key, T param, int minMode, List<Parameter>... otherLists) -
guessParamName
-
getParamArray
- Specified by:
getParamArray
in interfaceBaseConfigSection
-
getPluginParam
- Specified by:
getPluginParam
in interfaceBaseConfigSection
-
findPluginParamKey
-
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 interfaceBaseConfigSection
-
deleteConfigSection
public void deleteConfigSection()Description copied from interface:BaseConfigSection
Config view is closing- Specified by:
deleteConfigSection
in interfaceBaseConfigSection
-
getMinUserMode
public final int getMinUserMode()Description copied from interface:BaseConfigSection
Returns the minimum user mode needed for this section to be displayed. Note: Section may be visually displayed, but with a notification that modification is unavailable at current user mode.- Specified by:
getMinUserMode
in interfaceBaseConfigSection
- See Also:
-
setRebuildRunner
- Specified by:
setRebuildRunner
in interfaceBaseConfigSection
-
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 interfaceBaseConfigSection
-
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 interfaceBaseConfigSection
- Returns:
- the highest user mode that reveals additional options (0 = Beginner, 1 = Intermediate, 2 = Advanced)
-
getSectionNameKey
- Specified by:
getSectionNameKey
in interfaceBaseConfigSection
-
getSectionNameKey
-
search
- Specified by:
search
in interfaceBaseConfigSection
-