Example usage for com.intellij.openapi.actionSystem ActionPlaces EDITOR_TAB

List of usage examples for com.intellij.openapi.actionSystem ActionPlaces EDITOR_TAB

Introduction

In this page you can find the example usage for com.intellij.openapi.actionSystem ActionPlaces EDITOR_TAB.

Prototype

String EDITOR_TAB

To view the source code for com.intellij.openapi.actionSystem ActionPlaces EDITOR_TAB.

Click Source Link

Usage

From source file:mobi.hsz.idea.latex.editor.LatexEditorActionsWrapper.java

License:Open Source License

LatexEditorActionsWrapper(@NotNull FileEditor fileEditor) {
    DefaultActionGroup actions = new DefaultActionGroup();

    actions.addAll(EditorActionsFactory.create(BOLD), EditorActionsFactory.create(ITALIC),
            EditorActionsFactory.create(UNDERLINE), Separator.getInstance(),
            EditorActionsFactory.create(ALIGN_LEFT), EditorActionsFactory.create(ALIGN_CENTER),
            EditorActionsFactory.create(ALIGN_RIGHT), Separator.getInstance(),
            EditorActionsFactory.create(IMAGE), EditorActionsFactory.create(TABLE),
            EditorActionsFactory.create(MATRIX));

    actionToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.EDITOR_TAB, actions, true);
    actionToolbar.setMinimumButtonSize(ActionToolbar.NAVBAR_MINIMUM_BUTTON_SIZE);
    actionToolbar.setTargetComponent(fileEditor.getComponent());
}

From source file:mobi.hsz.idea.latex.ui.LatexFileEditorForm.java

License:Open Source License

/**
 * Creates tree toolbar panel with actions for working with templates tree.
 *
 * @return action toolbar/* w  ww.j a v a  2s  .  c  o  m*/
 */
private ActionToolbar createActionsToolbar() {
    DefaultActionGroup actions = new DefaultActionGroup();

    actions.add(EditorActionsFactory.create(BOLD));
    actions.add(EditorActionsFactory.create(ITALIC));
    actions.add(EditorActionsFactory.create(UNDERLINE));
    actions.addSeparator();
    actions.add(EditorActionsFactory.create(ALIGN_LEFT));
    actions.add(EditorActionsFactory.create(ALIGN_CENTER));
    actions.add(EditorActionsFactory.create(ALIGN_RIGHT));

    final ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.EDITOR_TAB,
            actions, true);
    actionToolbar.setMinimumButtonSize(ActionToolbar.NAVBAR_MINIMUM_BUTTON_SIZE);
    return actionToolbar;
}