use of com.intellij.openapi.actionSystem.DefaultActionGroup in project intellij-plugins by JetBrains.
the class StatusToolbarImpl method createBottomPanel.
private Component createBottomPanel() {
DefaultActionGroup actions = new DefaultActionGroup();
for (Class<? extends NamedUserCommand> toolbarAction : getToolbarActions()) {
actions.add(new BaseAction(toolbarAction));
}
final ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar("BottomToolbar", actions, true);
actionToolbar.setLayoutPolicy(ActionToolbar.NOWRAP_LAYOUT_POLICY);
return actionToolbar.getComponent();
}
use of com.intellij.openapi.actionSystem.DefaultActionGroup in project intellij-plugins by JetBrains.
the class JabberIdeaUI method initPerProject.
public void initPerProject(MutablePicoContainer projectLevelContainer) {
StatusToolbar statusToolbar = ((StatusToolbar) projectLevelContainer.getComponentInstanceOfType(StatusToolbar.class));
if (statusToolbar != null) {
statusToolbar.addToolbarCommand(JabberConnectionCommand.class);
}
if (!ourInitialized && ApplicationManager.getApplication() != null && !Pico.isUnitTest()) {
DefaultActionGroup group = ((DefaultActionGroup) ActionManager.getInstance().getAction("IDEtalk.OptionsGroup"));
if (group != null) {
group.add(new EditJabberSettingsAction(), new Constraints(Anchor.FIRST, ""));
}
ourInitialized = true;
}
}
use of com.intellij.openapi.actionSystem.DefaultActionGroup in project intellij-community by JetBrains.
the class CloudAccountSelectionEditor method onNewButton.
private void onNewButton() {
if (myCloudTypes.size() == 1) {
createAccount(ContainerUtil.getFirstItem(myCloudTypes));
return;
}
DefaultActionGroup group = new DefaultActionGroup();
for (final ServerType<?> cloudType : myCloudTypes) {
group.add(new AnAction(cloudType.getPresentableName(), cloudType.getPresentableName(), cloudType.getIcon()) {
@Override
public void actionPerformed(AnActionEvent e) {
createAccount(cloudType);
}
});
}
JBPopupFactory.getInstance().createActionGroupPopup("New Account", group, DataManager.getInstance().getDataContext(myMainPanel), JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, false).showUnderneathOf(myNewButton);
}
use of com.intellij.openapi.actionSystem.DefaultActionGroup in project intellij-community by JetBrains.
the class MoveChangesDialog method createCenterPanel.
@Override
protected JComponent createCenterPanel() {
JPanel panel = new JPanel(new BorderLayout());
panel.add(ScrollPaneFactory.createScrollPane(myTreeList), BorderLayout.CENTER);
DefaultActionGroup actionGroup = new DefaultActionGroup(myTreeList.getTreeActions());
panel.add(ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, actionGroup, true).getComponent(), BorderLayout.NORTH);
myTreeList.expandAll();
myTreeList.repaint();
return panel;
}
use of com.intellij.openapi.actionSystem.DefaultActionGroup in project intellij-community by JetBrains.
the class AddMultipleFilesOptionsDialog method createToolbar.
private JComponent createToolbar() {
ActionManager actionManager = ActionManager.getInstance();
DefaultActionGroup group = new DefaultActionGroup();
group.add(new SelectAllAction());
group.add(new UnselectAllAction());
return actionManager.createActionToolbar(CvsActionPlaces.ADD_FILES_TOOLBAR, group, true).getComponent();
}
Aggregations