FileDocCategorySizeDatePackage
PluginConfigUIFactory.javaAPI DocAzureus 3.0.3.46565Sun Feb 29 03:51:56 GMT 2004org.gudy.azureus2.plugins.ui.config

PluginConfigUIFactory

public interface PluginConfigUIFactory
Functions to create various plugin UI Config Parameters.

The label parameter passed to these functions is a lookup name. The UI label's text will be assigned the value looked up in the language file using the label parameter as the key name.

If you wish your configuration option to be displaying in console mode, add the following to your key:

_b Boolean Value
_i Integer Value
_s String Value
the above tags must be added before any other "_" characters.
see
org.gudy.azureus2.plugins.PluginInterface#addConfigUIParameters PluginInterface.addConfigUIParameters
author
Olivier

Fields Summary
Constructors Summary
Methods Summary
public EnablerParametercreateBooleanParameter(java.lang.String key, java.lang.String label, boolean defaultValue)
Creates a boolean parameter.
The UI component used will be a checkBox.
The parameter can be accessed using the PluginConfig.getPluginBooleanParameter(String key).
The return object, and EnablerParameter, can be used to add dependency to other parameters. For example, you can use a boolean parameter to choose from logging or not, and a file parameter to choose the logging file. You can call the EnablerParameter.addEnabledOnSelection method with the file Parameter in argument, so that the file parameter will only be enabled if the 'logging' (boolean) one is.

param
key the parameter key
param
label the label for this checkBox (cf. i18n)
param
defaultValue the default value of the parameter
return
an EnablerParameter

public ParametercreateColorParameter(java.lang.String key, java.lang.String label, int defaultValueRed, int defaultValueGreen, int defaultValueBlue)
Creates a Color Parameter.
The UI component will be a button with a Color area.
The parameter is in fact separacted in 3 parameters:
key.red
key.green
key.blue
Each color component is stored as an int parameter and can be accessed using PluginConfig.getPluginIntParameter(String key.(red|green|blue)).

param
key the parameter key
param
label the label for this field (cf. i18n)
param
defaultValueRed the red component of the default color (0-255)
param
defaultValueGreen the green component of the default color (0-255)
param
defaultValueBlue the blue component of the default color (0-255)
return
a Color Parameter

public ParametercreateDirectoryParameter(java.lang.String key, java.lang.String label, java.lang.String defaultValue)
Creates a Directory Parameter.
The UI component will be a Text field with a browse button.
The parameter can be accessed using the PluginConfig.getPluginStringParameter(String key).

param
key the parameter key
param
label the label for this field (cf. i18n)
param
defaultValue the default value of the parameter
return
a File Parameter

public ParametercreateFileParameter(java.lang.String key, java.lang.String label, java.lang.String defaultValue)
Creates a File Parameter.
The UI component will be a Text field with a browse button.
The parameter can be accessed using the PluginConfig.getPluginStringParameter(String key).

param
key the parameter key
param
label the label for this field (cf. i18n)
param
defaultValue the default value of the parameter
return
a File Parameter

public ParametercreateIntParameter(java.lang.String key, java.lang.String label, int defaultValue)
Creates an int parameter.
The UI component will be a Text field, but only accepting int values.
The parameter can be accessed using the PluginConfig.getPluginIntParameter(String key).

param
key the parameter key
param
label the label for this field (cf. i18n)
param
defaultValue the default value of the parameter
return
a Parameter

public ParametercreateIntParameter(java.lang.String key, java.lang.String label, int defaultValue, int[] values, java.lang.String[] labels)
Creates an int parameter.
The UI component will be a List.
The parameter can be accessed using the PluginConfig.getPluginIntParameter(String key).

param
key the parameter key
param
label the label for this field (cf. i18n)
param
defaultValue the default value of the parameter
param
values the list of values
param
labels the list of labels (no i18n here)
return
a Parameter

public ParametercreateStringParameter(java.lang.String key, java.lang.String label, java.lang.String defaultValue)
Creates a String parameter.
The UI Component will be a Text field.
The parameter can be accessed using the PluginConfig.getPluginStringParameter(String key).

param
key the parameter key
param
label the label for this field (cf. i18n)
param
defaultValue the default value of the parameter
return
a Parameter

public ParametercreateStringParameter(java.lang.String key, java.lang.String label, java.lang.String defaultValue, java.lang.String[] values, java.lang.String[] labels)
Creates an String parameter.
The UI component will be a List.
The parameter can be accessed using the PluginConfig.getPluginStringParameter(String key).

param
key the parameter key
param
label The label for this field (cf. i18n)
param
defaultValue the default value of the parameter
param
values the list of values
param
labels the list of labels (no i18n here)
return
a Parameter