Package org.gudy.azureus2.plugins.ui.model

Examples of org.gudy.azureus2.plugins.ui.model.BasicPluginConfigModel


   
        //Setting up the user interface manager so that we can set up the config section under options
    UIManager  ui_manager = pluginInterface.getUIManager();
       
        //BasicPluginConfigModel allows us to specify which options are under the Tools-Options-Plugins-TextAlert view
    BasicPluginConfigModel config_model = ui_manager.createBasicPluginConfigModel( "plugins", "plugin.textalert");
   
        //Directory setup:  in the format of
        //"key" (which is how I call it later) ,
        //"Messages.properties key" to call from that file so you can word it how you want ,
        //default value -- here I use the plugin directory.
        config_model.addDirectoryParameter2("Directory_to_use","textalert.directory",pluginInterface.getPluginDirectoryName());
    config_model.addStringParameter2("File_to_use","textalert.file","completed.txt");
   
   
    //Call the listener so that we can listen for changes in the states of the torrents
        downloadListener();
   
View Full Code Here


    this.pluginInterface = pluginInterface;

        pi = pluginInterface;
       
        UIManager   ui_manager = pluginInterface.getUIManager();
        BasicPluginConfigModel config_model = ui_manager.createBasicPluginConfigModel( "plugins", "plugin.azcatdest");
       
        //settings on main options panel
        //config_model.addBooleanParameter2("userspace_military_time","userspace.military.time",false);
        config_model.addBooleanParameter2("azcatdest_auto_open","azcatdest.auto.open",false);
       
        pluginInterface.getUIManager().addUIListener(new UIManagerListener() {
            public void UIAttached(UIInstance instance) {
              if (instance instanceof UISWTInstance) {
                swtInstance = (UISWTInstance)instance;
View Full Code Here

  public void initialize(final PluginInterface pluginInterface) {
    this.pluginInterface = pluginInterface;
    pi=pluginInterface;
    UIManager  ui_manager = pluginInterface.getUIManager();
    BasicPluginConfigModel config_model = ui_manager.createBasicPluginConfigModel( "plugins", "plugin.stuffer");

    config_model.addBooleanParameter2("stuffer_military_time","stuffer.military.time",false);
    config_model.addBooleanParameter2("stuffer_auto_open","stuffer.auto.open",true);

    config_getter = pluginInterface.getPluginconfig();

    //initialize strings
    areRulesPaused = false;
View Full Code Here

    start();
  }

  private void start() {
    for (int i = 0; i < updates.length; i++) {
      Update update = updates[i];
      ResourceDownloader[] rds = update.getDownloaders();
      for (int j = 0; j < rds.length; j++) {
        ResourceDownloader rd = rds[j];
        downloaders.add(rd);
      }
    }
View Full Code Here

  private void allDownloadsComplete() {
    boolean bRequiresRestart = false;
    boolean bHadMandatoryUpdates = false;
   
    for (int i = 0; i < updates.length; i++) {
      Update update = updates[i];
        // updates with no downloaders exist for admin purposes only
      if ( update.getDownloaders().length > 0){
        if (update.getRestartRequired() != Update.RESTART_REQUIRED_NO) {
          bRequiresRestart = true;
        }
        if ( update.isMandatory()){
          bHadMandatoryUpdates = true;
        }
      }
    }
View Full Code Here

          handleEvent(Event event)
          {
            try{
              PluginInterface pi = AzureusCoreFactory.getSingleton().getPluginManager().getDefaultPluginInterface();
             
              UpdateInstaller installer = pi.getUpdateManager().createInstaller();
           
              installer.addMoveAction(
                "C:\\temp\\file1", "C:\\temp\\file2" );
           
              installer.installNow(
                new UpdateInstallerListener()
                {
                  public void
                  reportProgress(
                    String    str )
View Full Code Here

           
              installer.addMoveAction(
                "C:\\temp\\file1", "C:\\temp\\file2" );
           
              installer.installNow(
                new UpdateInstallerListener()
                {
                  public void
                  reportProgress(
                    String    str )
                  {
View Full Code Here

          public void perform(TimerEvent ev) {
            performAutoCheck(false);
          }
        });

    DelayedTask delayed_task =
      UtilitiesImpl.addDelayedTask(
        "Update Check",
        new Runnable()
        {
          public void
          run()
          {
            // check for non-writeable app dir on non-vista platforms (vista we've got a chance of
            // elevating perms when updating) and warn user. Particularly useful on OSX when
            // users haven't installed properly
   
            if ( !( Constants.isWindowsVistaOrHigher || SystemProperties.isJavaWebStartInstance())){
   
              String  app_str = SystemProperties.getApplicationPath();
   
              if ( !new File(app_str).canWrite()){
   
                final UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
   
                if ( uiFunctions != null ){
   
                  if ( app_str.endsWith( File.separator )){
   
                    app_str = app_str.substring(0, app_str.length()-1);
                  }
                 
                  final String f_app_str = app_str;
                 
                  Utils.execSWTThread(
                    new Runnable()
                    {
                      public void
                      run()
                      {
                        UIFunctionsUserPrompter prompt =
                          uiFunctions.getUserPrompter(
                            MessageText.getString("updater.cant.write.to.app.title"),
                            MessageText.getString("updater.cant.write.to.app.details", new String[]{f_app_str}),
                            new String[]{ MessageText.getString( "Button.ok" )},
                            0 );
       
                        //prompt.setHtml( "http://a.b.c/" );
         
                        prompt.setIconResource( "warning" );
         
                        prompt.setRemember( "UpdateMonitor.can.not.write.to.app.dir.2", false,
                            MessageText.getString( "MessageBoxWindow.nomoreprompting" ));
         
                        prompt.open(null);
                      }
                    },
                    true );
                }
              }
            }
   
            performAutoCheck(true);
          }
        });
   
    delayed_task.queue();
  }
View Full Code Here

  {
    boolean  handled = false;
   
    for (int i=0;i<listeners.size();i++){
     
      PooledByteBuffer  buffer = new PooledByteBufferImpl(message.getPayload());
     
      try{
        ((GenericMessageConnectionListener)listeners.get(i)).receive( this, buffer );
       
        handled = true;
       
      }catch( Throwable f ){
       
        buffer.returnToPool();
       
        if ( !( f instanceof MessageException )){
       
          Debug.printStackTrace(f);
        }
View Full Code Here

  private void start() {
    for (int i = 0; i < updates.length; i++) {
      Update update = updates[i];
      ResourceDownloader[] rds = update.getDownloaders();
      for (int j = 0; j < rds.length; j++) {
        ResourceDownloader rd = rds[j];
        downloaders.add(rd);
      }
    }

    iterDownloaders = downloaders.iterator();
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.plugins.ui.model.BasicPluginConfigModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.