Search in sources :

Example 1 with InplaceActionButtonLook

use of com.intellij.openapi.actionSystem.impl.InplaceActionButtonLook in project intellij-community by JetBrains.

the class SearchTextArea method createButton.

private static ActionButton createButton(AnAction action) {
    Presentation presentation = action.getTemplatePresentation();
    Dimension d = new JBDimension(16, 16);
    ActionButton button = new ActionButton(action, presentation, ActionPlaces.UNKNOWN, d) {

        @Override
        protected DataContext getDataContext() {
            return DataManager.getInstance().getDataContext(this);
        }
    };
    button.setLook(new InplaceActionButtonLook());
    button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    button.updateIcon();
    return button;
}
Also used : ActionButton(com.intellij.openapi.actionSystem.impl.ActionButton) JBDimension(com.intellij.util.ui.JBDimension) JBDimension(com.intellij.util.ui.JBDimension) InplaceActionButtonLook(com.intellij.openapi.actionSystem.impl.InplaceActionButtonLook)

Aggregations

ActionButton (com.intellij.openapi.actionSystem.impl.ActionButton)1 InplaceActionButtonLook (com.intellij.openapi.actionSystem.impl.InplaceActionButtonLook)1 JBDimension (com.intellij.util.ui.JBDimension)1