Package com.aelitis.azureus.ui

Examples of com.aelitis.azureus.ui.UIFunctions$actionListener


    }

    if (sel == sel_aboutMenuItemSelected_) {
      AboutWindow.show();
    } else if (sel == sel_restartMenuSelected_) {
      UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
      if (uiFunctions != null) {
        uiFunctions.dispose(true, false);
      }
    } else if (sel == sel_wizardMenuSelected_) {
      new ConfigureWizard(false,ConfigureWizard.WIZARD_MODE_FULL);
    } else if (sel == sel_natMenuSelected_) {
      new NatTestWindow();
    } else if (sel == sel_speedMenuSelected_) {
      new SpeedTestWizard();
    } else if (sel == sel_toolbarButtonClicked_) {
      try {
        Field fldsel_window = osCls.getField("sel_window");
        Object windowId = invoke(osCls, "objc_msgSend", new Object[] {
          wrapPointer(arg0),
          fldsel_window.get(null)
        });
        final Shell shellAffected = (Shell) invoke(Display.class,
            Display.getCurrent(), "findWidget", new Object[] {
              windowId
            });

        Utils.execSWTThread(new AERunnable() {
          public void runSupport() {
            int type;
            Long l = (Long) shellAffected.getData("OSX.ToolBarToggle");
            if (l == null || l.longValue() == 0) {
              type = SWT.Collapse;
            } else {
              type = SWT.Expand;
            }

            Event event = new Event();
            event.type = type;
            event.display = shellAffected.getDisplay();
            event.widget = shellAffected;
            shellAffected.notifyListeners(type, event);

            shellAffected.setData("OSX.ToolBarToggle", new Long(
                type == SWT.Collapse ? 1 : 0));
          }
        });
      } catch (Throwable t) {
        Debug.out(t);
      }

    } else if (sel == sel_preferencesMenuItemSelected_) {
      UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
      if (uiFunctions != null) {
        uiFunctions.openView(UIFunctions.VIEW_CONFIG, null);
      }
    }
    return 0;
  }
View Full Code Here


  }

  public static MenuItem addMyTorrentsMenuItem(Menu menu) {
    return addMenuItem(menu, MENU_ID_MY_TORRENTS, new Listener() {
      public void handleEvent(Event e) {
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.openView(UIFunctions.VIEW_MYTORRENTS, null);
        }
      }
    });
  }
View Full Code Here

  }
 
  public static MenuItem addAllPeersMenuItem(Menu menu) {
    return addMenuItem(menu, MENU_ID_ALL_PEERS, new Listener() {
      public void handleEvent(Event e) {
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.openView(UIFunctions.VIEW_ALLPEERS, null);
        }
      }
    });
  }
View Full Code Here

  }

  public static MenuItem addClientStatsMenuItem(Menu menu) {
    return addMenuItem(menu, MENU_ID_CLIENT_STATS, new Listener() {
      public void handleEvent(Event e) {
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.openView(UIFunctions.VIEW_PEERS_STATS, null);
        }
      }
    });
  }
View Full Code Here

  }

  public static MenuItem addMyTrackerMenuItem(Menu menu) {
    return addMenuItem(menu, MENU_ID_MY_TRACKERS, new Listener() {
      public void handleEvent(Event e) {
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.openView(UIFunctions.VIEW_MYTRACKER, null);
        }
      }
    });
  }
View Full Code Here

  }

  public static MenuItem addMySharesMenuItem(Menu menu) {
    return addMenuItem(menu, MENU_ID_MY_SHARES, new Listener() {
      public void handleEvent(Event e) {
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.openView(UIFunctions.VIEW_MYSHARES, null);
        }
      }
    });
  }
View Full Code Here

  }

  public static MenuItem addConsoleMenuItem(Menu menu) {
    return addMenuItem(menu, MENU_ID_CONSOLE, new Listener() {
      public void handleEvent(Event e) {
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.openView(UIFunctions.VIEW_CONSOLE, null);
        }
      }
    });
  }
View Full Code Here

  }

  public static MenuItem addStatisticsMenuItem(Menu menu) {
    return addMenuItem(menu, MENU_ID_STATS, new Listener() {
      public void handleEvent(Event e) {
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.openView(UIFunctions.VIEW_STATS, null);
        }
      }
    });
  }
View Full Code Here

  }

  public static MenuItem addOptionsMenuItem(Menu menu) {
    return addMenuItem(menu, MENU_ID_OPTIONS, new Listener() {
      public void handleEvent(Event e) {
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.openView(UIFunctions.VIEW_CONFIG, null);
        }
      }
    });
  }
View Full Code Here

   
      public void azureusCoreRunning(AzureusCore core) {
        DownloadManager dm = core.getGlobalManager().getDownloadManager(
            torrent.getTorrent());
        if (dm != null) {
          UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
          if (uiFunctions != null) {
            uiFunctions.openView(UIFunctions.VIEW_DM_DETAILS, dm);
          }
        }
      }
    });
  }
View Full Code Here

TOP

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

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.