Package com.aelitis.azureus.ui

Examples of com.aelitis.azureus.ui.UIFunctions


  }
 
  protected void
  showMainWindow()
  {
    UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
    if (uiFunctions != null) {
      uiFunctions.bringToFront();
    }
  }
View Full Code Here


    MenuItem itemOptions = new MenuItem(menu, SWT.PUSH);

    Messages.setLanguageText(itemOptions, "MainWindow.menu.view.configuration");
    itemOptions.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();

        uiFunctions.openView(UIFunctions.VIEW_DM_MULTI_OPTIONS, dms);
      }
    });

    if (dms.length == 0) {
View Full Code Here

    refreshTitle();   
    ViewTitleInfoManager.refreshTitleInfo(this);
  }

  private void delete() {
    UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
    if (uiFunctions != null) {
      uiFunctions.removeManagerView(manager);
      uiFunctions.getUIUpdater().removeUpdater(this);
    }
    if (manager != null) {
      manager.removeListener(this);
    }
   
View Full Code Here

    Display display = folder.getDisplay();
    if(display == null || display.isDisposed())
      return;
    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.refreshIconBar();
        }
      }
    });   
  }
View Full Code Here

              // legacy support for RSSImport plugin
              // model already registered, no need to do anything as UI will pick it up

            } else {
              UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
              if (uiFunctions instanceof UIFunctionsSWT) {
                ((UIFunctionsSWT)uiFunctions).addPluginView(view);

                if (bAutoOpen) {
                  ((UIFunctionsSWT)uiFunctions).openPluginView(view);
View Full Code Here

              }
            } else if ( message.startsWith("u:") && message.length() > 4 ) {
              try {
                String type = message.substring(2, 3);
                String url = message.substring(4);
                UIFunctions uif = UIFunctionsManager.getUIFunctions();
                if (uif != null) {
                  uif.viewURL(url, null, 0.9, 0.9, true, type.equals("1"));
                }
              } catch (Throwable t) {
                Logger.log( new LogEvent( LogIDs.LOGGER, "URL message failed", t  ));
              }
              // mark as complete even if errored
              completed = true;
            }else{
             
              int   alert_type    = LogAlert.AT_WARNING;
             
              String  alert_text    = message;
   
              boolean  force = false;
             
              if ( alert_text.startsWith( "f:" )){
               
                force = true;
             
                alert_text = alert_text.substring( 2 );
              }
             
              if ( alert_text.startsWith("i:" )){
   
                alert_type = LogAlert.AT_INFORMATION;
   
                alert_text = alert_text.substring(2);
              }
   
              plugin_interface.getPluginProperties().setProperty( MESSAGE_PROPERTY, alert_text );
   
              if ( force ){
               
                UIFunctions uif = UIFunctionsManager.getUIFunctions();
               
                if ( uif != null ){
                 
                  try{
                    uif.forceNotify( UIFunctions.STATUSICON_NONE, null, alert_text, null, null, 0 );
                 
                    completed = true;
                   
                  }catch( Throwable e ){
                   
View Full Code Here

    }else{
     
      args = new String[0];
    }
   
    UIFunctions uif = UIFunctionsManager.getUIFunctions();

    if ( uif == null ){
     
      throw( new Exception( "Update can't proceed - UI functions unavailable" ));
    }
   
    checker.getCheckInstance().setProperty( UpdateCheckInstance.PT_CLOSE_OR_RESTART_ALREADY_IN_PROGRESS, true );

    final File f_update_file = update_file;
     
    boolean  silent = update_properties.getProperty( "launch.silent", "false" ).equals( "true" );
   
    if ( silent ){
     
        // problem on OSX if they have renamed their app and we're running silently as it
        // installs to Vuze.app regardless
     
      if ( Constants.isOSX ){
       
        String app_name = SystemProperties.getApplicationName();
       
        if ( !( app_name.equals( "Vuze" ) || app_name.equals( "Azureus" ))){
         
          UIManager ui_manager = StaticUtilities.getUIManager( 120*1000 );
         
          String details = MessageText.getString(
              "update.fail.app.changed",
              new String[]{ app_name });
         
          ui_manager.showMessageBox(
              "update.fail.app.changed.title",
              "!" + details + "!",
              UIManagerEvent.MT_OK );
         
          return;
        }
      }
     
      uif.performAction(
          UIFunctions.ACTION_UPDATE_RESTART_REQUEST,
          !FileUtil.canReallyWriteToAppDirectory(),
          new UIFunctions.actionListener()
          {
            public void
            actionComplete(
              Object  result )
            {
              if ((Boolean)result){
               
                launchUpdate( f_update_file, args );
              }
            }
          });
    }else{
     
      uif.performAction(
        UIFunctions.ACTION_FULL_UPDATE,
        info_url,
        new UIFunctions.actionListener()
        {
          public void
View Full Code Here

    return( name );
    }
   
  private void showScriptManualUpdateDialog(String newFilePath,
      String oldFilePath, final int version) {
    final UIFunctions uif = UIFunctionsManager.getUIFunctions();
    if (uif != null) {
      final String sCopyLine = "cp \"" + newFilePath + "\" \"" + oldFilePath + "\"";
      uif.promptUser(
          MessageText.getString("unix.script.new.title"),
          MessageText.getString("unix.script.new.text", new String[] {
            newFilePath,
            sCopyLine
          }), new String[] {
            MessageText.getString("unix.script.new.button.quit"),
            MessageText.getString("unix.script.new.button.continue"),
            MessageText.getString("unix.script.new.button.asknomore"),
          }, 0, null, null, false, 0, new UserPrompterResultListener() {
            public void prompterClosed(int answer) {
              if (answer == 0) {
                System.out.println("The line you should run:\n" + sCopyLine);
                uif.dispose(false, false);
              } else if (answer == 2) {
                COConfigurationManager.setParameter("unix.script.lastaskversion",
                    version);
              }
            }
View Full Code Here

      System.out.println("NO UIF");
    }
  }

  private void showScriptAutoUpdateDialog() {
    final UIFunctions uif = UIFunctionsManager.getUIFunctions();
    if (uif != null) {
      uif.promptUser(MessageText.getString("unix.script.new.auto.title"),
          MessageText.getString("unix.script.new.auto.text", new String[] {}),
          new String[] {
            MessageText.getString("UpdateWindow.restart"),
            MessageText.getString("UpdateWindow.restartLater"),
          }, 0, null, null, false, 0, new UserPrompterResultListener() {
            public void prompterClosed(int answer) {
              if (answer == 0) {
                uif.dispose(true, false);
              }
            }
          });
    } else {
      System.out.println("NO UIF");
View Full Code Here

          try {
            FileUtil.copyFile(data, FileUtil.getUserFile("ipfilter.dl"));
            AEThread thread = new AEThread("reload ipfilters", true) {
              public void runSupport() {
                try {
                  UIFunctions uif = UIFunctionsManager.getUIFunctions();
                  if (uif != null) {
                    uif.setStatusText("Reloading Filters..");
                  }
                  ipFilter.reload(false);
                  if (uif != null) {
                    uif.setStatusText(null);
                  }
                } catch (Exception e) {
                  Debug.out(e);
                }
              }
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.ui.UIFunctions

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.