use of com.intellij.openapi.actionSystem.ActionToolbar in project intellij-plugins by JetBrains.
the class IDEtalkToolWindow method createToolbar.
private ActionToolbar createToolbar(final ActionGroup toolbarActions) {
final ActionToolbar toolbar = myActionManager.createActionToolbar(PLACE_TOOLBAR, toolbarActions, true);
toolbar.setLayoutPolicy(ActionToolbar.NOWRAP_LAYOUT_POLICY);
return toolbar;
}
use of com.intellij.openapi.actionSystem.ActionToolbar 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.ActionToolbar in project android by JetBrains.
the class NlActionsToolbar method createToolbarComponent.
private JComponent createToolbarComponent() {
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
// Create a layout where there are three toolbars:
// +----------------------------------------------------------------------------+
// | Normal toolbar, minus dynamic actions |
// +---------------------------------------------+------------------------------+
// | Dynamic layout actions | Zoom actions and file status |
// +---------------------------------------------+------------------------------+
ConfigurationHolder context = new NlEditorPanel.NlConfigurationHolder(mySurface);
ActionGroup configGroup = createConfigActions(context, mySurface);
ActionManager actionManager = ActionManager.getInstance();
myActionToolbar = actionManager.createActionToolbar("NlConfigToolbar", configGroup, true);
myActionToolbar.getComponent().setName("NlConfigToolbar");
myActionToolbar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);
JComponent actionToolbarComponent = myActionToolbar.getComponent();
actionToolbarComponent.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
panel.add(actionToolbarComponent, BorderLayout.NORTH);
final ActionToolbar layoutToolBar = actionManager.createActionToolbar("NlLayoutToolbar", myDynamicGroup, true);
layoutToolBar.getComponent().setName("NlLayoutToolbar");
layoutToolBar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);
JPanel bottom = new JPanel(new BorderLayout());
bottom.add(layoutToolBar.getComponent(), BorderLayout.WEST);
JPanel combined = new JPanel(new BorderLayout());
ActionToolbar zoomToolBar = actionManager.createActionToolbar("NlRhsToolbar", getRhsActions(mySurface), true);
combined.add(zoomToolBar.getComponent(), BorderLayout.WEST);
bottom.add(combined, BorderLayout.EAST);
panel.add(bottom, BorderLayout.SOUTH);
mySurface.addListener(this);
updateViewActions();
return panel;
}
use of com.intellij.openapi.actionSystem.ActionToolbar in project intellij-community by JetBrains.
the class IncomingChangesViewProvider method initContent.
public JComponent initContent() {
myBrowser = new CommittedChangesTreeBrowser(myProject, Collections.<CommittedChangeList>emptyList());
myBrowser.getEmptyText().setText(VcsBundle.message("incoming.changes.not.loaded.message"));
ActionGroup group = (ActionGroup) ActionManager.getInstance().getAction("IncomingChangesToolbar");
final ActionToolbar toolbar = myBrowser.createGroupFilterToolbar(myProject, group, null, Collections.<AnAction>emptyList());
myBrowser.setToolBar(toolbar.getComponent());
myBrowser.setTableContextMenu(group, Collections.<AnAction>emptyList());
myConnection = myBus.connect();
myConnection.subscribe(CommittedChangesCache.COMMITTED_TOPIC, new MyCommittedChangesListener());
loadChangesToBrowser(false, true);
return myBrowser;
}
use of com.intellij.openapi.actionSystem.ActionToolbar in project intellij-community by JetBrains.
the class ProjectLevelVcsManagerImpl method getOrCreateConsoleContent.
private Content getOrCreateConsoleContent(final ContentManager contentManager) {
final String displayName = VcsBundle.message("vcs.console.toolwindow.display.name");
Content content = contentManager.findContent(displayName);
if (content == null) {
releaseConsole();
myConsole = TextConsoleBuilderFactory.getInstance().createBuilder(myProject).getConsole();
JPanel panel = new JPanel(new BorderLayout());
panel.add(myConsole.getComponent(), BorderLayout.CENTER);
ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, new DefaultActionGroup(myConsole.createConsoleActions()), false);
panel.add(toolbar.getComponent(), BorderLayout.WEST);
content = ContentFactory.SERVICE.getInstance().createContent(panel, displayName, true);
content.setDisposer(myConsoleDisposer);
contentManager.addContent(content);
for (Pair<String, ConsoleViewContentType> pair : myPendingOutput) {
printToConsole(pair.first, pair.second);
}
myPendingOutput.clear();
}
return content;
}
Aggregations