FileDocCategorySizeDatePackage
BasicPluginConfigModelImpl.javaAPI DocAzureus 3.0.3.47200Thu Sep 06 21:59:58 BST 2007org.gudy.azureus2.pluginsimpl.local.ui.model

BasicPluginConfigModelImpl

public class BasicPluginConfigModelImpl extends Object implements BasicPluginConfigModel
author
parg

Fields Summary
private org.gudy.azureus2.pluginsimpl.local.ui.UIManagerImpl
ui_manager
private String
parent_section
private String
section
private PluginInterface
pi
private ArrayList
parameters
private String
key_prefix
Constructors Summary
public BasicPluginConfigModelImpl(org.gudy.azureus2.pluginsimpl.local.ui.UIManagerImpl _ui_manager, String _parent_section, String _section)

	
	
	
				
						
						 
	
		ui_manager		= _ui_manager;
		parent_section	= _parent_section;
		section			= _section;
		
		pi				= ui_manager.getPluginInterface();

		key_prefix		= pi.getPluginconfig().getPluginConfigKeyPrefix();
	
Methods Summary
public org.gudy.azureus2.plugins.ui.config.ActionParameteraddActionParameter2(java.lang.String label_resource_name, java.lang.String action_resource_name)

		ActionParameterImpl res = new ActionParameterImpl( pi.getPluginconfig(), label_resource_name, action_resource_name );
		
		parameters.add( res );
		
		return( res );			
	
public voidaddBooleanParameter(java.lang.String key, java.lang.String resource_name, boolean defaultValue)

		addBooleanParameter2( key, resource_name, defaultValue );
	
public org.gudy.azureus2.plugins.ui.config.BooleanParameteraddBooleanParameter2(java.lang.String key, java.lang.String resource_name, boolean defaultValue)

		BooleanParameterImpl res = new BooleanParameterImpl( pi.getPluginconfig(), key_prefix + key, resource_name, defaultValue );
		
		parameters.add( res );
		
		return( res );
	
public org.gudy.azureus2.plugins.ui.config.DirectoryParameteraddDirectoryParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String defaultValue)

		DirectoryParameterImpl res = new DirectoryParameterImpl( pi.getPluginconfig(), key_prefix + key, resource_name, defaultValue );
		
		parameters.add( res );
		
		return( res );	
	
public org.gudy.azureus2.plugins.ui.config.FileParameteraddFileParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String defaultValue)

		return addFileParameter2(key, resource_name, defaultValue, null);
	
public org.gudy.azureus2.plugins.ui.config.FileParameteraddFileParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String defaultValue, java.lang.String[] file_extensions)

		FileParameter res = new FileParameter(pi.getPluginconfig(), key_prefix + key, resource_name, defaultValue, file_extensions);
		parameters.add(res);
		return res;
	
public org.gudy.azureus2.plugins.ui.config.HyperlinkParameteraddHyperlinkParameter2(java.lang.String resource_name, java.lang.String url_location)

		HyperlinkParameterImpl res = new HyperlinkParameterImpl(pi.getPluginconfig(), key_prefix, resource_name, url_location);
		parameters.add(res);
		return res;
	
public org.gudy.azureus2.plugins.ui.config.IntParameteraddIntParameter2(java.lang.String key, java.lang.String resource_name, int defaultValue)

		IntParameterImpl res = new IntParameterImpl( pi.getPluginconfig(), key_prefix + key, resource_name, defaultValue );
		
		parameters.add( res );
		
		return( res );	
	
public org.gudy.azureus2.plugins.ui.config.LabelParameteraddLabelParameter2(java.lang.String resource_name)

		LabelParameterImpl res = new LabelParameterImpl( pi.getPluginconfig(), key_prefix, resource_name );
		
		parameters.add( res );
		
		return( res );		
	
public org.gudy.azureus2.plugins.ui.config.PasswordParameteraddPasswordParameter2(java.lang.String key, java.lang.String resource_name, int encoding_type, byte[] defaultValue)

		PasswordParameterImpl res = new PasswordParameterImpl( pi.getPluginconfig(), key_prefix + key, resource_name, encoding_type, defaultValue );
		
		parameters.add( res );
			
		return( res );			
	
public org.gudy.azureus2.plugins.ui.config.StringListParameteraddStringListParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String[] values, java.lang.String defaultValue)

		StringListParameterImpl res = new StringListParameterImpl( pi.getPluginconfig(), key_prefix + key, resource_name, defaultValue, values, values );
		
		parameters.add( res );
			
		return( res );			
	
public org.gudy.azureus2.plugins.ui.config.StringListParameteraddStringListParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String[] values, java.lang.String[] labels, java.lang.String defaultValue)

		StringListParameterImpl res = new StringListParameterImpl(pi
				.getPluginconfig(), key_prefix + key, resource_name, defaultValue,
				values, labels);

		parameters.add(res);

		return (res);			
	
public voidaddStringParameter(java.lang.String key, java.lang.String resource_name, java.lang.String defaultValue)

		addStringParameter2( key, resource_name, defaultValue );
	
public org.gudy.azureus2.plugins.ui.config.StringParameteraddStringParameter2(java.lang.String key, java.lang.String resource_name, java.lang.String defaultValue)

		StringParameterImpl res = new StringParameterImpl( pi.getPluginconfig(), key_prefix + key, resource_name, defaultValue );
	
		parameters.add( res );
		
		return( res );	
	
public org.gudy.azureus2.plugins.ui.config.ParameterGroupcreateGroup(java.lang.String _resource_name, org.gudy.azureus2.plugins.ui.config.Parameter[] _parameters)

		ParameterGroupImpl	pg = new ParameterGroupImpl( _resource_name );
		
		for (int i=0;i<_parameters.length;i++){
			
			((ParameterImpl)_parameters[i]).setGroup( pg );
		}
		
		return( pg );
	
public voiddestroy()

		ui_manager.destroy( this );
		
		for (int i=0;i<parameters.size();i++){
			
			((ParameterImpl)parameters.get(i)).destroy();
		}
	
public org.gudy.azureus2.plugins.ui.config.Parameter[]getParameters()

		Parameter[] res = new Parameter[parameters.size()];
		
		parameters.toArray( res );
		
		return( res );
	
public java.lang.StringgetParentSection()

		return( parent_section );
	
public PluginInterfacegetPluginInterface()

		return( pi );
	
public java.lang.StringgetSection()

		return( section );