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


Java ActionGroup.getChildren方法代码示例

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


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

示例1: getChildrenCountRecursive

import com.intellij.openapi.actionSystem.ActionGroup; //导入方法依赖的package包/类
private static int getChildrenCountRecursive(ActionGroup group) {
  AnAction[] children;
  if (group instanceof DefaultActionGroup) {
    children = ((DefaultActionGroup) group).getChildActionsOrStubs();
  }
  else {
    children = group.getChildren(null);
  }
  int count = 0;
  for (AnAction child : children) {
    if (child instanceof ActionGroup) {
      count += getChildrenCountRecursive((ActionGroup) child);
    }
    else {
      count++;
    }
  }
  return count;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:SmartPopupActionGroup.java

示例2: ActionPanel

import com.intellij.openapi.actionSystem.ActionGroup; //导入方法依赖的package包/类
public ActionPanel(JBTabsImpl tabs, TabInfo tabInfo, Pass<MouseEvent> pass) {
  myTabs = tabs;
  ActionGroup group = tabInfo.getTabLabelActions() != null ? tabInfo.getTabLabelActions() : new DefaultActionGroup();
  AnAction[] children = group.getChildren(null);

  final NonOpaquePanel wrapper = new NonOpaquePanel(new BorderLayout());
  wrapper.add(Box.createHorizontalStrut(2), BorderLayout.WEST);
  NonOpaquePanel inner = new NonOpaquePanel();
  inner.setLayout(new BoxLayout(inner, BoxLayout.X_AXIS));
  wrapper.add(inner, BorderLayout.CENTER);
  for (AnAction each : children) {
    ActionButton eachButton = new ActionButton(myTabs, tabInfo, each, tabInfo.getTabActionPlace(), pass, tabs.getTabActionsMouseDeadzone()) {
      @Override
      protected void repaintComponent(final Component c) {
        TabLabel tabLabel = (TabLabel) SwingUtilities.getAncestorOfClass(TabLabel.class, c);
        if (tabLabel != null) {
          Point point = SwingUtilities.convertPoint(c, new Point(0, 0), tabLabel);
          Dimension d = c.getSize();
          tabLabel.repaint(point.x, point.y, d.width, d.height);
        } else {
          super.repaintComponent(c);
        }
      }
    };
    
    myButtons.add(eachButton);
    InplaceButton component = eachButton.getComponent();
    inner.add(component);
  }

  add(wrapper);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:ActionPanel.java

示例3: addToolbarActions

import com.intellij.openapi.actionSystem.ActionGroup; //导入方法依赖的package包/类
public void addToolbarActions(final DialogWrapper dialogWrapper) {
  final ActionGroup group = (ActionGroup) ActionManager.getInstance().getAction("AlienCommitChangesDialog.AdditionalActions");
  final AnAction[] children = group.getChildren(null);
  if (children != null) {
    for (AnAction anAction : children) {
      super.addToolbarAction(anAction);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:AlienChangeListBrowser.java

示例4: getLayoutActionsList

import com.intellij.openapi.actionSystem.ActionGroup; //导入方法依赖的package包/类
@NotNull
@Override
public AnAction[] getLayoutActionsList() {
  final ActionGroup group = (ActionGroup)getLayoutActions();
  return group.getChildren(null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:RunnerLayoutUiImpl.java

示例5: getSettingsActionsList

import com.intellij.openapi.actionSystem.ActionGroup; //导入方法依赖的package包/类
@NotNull
@Override
public AnAction[] getSettingsActionsList() {
  final ActionGroup group = (ActionGroup)getSettingsActions();
  return group.getChildren(null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:RunnerLayoutUiImpl.java


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