當前位置: 首頁>>代碼示例>>Java>>正文


Java BrowserUtils類代碼示例

本文整理匯總了Java中org.eclipse.che.ide.util.browser.BrowserUtils的典型用法代碼示例。如果您正苦於以下問題:Java BrowserUtils類的具體用法?Java BrowserUtils怎麽用?Java BrowserUtils使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BrowserUtils類屬於org.eclipse.che.ide.util.browser包,在下文中一共展示了BrowserUtils類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: actionPerformed

import org.eclipse.che.ide.util.browser.BrowserUtils; //導入依賴的package包/類
@Override
public void actionPerformed(ActionEvent e) {
  final Resource selectedResource = appContext.getResource();
  if (Resource.FILE == selectedResource.getResourceType()) {
    final String contentUrl = ((File) selectedResource).getContentUrl();
    BrowserUtils.openInNewTab(agentURLModifier.modify(contentUrl));
  }
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:9,代碼來源:PreviewImageAction.java

示例2: onOpenPullRequestOnVcsHost

import org.eclipse.che.ide.util.browser.BrowserUtils; //導入依賴的package包/類
@Override
public void onOpenPullRequestOnVcsHost() {
  final Context context = workflowExecutor.getCurrentContext();

  BrowserUtils.openInNewTab(
      context
          .getVcsHostingService()
          .makePullRequestUrl(
              context.getOriginRepositoryOwner(),
              context.getOriginRepositoryName(),
              context.getPullRequestIssueNumber()));
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:13,代碼來源:ContributePartPresenter.java

示例3: downloadPrivateKey

import org.eclipse.che.ide.util.browser.BrowserUtils; //導入依賴的package包/類
private void downloadPrivateKey(final String privateKey) {
  dialogFactory
      .createConfirmDialog(
          constant.downloadPrivateKeyTitle(),
          constant.downloadPrivateKeyMessage(),
          () ->
              BrowserUtils.openInNewTab(
                  "data:application/x-pem-key," + URL.encodePathSegment(privateKey)),
          getCancelCallback())
      .show();
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:12,代碼來源:SshKeyManagerPresenter.java

示例4: actionPerformed

import org.eclipse.che.ide.util.browser.BrowserUtils; //導入依賴的package包/類
/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent e) {
  BrowserUtils.openInNewTab(locale.actionOpenDocsUrl());
}
 
開發者ID:codenvy,項目名稱:codenvy,代碼行數:6,代碼來源:OpenDocsAction.java

示例5: actionPerformed

import org.eclipse.che.ide.util.browser.BrowserUtils; //導入依賴的package包/類
/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent e) {
  BrowserUtils.openInNewTab(locale.redirectToDashboardAccountUrl());
}
 
開發者ID:codenvy,項目名稱:codenvy,代碼行數:6,代碼來源:RedirectToDashboardAccountAction.java

示例6: actionPerformed

import org.eclipse.che.ide.util.browser.BrowserUtils; //導入依賴的package包/類
/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent e) {
  BrowserUtils.openInNewTab(locale.actionRedirectToEngineerChatChannelUrl());
}
 
開發者ID:codenvy,項目名稱:codenvy,代碼行數:6,代碼來源:RedirectToEngineerChatChannelAction.java

示例7: handleEvent

import org.eclipse.che.ide.util.browser.BrowserUtils; //導入依賴的package包/類
@Override
public void handleEvent(Event evt) {
  // Don't even bother to do anything unless we have someone ready to
  // handle events.
  if (getDelegate() == null
      || (primaryMouseButtonOnly
          && ((MouseEvent) evt).getButton() != MouseEvent.Button.PRIMARY)) {
    return;
  }

  Element eventTarget = (Element) evt.getTarget();

  if (CssUtils.containsClassName(eventTarget, css.expandControl())) {
    onExpansionControlEvent(evt, eventTarget);
  } else {
    Element treeNodeBody =
        CssUtils.getAncestorOrSelfWithClassName(eventTarget, css.treeNodeBody());
    if (treeNodeBody != null) {
      // this code emulate double click for tablets
      if (Event.MOUSEDOWN.equals(evt.getType())) {
        double currentClickMs = Duration.currentTimeMillis();
        if (currentClickMs - previousClickMs < MouseGestureListener.MAX_CLICK_TIMEOUT_MS
            && treeNodeBody.equals(previousClickTreeNodeBody)) {

          if (BrowserUtils.isAndroid() || BrowserUtils.isIPad() || BrowserUtils.isIphone()) {
            evt.stopPropagation();
            evt.preventDefault();
            doActionsForDoubleClick(treeNodeBody, evt);
          }
          return;
        } else {
          this.previousClickMs = currentClickMs;
          this.previousClickTreeNodeBody = treeNodeBody;
        }
      }

      onTreeNodeBodyChildEvent(evt, treeNodeBody);
    } else {
      onOtherEvent(evt);
    }
  }
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:43,代碼來源:Tree.java

示例8: onUrlChosen

import org.eclipse.che.ide.util.browser.BrowserUtils; //導入依賴的package包/類
@Override
public void onUrlChosen(String previewUrl) {
  BrowserUtils.openInNewTab(previewUrl);
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:5,代碼來源:PreviewsPresenter.java

示例9: actionPerformed

import org.eclipse.che.ide.util.browser.BrowserUtils; //導入依賴的package包/類
@Override
public void actionPerformed(ActionEvent e) {
  BrowserUtils.openInNewTab(productInfoDataProvider.getSupportLink());
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:5,代碼來源:RedirectToSupportAction.java


注:本文中的org.eclipse.che.ide.util.browser.BrowserUtils類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。