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


Java ActionPlaces.UNKNOWN属性代码示例

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


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

示例1: SearchTextArea

public SearchTextArea(boolean search) {
  myTextArea = new JTextArea();
  setBorder(JBUI.Borders.empty(6, 6, 6, 8));
  setLayout(new BorderLayout(JBUI.scale(4), 0));
  myTextArea.addPropertyChangeListener("background", this);
  myTextArea.addFocusListener(this);
  myTextArea.setBorder(null);
  myTextArea.setOpaque(false);
  JBScrollPane scrollPane = new JBScrollPane(myTextArea,
                                             ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
                                             ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  scrollPane.getVerticalScrollBar().setBackground(UIUtil.TRANSPARENT_COLOR);
  scrollPane.getViewport().setBorder(null);
  scrollPane.getViewport().setOpaque(false);
  scrollPane.setBorder(JBUI.Borders.emptyRight(2));
  scrollPane.setOpaque(false);
  ShowHistoryAction historyAction = new ShowHistoryAction(search);
  ActionButton button =
    new ActionButton(historyAction, historyAction.getTemplatePresentation(), ActionPlaces.UNKNOWN, new Dimension(JBUI.scale(16), JBUI.scale(16)));
  button.setLook(new InplaceActionButtonLook());
  JPanel p = new NonOpaquePanel(new BorderLayout());
  p.add(button, BorderLayout.NORTH);
  add(p, BorderLayout.WEST);
  add(scrollPane, BorderLayout.CENTER);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:SearchTextArea.java

示例2: handlePopup

private void handlePopup(final MouseEvent e) {
  if (e.getClickCount() != 1 || !e.isPopupTrigger()) return;

  if (e.getX() < 0 || e.getX() >= e.getComponent().getWidth() || e.getY() < 0 || e.getY() >= e.getComponent().getHeight()) return;

  String place = myTabs.getPopupPlace();
  place = place != null ? place : ActionPlaces.UNKNOWN;
  myTabs.myPopupInfo = myInfo;

  final DefaultActionGroup toShow = new DefaultActionGroup();
  if (myTabs.getPopupGroup() != null) {
    toShow.addAll(myTabs.getPopupGroup());
    toShow.addSeparator();
  }

  JBTabsImpl tabs =
    JBTabsImpl.NAVIGATION_ACTIONS_KEY.getData(DataManager.getInstance().getDataContext(e.getComponent(), e.getX(), e.getY()));
  if (tabs == myTabs && myTabs.myAddNavigationGroup) {
    toShow.addAll(myTabs.myNavigationActions);
  }

  if (toShow.getChildrenCount() == 0) return;

  myTabs.myActivePopup = myTabs.myActionManager.createActionPopupMenu(place, toShow).getComponent();
  myTabs.myActivePopup.addPopupMenuListener(myTabs.myPopupListener);

  myTabs.myActivePopup.addPopupMenuListener(myTabs);
  myTabs.myActivePopup.show(e.getComponent(), e.getX(), e.getY());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:TabLabel.java

示例3: invokeAction

private void invokeAction() {
  String actionId = GitToolBoxConfig.getInstance().getUpdateProjectActionId();
  AnAction action = GitToolBoxUpdateProjectApp.getInstance().getById(actionId).getAction();
  DataManager dataManager = DataManager.getInstance();
  WindowManager windowManager = WindowManager.getInstance();
  AnActionEvent evt = new AnActionEvent(null,
      dataManager.getDataContext(windowManager.getFrame(project)), ActionPlaces.UNKNOWN,
      action.getTemplatePresentation(), ActionManager.getInstance(), 5);
  action.actionPerformed(evt);
}
 
开发者ID:zielu,项目名称:GitToolBox,代码行数:10,代码来源:UpdateProject.java

示例4: handlePopup

private void handlePopup(final MouseEvent e) {
  if (e.getClickCount() != 1 || !e.isPopupTrigger()) return;

  if (e.getX() < 0 || e.getX() >= e.getComponent().getWidth() || e.getY() < 0 || e.getY() >= e.getComponent().getHeight()) return;

  String place = myTabs.getPopupPlace();
  place = place != null ? place : ActionPlaces.UNKNOWN;
  myTabs.myPopupInfo = myInfo;

  final DefaultActionGroup toShow = new DefaultActionGroup();
  if (myTabs.getPopupGroup() != null) {
    toShow.addAll(myTabs.getPopupGroup());
    toShow.addSeparator();
  }

  JBTabsImpl tabs = JBTabsImpl.NAVIGATION_ACTIONS_KEY.getData(DataManager.getInstance().getDataContext(e.getComponent(), e.getX(), e.getY()));
  if (tabs == myTabs && myTabs.myAddNavigationGroup) {
    toShow.addAll(myTabs.myNavigationActions);
  }

  if (toShow.getChildrenCount() == 0) return;

  myTabs.myActivePopup = myTabs.myActionManager.createActionPopupMenu(place, toShow).getComponent();
  myTabs.myActivePopup.addPopupMenuListener(myTabs.myPopupListener);

  myTabs.myActivePopup.addPopupMenuListener(myTabs);
  myTabs.myActivePopup.show(e.getComponent(), e.getX(), e.getY());
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:28,代码来源:TabLabel.java

示例5: executeAction

protected void executeAction(final String actionId) {
  final AnAction action = ActionManager.getInstance().getAction(actionId);
  final AnActionEvent event = new AnActionEvent(null, DataManager.getInstance().getDataContext(this), ActionPlaces.UNKNOWN,
                                                action.getTemplatePresentation(), ActionManager.getInstance(),
                                                0);
  action.beforeActionPerformedUpdate(event);
  action.update(event);

  if (event.getPresentation().isEnabled() && event.getPresentation().isVisible()) {
    action.actionPerformed(event);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:EditorNotificationPanel.java

示例6: handlePopup

private void handlePopup(final MouseEvent e) {
  if (e.getClickCount() != 1 || !e.isPopupTrigger()) return;

  if (e.getX() < 0 ||
      e.getX() >= e.getComponent().getWidth() ||
      e.getY() < 0 ||
      e.getY() >= e.getComponent().getHeight()) {
    return;
  }

  String place = myTabs.getPopupPlace();
  place = place != null ? place : ActionPlaces.UNKNOWN;
  myTabs.myPopupInfo = myInfo;

  final DefaultActionGroup toShow = new DefaultActionGroup();
  if (myTabs.getPopupGroup() != null) {
    toShow.addAll(myTabs.getPopupGroup());
    toShow.addSeparator();
  }

  JBTabsImpl tabs = DataManager.getInstance().getDataContext(e.getComponent(), e.getX(), e.getY()).getData(JBTabsImpl.NAVIGATION_ACTIONS_KEY);
  if (tabs == myTabs && myTabs.myAddNavigationGroup) {
    toShow.addAll(myTabs.myNavigationActions);
  }

  if (toShow.getChildrenCount() == 0) return;

  myTabs.myActivePopup = myTabs.myActionManager.createActionPopupMenu(place, toShow).getComponent();
  myTabs.myActivePopup.addPopupMenuListener(myTabs.myPopupListener);

  myTabs.myActivePopup.addPopupMenuListener(myTabs);
  myTabs.myActivePopup.show(e.getComponent(), e.getX(), e.getY());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:33,代码来源:TabLabel.java

示例7: executeAction

@RequiredDispatchThread
protected void executeAction(final String actionId) {
  final AnAction action = ActionManager.getInstance().getAction(actionId);
  final AnActionEvent event = new AnActionEvent(null, DataManager.getInstance().getDataContext(this), ActionPlaces.UNKNOWN, action.getTemplatePresentation(),
                                                ActionManager.getInstance(), 0);
  action.beforeActionPerformedUpdate(event);
  action.update(event);

  if (event.getPresentation().isEnabled() && event.getPresentation().isVisible()) {
    action.actionPerformed(event);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:EditorNotificationPanel.java

示例8: ToolbarPanel

public ToolbarPanel(JComponent contentComponent, ActionGroup actions) {
  this(contentComponent, actions, ActionPlaces.UNKNOWN);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:ToolbarPanel.java

示例9: createCustomComponentImpl

public static JComponent createCustomComponentImpl(final AnAction action, final Presentation presentation) {
  return new ActionButtonWithText(action, presentation, ActionPlaces.UNKNOWN, ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:IconWithTextAction.java

示例10: getToolbarPlace

@Nullable
@Override
public String getToolbarPlace() {
  return ActionPlaces.UNKNOWN;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:5,代码来源:CloudDebugHistoricalSnapshots.java

示例11: createCustomComponentImpl

public static JComponent createCustomComponentImpl(final AnAction action, final Presentation presentation) {
  return new ActionButtonWithText(action, presentation, ActionPlaces.UNKNOWN, JBUI.size(ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:3,代码来源:IconWithTextAction.java


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