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 Object
implements BasicPluginConfigModel


Field Summary
 
Fields inherited from interface org.gudy.azureus2.plugins.ui.model.BasicPluginConfigModel
BLANK_RESOURCE
 
Constructor Summary
BasicPluginConfigModelImpl(UIManagerImpl _ui_manager, String _parent_section, String _section)
           
 
Method Summary
 ActionParameter addActionParameter2(String label_resource_name, String action_resource_name)
           
 void addBooleanParameter(String key, String resource_name, boolean defaultValue)
           
 BooleanParameter addBooleanParameter2(String key, String resource_name, boolean defaultValue)
           
 ColorParameter addColorParameter2(String key, String resource_name, int r, int g, int b)
           
 DirectoryParameter addDirectoryParameter2(String key, String resource_name, String defaultValue)
           
 FileParameter addFileParameter2(String key, String resource_name, String defaultValue)
           
 FileParameter addFileParameter2(String key, String resource_name, String defaultValue, String[] file_extensions)
           
 HyperlinkParameter addHyperlinkParameter2(String resource_name, String url_location)
           
 InfoParameter addInfoParameter2(String resource_name, String value)
           
 IntParameter addIntParameter2(String key, String resource_name, int defaultValue)
           
 IntParameter addIntParameter2(String key, String resource_name, int defaultValue, int min_value, int max_value)
           
 LabelParameter addLabelParameter2(String resource_name)
           
 PasswordParameter addPasswordParameter2(String key, String resource_name, int encoding_type, byte[] defaultValue)
           
 StringListParameter addStringListParameter2(String key, String resource_name, String[] values, String defaultValue)
           
 StringListParameter addStringListParameter2(String key, String resource_name, String[] values, String[] labels, String defaultValue)
           
 void addStringParameter(String key, String resource_name, String defaultValue)
           
 StringParameter addStringParameter2(String key, String resource_name, String defaultValue)
           
 UITextArea addTextArea(String resource_name)
           
 UIParameter addUIParameter2(UIParameterContext context, String resource_name)
          Creates a UIParameter object to add to this config model object.
 ParameterGroup createGroup(String _resource_name, Parameter[] _parameters)
           
 ParameterTabFolder createTabFolder()
           
 void destroy()
           
 Parameter[] getParameters()
          Retrieve all the parameters added to this plugin config
 String getParentSection()
           
 PluginInterface getPluginInterface()
           
 String getSection()
           
protected  String resolveKey(String key)
           
 void setLocalizedName(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,
                                  String _parent_section,
                                  String _section)
Method Detail

getParentSection

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

getSection

public 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(String key,
                                String resource_name,
                                boolean defaultValue)
Specified by:
addBooleanParameter in interface BasicPluginConfigModel

addBooleanParameter2

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

addStringParameter

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

addStringParameter2

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

addStringListParameter2

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

addStringListParameter2

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

addPasswordParameter2

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

addIntParameter2

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

addIntParameter2

public IntParameter addIntParameter2(String key,
                                     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(String key,
                                                 String resource_name,
                                                 String defaultValue)
Specified by:
addDirectoryParameter2 in interface BasicPluginConfigModel
Returns:

addFileParameter2

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

addFileParameter2

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

addLabelParameter2

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

addInfoParameter2

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

addHyperlinkParameter2

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

addColorParameter2

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

addUIParameter2

public UIParameter addUIParameter2(UIParameterContext context,
                                   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(String label_resource_name,
                                           String action_resource_name)
Specified by:
addActionParameter2 in interface BasicPluginConfigModel
Returns:

addTextArea

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

createGroup

public ParameterGroup createGroup(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(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 String resolveKey(String key)