当前位置: 首页>>代码示例>>Java>>正文


Java KeymapUtil.getKeystrokeText方法代码示例

本文整理汇总了Java中com.intellij.openapi.keymap.KeymapUtil.getKeystrokeText方法的典型用法代码示例。如果您正苦于以下问题:Java KeymapUtil.getKeystrokeText方法的具体用法?Java KeymapUtil.getKeystrokeText怎么用?Java KeymapUtil.getKeystrokeText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.keymap.KeymapUtil的用法示例。


在下文中一共展示了KeymapUtil.getKeystrokeText方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ChooseByNamePopup

import com.intellij.openapi.keymap.KeymapUtil; //导入方法依赖的package包/类
protected ChooseByNamePopup(@Nullable final Project project,
                            @NotNull ChooseByNameModel model,
                            @NotNull ChooseByNameItemProvider provider,
                            @Nullable ChooseByNamePopup oldPopup,
                            @Nullable final String predefinedText,
                            boolean mayRequestOpenInCurrentWindow,
                            int initialIndex) {
  super(project, model, provider, oldPopup != null ? oldPopup.getEnteredText() : predefinedText, initialIndex);
  myOldPopup = oldPopup;
  if (oldPopup != null) { //inherit old focus owner
    myOldFocusOwner = oldPopup.myPreviouslyFocusedComponent;
  }
  myMayRequestCurrentWindow = mayRequestOpenInCurrentWindow;
  myAdText = myMayRequestCurrentWindow ? "Press " +
                                         KeymapUtil.getKeystrokeText(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_MASK)) +
                                         " to open in current window" : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:ChooseByNamePopup.java

示例2: ChooseByNamePopup

import com.intellij.openapi.keymap.KeymapUtil; //导入方法依赖的package包/类
protected ChooseByNamePopup(@Nullable final Project project,
                            @Nonnull ChooseByNameModel model,
                            @Nonnull ChooseByNameItemProvider provider,
                            @Nullable ChooseByNamePopup oldPopup,
                            @Nullable final String predefinedText,
                            boolean mayRequestOpenInCurrentWindow,
                            int initialIndex) {
  super(project, model, provider, oldPopup != null ? oldPopup.getEnteredText() : predefinedText, initialIndex);
  myOldPopup = oldPopup;
  if (oldPopup != null) { //inherit old focus owner
    myOldFocusOwner = oldPopup.myPreviouslyFocusedComponent;
  }
  myMayRequestCurrentWindow = mayRequestOpenInCurrentWindow;
  myAdText = myMayRequestCurrentWindow ? "Press " +
                                         KeymapUtil.getKeystrokeText(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_MASK)) +
                                         " to open in current window" : null;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:ChooseByNamePopup.java

示例3: updateIcon

import com.intellij.openapi.keymap.KeymapUtil; //导入方法依赖的package包/类
private void updateIcon() {
  if (isActive()) {
    boolean changes = false;

    if (!isVisible()) {
      setVisible(true);
      changes = true;
    }

    Icon icon = UISettings.getInstance().HIDE_TOOL_STRIPES ? AllIcons.General.TbShown : AllIcons.General.TbHidden;
    if (icon != getIcon()) {
      setIcon(icon);
      changes = true;
    }

    Set<Integer> vks = ToolWindowManagerImpl.getActivateToolWindowVKs();
    String text = "Click to show or hide the tool window bars";
    if (vks.size() == 1) {
      Integer stroke = vks.iterator().next();
      String keystrokeText = KeymapUtil.getKeystrokeText(KeyStroke.getKeyStroke(stroke.intValue(), 0));
      text += ".\nDouble-press and hold " + keystrokeText + " to show tool window bars when hidden.";
    }
    if (!text.equals(getToolTipText())) {
      setToolTipText(text);
      changes = true;
    }

    if (changes) {
      revalidate();
      repaint();
    }
  }
  else {
    setVisible(false);
    setToolTipText(null);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:38,代码来源:IdeStatusBarImpl.java

示例4: toString

import com.intellij.openapi.keymap.KeymapUtil; //导入方法依赖的package包/类
@Override
public String toString() {
  String s = getType() == KeyboardGestureAction.ModifierType.dblClick ? "Press, release and hold " : "Hold ";
  s += KeymapUtil.getKeystrokeText(this.getStroke());
  return s;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:KeyboardModifierGestureShortcut.java

示例5: getTextByKeyStroke

import com.intellij.openapi.keymap.KeymapUtil; //导入方法依赖的package包/类
static String getTextByKeyStroke(KeyStroke keyStroke) {
  if(keyStroke == null) {
    return "";
  }
  return KeymapUtil.getKeystrokeText(keyStroke);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:KeyboardShortcutDialog.java

示例6: NewLineAction

import com.intellij.openapi.keymap.KeymapUtil; //导入方法依赖的package包/类
public NewLineAction() {
  super(null, "New line (" + KeymapUtil.getKeystrokeText(NEW_LINE_KEYSTROKE) + ")",  AllIcons.Actions.SearchNewLine);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:4,代码来源:SearchTextArea.java


注:本文中的com.intellij.openapi.keymap.KeymapUtil.getKeystrokeText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。