org.gudy.azureus2.pluginsimpl.local.ui.model
Class BasicPluginConfigModelImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.ui.model.BasicPluginConfigModelImpl
All Implemented Interfaces:
BasicPluginConfigModel, PluginConfigModel

public class BasicPluginConfigModelImpl
extends java.lang.Object
implements BasicPluginConfigModel


Field Summary
 
Fields inherited from interface org.gudy.azureus2.plugins.ui.model.BasicPluginConfigModel
BLANK_RESOURCE
 
Constructor Summary
BasicPluginConfigModelImpl(UIManagerImpl _ui_manager, java.lang.String _parent_section, java.lang.String _section)
           
 
Method Summary
 ActionParameter addActionParameter2(java.lang.String label_resource_name, java.lang.String action_resource_name)
           
 void addBooleanParameter(java.lang.String key, java.lang.String resource_name, boolean defaultValue)
           
 BooleanParameter addBooleanParameter2(java.lang.String key, java.lang.String resource_name, boolean defaultValue)
           
 ColorParameter addColorParameter2(java.lang.String key, java.lang.String resource_name, int r, int g, int b)
           
 DirectoryParameter addDirectoryParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String defaultValue)
           
 FileParameter addFileParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String defaultValue)
           
 FileParameter addFileParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String defaultValue, java.lang.String[] file_extensions)
           
 HyperlinkParameter addHyperlinkParameter2(java.lang.String resource_name, java.lang.String url_location)
           
 InfoParameter addInfoParameter2(java.lang.String resource_name, java.lang.String value)
           
 IntParameter addIntParameter2(java.lang.String key, java.lang.String resource_name, int defaultValue)
           
 IntParameter addIntParameter2(java.lang.String key, java.lang.String resource_name, int defaultValue, int min_value, int max_value)
           
 LabelParameter addLabelParameter2(java.lang.String resource_name)
           
 PasswordParameter addPasswordParameter2(java.lang.String key, java.lang.String resource_name, int encoding_type, byte[] defaultValue)
           
 StringListParameter addStringListParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String[] values, java.lang.String defaultValue)
           
 StringListParameter addStringListParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String[] values, java.lang.String[] labels, java.lang.String defaultValue)
           
 void addStringParameter(java.lang.String key, java.lang.String resource_name, java.lang.String defaultValue)
           
 StringParameter addStringParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String defaultValue)
           
 UITextArea addTextArea(java.lang.String resource_name)
           
 UIParameter addUIParameter2(UIParameterContext context, java.lang.String resource_name)
          Creates a UIParameter object to add to this config model object.
 ParameterGroup createGroup(java.lang.String _resource_name, Parameter[] _parameters)
           
 ParameterTabFolder createTabFolder()
           
 void destroy()
           
 Parameter[] getParameters()
          Retrieve all the parameters added to this plugin config
 java.lang.String getParentSection()
           
 PluginInterface getPluginInterface()
           
 java.lang.String getSection()
           
protected  java.lang.String resolveKey(java.lang.String key)
           
 void setLocalizedName(java.lang.String name)
          Sets the name of the configuration model - this is useful in situations where the configuration section is being dynamically created (perhaps with user input).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicPluginConfigModelImpl

public BasicPluginConfigModelImpl(UIManagerImpl _ui_manager,
                                  java.lang.String _parent_section,
                                  java.lang.String _section)
Method Detail

getParentSection

public java.lang.String getParentSection()
Specified by:
getParentSection in interface BasicPluginConfigModel
Returns:

getSection

public java.lang.String getSection()
Specified by:
getSection in interface BasicPluginConfigModel
Returns:

getPluginInterface

public PluginInterface getPluginInterface()
Specified by:
getPluginInterface in interface PluginConfigModel

getParameters

public Parameter[] getParameters()
Description copied from interface: BasicPluginConfigModel
Retrieve all the parameters added to this plugin config

Specified by:
getParameters in interface BasicPluginConfigModel
Returns:
parameter list

addBooleanParameter

public void addBooleanParameter(java.lang.String key,
                                java.lang.String resource_name,
                                boolean defaultValue)
Specified by:
addBooleanParameter in interface BasicPluginConfigModel

addBooleanParameter2

public BooleanParameter addBooleanParameter2(java.lang.String key,
                                             java.lang.String resource_name,
                                             boolean defaultValue)
Specified by:
addBooleanParameter2 in interface BasicPluginConfigModel
Returns:

addStringParameter

public void addStringParameter(java.lang.String key,
                               java.lang.String resource_name,
                               java.lang.String defaultValue)
Specified by:
addStringParameter in interface BasicPluginConfigModel

addStringParameter2

public StringParameter addStringParameter2(java.lang.String key,
                                           java.lang.String resource_name,
                                           java.lang.String defaultValue)
Specified by:
addStringParameter2 in interface BasicPluginConfigModel
Returns:

addStringListParameter2

public StringListParameter addStringListParameter2(java.lang.String key,
                                                   java.lang.String resource_name,
                                                   java.lang.String[] values,
                                                   java.lang.String defaultValue)
Specified by:
addStringListParameter2 in interface BasicPluginConfigModel
Returns:

addStringListParameter2

public StringListParameter addStringListParameter2(java.lang.String key,
                                                   java.lang.String resource_name,
                                                   java.lang.String[] values,
                                                   java.lang.String[] labels,
                                                   java.lang.String defaultValue)
Specified by:
addStringListParameter2 in interface BasicPluginConfigModel
labels - A list of localised message strings corresponding to each value.
Returns:

addPasswordParameter2

public PasswordParameter addPasswordParameter2(java.lang.String key,
                                               java.lang.String resource_name,
                                               int encoding_type,
                                               byte[] defaultValue)
Specified by:
addPasswordParameter2 in interface BasicPluginConfigModel
Returns:

addIntParameter2

public IntParameter addIntParameter2(java.lang.String key,
                                     java.lang.String resource_name,
                                     int defaultValue)
Specified by:
addIntParameter2 in interface BasicPluginConfigModel
Returns:

addIntParameter2

public IntParameter addIntParameter2(java.lang.String key,
                                     java.lang.String resource_name,
                                     int defaultValue,
                                     int min_value,
                                     int max_value)
Specified by:
addIntParameter2 in interface BasicPluginConfigModel
min_value - Minimum allowed value
max_value - Maximum allowed value
Returns:

addDirectoryParameter2

public DirectoryParameter addDirectoryParameter2(java.lang.String key,
                                                 java.lang.String resource_name,
                                                 java.lang.String defaultValue)
Specified by:
addDirectoryParameter2 in interface BasicPluginConfigModel
Returns:

addFileParameter2

public FileParameter addFileParameter2(java.lang.String key,
                                       java.lang.String resource_name,
                                       java.lang.String defaultValue)
Specified by:
addFileParameter2 in interface BasicPluginConfigModel
Returns:

addFileParameter2

public FileParameter addFileParameter2(java.lang.String key,
                                       java.lang.String resource_name,
                                       java.lang.String defaultValue,
                                       java.lang.String[] file_extensions)
Specified by:
addFileParameter2 in interface BasicPluginConfigModel
file_extensions - Allowed list of file extensions.
Returns:

addLabelParameter2

public LabelParameter addLabelParameter2(java.lang.String resource_name)
Specified by:
addLabelParameter2 in interface BasicPluginConfigModel
Returns:

addInfoParameter2

public InfoParameter addInfoParameter2(java.lang.String resource_name,
                                       java.lang.String value)
Specified by:
addInfoParameter2 in interface BasicPluginConfigModel
Returns:

addHyperlinkParameter2

public HyperlinkParameter addHyperlinkParameter2(java.lang.String resource_name,
                                                 java.lang.String url_location)
Specified by:
addHyperlinkParameter2 in interface BasicPluginConfigModel

addColorParameter2

public ColorParameter addColorParameter2(java.lang.String key,
                                         java.lang.String resource_name,
                                         int r,
                                         int g,
                                         int b)
Specified by:
addColorParameter2 in interface BasicPluginConfigModel
Returns:

addUIParameter2

public UIParameter addUIParameter2(UIParameterContext context,
                                   java.lang.String resource_name)
Description copied from interface: BasicPluginConfigModel
Creates a UIParameter object to add to this config model object.

Specified by:
addUIParameter2 in interface BasicPluginConfigModel

addActionParameter2

public ActionParameter addActionParameter2(java.lang.String label_resource_name,
                                           java.lang.String action_resource_name)
Specified by:
addActionParameter2 in interface BasicPluginConfigModel
Returns:

addTextArea

public UITextArea addTextArea(java.lang.String resource_name)
Specified by:
addTextArea in interface BasicPluginConfigModel

createGroup

public ParameterGroup createGroup(java.lang.String _resource_name,
                                  Parameter[] _parameters)
Specified by:
createGroup in interface BasicPluginConfigModel
Returns:

createTabFolder

public ParameterTabFolder createTabFolder()
Specified by:
createTabFolder in interface BasicPluginConfigModel
Returns:

destroy

public void destroy()
Specified by:
destroy in interface PluginConfigModel

setLocalizedName

public void setLocalizedName(java.lang.String name)
Description copied from interface: BasicPluginConfigModel
Sets the name of the configuration model - this is useful in situations where the configuration section is being dynamically created (perhaps with user input).

Specified by:
setLocalizedName in interface BasicPluginConfigModel

resolveKey

protected java.lang.String resolveKey(java.lang.String key)