Package org.gudy.azureus2.plugins.ui.config

Examples of org.gudy.azureus2.plugins.ui.config.StringParameter


   
    int userMode = COConfigurationManager.getIntParameter("User Mode");
    int maxUsermode = 0;
    try
    {
      ConfigSection sect = sections.get(section);
      if (sect instanceof UISWTConfigSection)
      {
        maxUsermode = ((UISWTConfigSection) sect).maxUserMode();
      }
    } catch (Error e)
View Full Code Here


   
    for (int i=0;i<items.length;i++){
     
      TreeItem  item = items[i];
             
      ConfigSection section = (ConfigSection)item.getData("ConfigSectionSWT");
       
      if ( section != null && section.getClass() == config_section_class ){
         
        tree.setSelection( new TreeItem[]{ item });
       
        showSection( item );
       
View Full Code Here

   
    enabled = config.addBooleanParameter2( "Plugin.localtracker.enable", "Plugin.localtracker.enable", true );

    config.addLabelParameter2( "Plugin.localtracker.networks.info" );
   
    final StringParameter subnets = config.addStringParameter2( "Plugin.localtracker.networks", "Plugin.localtracker.networks", "" );

    final BooleanParameter include_wellknown = config.addBooleanParameter2( "Plugin.localtracker.wellknownlocals", "Plugin.localtracker.wellknownlocals", true );
   
    config.addLabelParameter2( "Plugin.localtracker.autoadd.info" );
   
    final StringParameter autoadd = config.addStringParameter2( "Plugin.localtracker.autoadd", "Plugin.localtracker.autoadd", "" );
   
    /*
     * actually these parameters affect LAN detection as a whole, not just the local tracker,
     * so leave them enabled...
     *
    enabled.addEnabledOnSelection( lp1 );
    enabled.addEnabledOnSelection( subnets );
    enabled.addEnabledOnSelection( lp2 );
    enabled.addEnabledOnSelection( autoadd );
    */
   
    final BasicPluginViewModel  view_model =
      plugin_interface.getUIManager().createBasicPluginViewModel( "Plugin.localtracker.name" );

    view_model.setConfigSectionID(PLUGIN_CONFIGSECTION_ID);
    view_model.getActivity().setVisible( false );
    view_model.getProgress().setVisible( false );
   
    log.addListener(
        new LoggerChannelListener()
        {
          public void
          messageLogged(
            int    type,
            String  content )
          {
            view_model.getLogArea().appendText( content + "\n" );
          }
         
          public void
          messageLogged(
            String    str,
            Throwable  error )
          {
            if ( str.length() > 0 ){
              view_model.getLogArea().appendText( str + "\n" );
            }
           
            StringWriter sw = new StringWriter();
           
            PrintWriter  pw = new PrintWriter( sw );
           
            error.printStackTrace( pw );
           
            pw.flush();
           
            view_model.getLogArea().appendText( sw.toString() + "\n" );
          }
        });
   
    plugin_start_time = plugin_interface.getUtilities().getCurrentSystemTime();

    // Assume we have a core, since this is a plugin
    instance_manager  = AzureusCoreFactory.getSingleton().getInstanceManager();
   
    instance_manager.addListener( this );
   
    plugin_interface.getPluginconfig().addListener(
        new PluginConfigListener()
        {
          public void
          configSaved()
          {
            processSubNets( subnets.getValue(),include_wellknown.getValue() );
            processAutoAdd( autoadd.getValue());
          }
        });
     
    processSubNets(subnets.getValue(), include_wellknown.getValue());
    processAutoAdd(autoadd.getValue());

    final DelayedTask dt = plugin_interface.getUtilities().createDelayedTask(new Runnable()
      {
        public void
        run()
View Full Code Here

            && (!(currentContent[0] instanceof ISelectedVuzeFileContent))
            && currentContent[0].getDownloadManager() == null
            && (currentContent[0].getHash() != null || currentContent[0].getDownloadInfo() != null));
 
      if (tv != null) {
        TableColumn tc = tv.getTableColumn(RankItem.COLUMN_ID);
        if (tc != null && !tc.isVisible()) {
          mapNewToolbarStates.put("up", false);
          mapNewToolbarStates.put("down", 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

TOP

Related Classes of org.gudy.azureus2.plugins.ui.config.StringParameter

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.