コード例 #1
0
  public boolean viewURL(
      final String url,
      final String target,
      final double w,
      final double h,
      final boolean allowResize,
      final boolean isModal) {

    mainWindow
        .getShell()
        .getDisplay()
        .syncExec(
            new AERunnable() {
              public void runSupport() {
                String realURL = url;
                ContentNetwork cn = ContentNetworkUtils.getContentNetworkFromTarget(target);
                if (!realURL.startsWith("http")) {
                  if ("_blank".equals(target)) {
                    realURL = cn.getExternalSiteRelativeURL(realURL, false);
                  } else {
                    realURL = cn.getSiteRelativeURL(realURL, false);
                  }
                }
                if (target == null) {
                  if (UrlFilter.getInstance().urlCanRPC(realURL)) {
                    realURL = cn.appendURLSuffix(realURL, false, true);
                  }
                  BrowserWindow window =
                      new BrowserWindow(mainWindow.getShell(), realURL, w, h, allowResize, isModal);
                  window.waitUntilClosed();
                } else {
                  showURL(realURL, target);
                }
              }
            });
    return true;
  }
コード例 #2
0
 // @see com.aelitis.azureus.ui.swt.UIFunctionsSWT#getMainShell()
 public Shell getMainShell() {
   return mainWindow == null ? null : mainWindow.getShell();
 }