use of com.intellij.openapi.actionSystem.impl.ActionButton in project intellij-community by JetBrains.
the class ReloadablePanel method createReloadButtonPanel.
@NotNull
private JPanel createReloadButtonPanel() {
ReloadAction reloadAction = new ReloadAction();
ActionButton reloadButton = new ActionButton(reloadAction, reloadAction.getTemplatePresentation().clone(), CONTROL_PLACE, ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE);
JPanel panel = new JPanel(new BorderLayout(0, 0));
panel.add(reloadButton, BorderLayout.WEST);
return panel;
}
use of com.intellij.openapi.actionSystem.impl.ActionButton in project intellij-community by JetBrains.
the class JBMovePanel method setEnabled.
// Commented to preserve green code policy until this method is not used. Uncomment when necessary.
//public void setRightInsertionStrategy(@NotNull InsertPositionStrategy rightInsertionStrategy) {
// myRightInsertionStrategy = rightInsertionStrategy;
//}
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
myLeftList.setEnabled(enabled);
myRightList.setEnabled(enabled);
for (ActionButton button : myButtons.values()) {
button.setEnabled(enabled);
}
}
use of com.intellij.openapi.actionSystem.impl.ActionButton in project intellij-community by JetBrains.
the class JBMovePanel method createButton.
@NotNull
private ActionButton createButton(@NotNull final ButtonType type) {
final AnAction action;
switch(type) {
case LEFT:
action = new LeftAction();
break;
case RIGHT:
action = new RightAction();
break;
case ALL_LEFT:
action = new AllLeftAction();
break;
case ALL_RIGHT:
action = new AllRightAction();
break;
default:
throw new IllegalArgumentException("Unsupported button type: " + type);
}
ActionButton button = createButton(action);
myButtons.put(type, button);
return button;
}
use of com.intellij.openapi.actionSystem.impl.ActionButton in project android by JetBrains.
the class ProjectStructureDialogFixture method clickAddButtonImpl.
protected void clickAddButtonImpl() {
ActionButton addButton = robot().finder().find(target(), new GenericTypeMatcher<ActionButton>(ActionButton.class) {
@Override
protected boolean isMatching(@NotNull ActionButton button) {
String toolTipText = button.getToolTipText();
return button.isShowing() && toolTipText != null && toolTipText.startsWith("Add");
}
});
robot().click(addButton);
}
use of com.intellij.openapi.actionSystem.impl.ActionButton in project android by JetBrains.
the class NlConfigurationToolbarFixture method showDesign.
/**
* Click on the "Show Design" button
*/
public NlConfigurationToolbarFixture showDesign() {
ActionButton button = waitUntilShowing(myRobot, myToolBar.getComponent(), new GenericTypeMatcher<ActionButton>(ActionButton.class) {
@Override
protected boolean isMatching(@NotNull ActionButton component) {
return "Show Design".equals(component.getAction().getTemplatePresentation().getDescription());
}
});
new ActionButtonFixture(myRobot, button).click();
return this;
}
Aggregations