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


Java UIUtil.isActionClick方法代碼示例

本文整理匯總了Java中com.intellij.util.ui.UIUtil.isActionClick方法的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.isActionClick方法的具體用法?Java UIUtil.isActionClick怎麽用?Java UIUtil.isActionClick使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.util.ui.UIUtil的用法示例。


在下文中一共展示了UIUtil.isActionClick方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: mousePressed

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public void mousePressed(final MouseEvent e) {
  if (UIUtil.isActionClick(e)) {
    if (e.getClickCount() == 1) {
      myActionClickCount = 0;
    }
    // clicks on the close window button don't count in determining whether we have a double-click on tab (IDEA-70403)
    final Component deepestComponent = SwingUtilities.getDeepestComponentAt(e.getComponent(), e.getX(), e.getY());
    if (!(deepestComponent instanceof InplaceButton)) {
      myActionClickCount++;
    }
    if (myActionClickCount > 1 && !isFloating()) {
      final ActionManager mgr = ActionManager.getInstance();
      mgr.tryToExecute(mgr.getAction("HideAllWindows"), e, null, ActionPlaces.UNKNOWN, true);
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:EditorTabbedContainer.java

示例2: fireEventToTextAnnotationListeners

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private void fireEventToTextAnnotationListeners(final MouseEvent e) {
  if (myEditor.getMouseEventArea(e) == EditorMouseEventArea.ANNOTATIONS_AREA) {
    final Point clickPoint = e.getPoint();

    final TextAnnotationGutterProvider provider = getProviderAtPoint(clickPoint);

    if (provider == null) {
      return;
    }

    if (myProviderToListener.containsKey(provider)) {
      int line = getLineNumAtPoint(clickPoint);

      if (line >= 0 && line < myEditor.getDocument().getLineCount() && UIUtil.isActionClick(e, MouseEvent.MOUSE_RELEASED)) {
        myProviderToListener.get(provider).doAction(line);
      }

    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:21,代碼來源:EditorGutterComponentImpl.java

示例3: mouseReleased

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public void mouseReleased(MouseEvent e) {
  if (UIUtil.isActionClick(e)) {
    final Window wnd = SwingUtilities.getWindowAncestor(myToolTip);
    if (wnd instanceof JWindow) {
      wnd.setVisible(false);
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:10,代碼來源:DebuggerTreeBase.java

示例4: processMouseEvent

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
protected void processMouseEvent(MouseEvent e) {
  if (e.getID() == MouseEvent.MOUSE_EXITED) {
    setCursor(Cursor.getDefaultCursor());
  }
  else if (UIUtil.isActionClick(e, MouseEvent.MOUSE_PRESSED) && isOnLink(e.getX())) {
    fireHyperlinkEvent();
  }
  super.processMouseEvent(e);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:10,代碼來源:HyperlinkLabel.java

示例5: processMouseEvent

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
protected void processMouseEvent(MouseEvent e) {
  super.processMouseEvent(e);

  if (UIUtil.isActionClick(e)) {
    myUi.toggleContentPopup();
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:9,代碼來源:ContentComboLabel.java

示例6: mouseClicked

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public void mouseClicked(MouseEvent e) {
  if (UIUtil.isActionClick(e, MouseEvent.MOUSE_CLICKED) && (e.isMetaDown() || (!SystemInfo.isMac && e.isControlDown()))) {
    final TabInfo info = myTabs.findInfo(e);
    if (info != null && info.getObject() != null) {
      final VirtualFile vFile = (VirtualFile)info.getObject();
      ShowFilePathAction.show(vFile, e);
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:EditorTabbedContainer.java

示例7: processMouseEvent

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
protected void processMouseEvent(final MouseEvent e) {
  final MyTreeUi ui = (MyTreeUi)myTree.getUI();
  final boolean toggleNow =
    e.getID() == MouseEvent.MOUSE_RELEASED && UIUtil.isActionClick(e, MouseEvent.MOUSE_RELEASED) && !ui.isToggleEvent(e);

  final boolean toggleLater =
    e.getID() == MouseEvent.MOUSE_PRESSED;

  if (toggleNow || toggleLater) {
    final TreePath path = getPathForLocation(e.getX(), e.getY());
    if (path != null) {
      final Rectangle bounds = getPathBounds(path);
      if (bounds != null && path.getLastPathComponent() instanceof DefaultMutableTreeNode) {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent();
        final boolean selected = isPathSelected(path);
        final boolean expanded = isExpanded(path);
        final Component comp =
          myRenderer.getTreeCellRendererComponent(this, node, selected, expanded, node.isLeaf(), getRowForPath(path), isFocusOwner());

        comp.setBounds(bounds);
        comp.validate();

        Point point = new Point(e.getX() - bounds.x, e.getY() - bounds.y);
        if (myRenderer.isUnderHandle(point)) {
          if (toggleNow) {
            ui.toggleExpandState(path);
            e.consume();
            return;
          } else if (toggleLater) {
            e.consume();
            return;
          }
        }
      }
    }
  }

  super.processMouseEvent(e);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:41,代碼來源:OptionsTree.java

示例8: ContentComponent

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
public ContentComponent(JComponent content) {
  super(new BorderLayout());
  add(content, BorderLayout.CENTER);
  setBackground(myBackgroud);

  myMouseListener = new MouseAdapter() {
    @Override
    public void mouseClicked(final MouseEvent e) {
      if (e.getButton() == MouseEvent.BUTTON3) {
        myPopup.cancel();
      } else if (UIUtil.isActionClick(e)) {
        if (myActionListener != null) {
          myActionListener.actionPerformed(new ActionEvent(FramelessNotificationPopup.this, ActionEvent.ACTION_PERFORMED, null));
        }
      }
    }

    @Override
    public void mouseEntered(MouseEvent e) {
      if (myFadeInTimer.isRunning()) {
        myFadeInTimer.stop();
      }
    }

    @Override
    public void mouseExited(MouseEvent e) {
      if (!myFadeInTimer.isRunning()) {
        myFadeInTimer.start();
      }
    }
  };
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:33,代碼來源:FramelessNotificationPopup.java

示例9: processMouseEvent

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
protected void processMouseEvent(MouseEvent e) {
  if (!isMultiSelectionEnabled() &&
      (e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0) {
    // do not toggle selection with ctrl+click event in single-selection mode
    e.consume();
  }
  if (UIUtil.isActionClick(e, MouseEvent.MOUSE_PRESSED) && isOnNextStepButton(e)) {
    e.consume();
  }
  super.processMouseEvent(e);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:ListPopupImpl.java

示例10: isActionClick

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
protected boolean isActionClick(MouseEvent e) {
  return UIUtil.isActionClick(e, MouseEvent.MOUSE_RELEASED, true);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:ListPopupImpl.java


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