use of com.evolveum.midpoint.studio.action.transfer.DeleteAction in project midpoint-studio by Evolveum.
the class BrowseToolPanel method deletePerformed.
private void deletePerformed(AnActionEvent evt, boolean rawDownload) {
DeleteAction da = new DeleteAction();
da.setRaw(rawDownload);
da.setOids(getResultsModel().getSelectedOids(results));
ActionManager.getInstance().tryToExecute(da, evt.getInputEvent(), this, ActionPlaces.UNKNOWN, false);
}
use of com.evolveum.midpoint.studio.action.transfer.DeleteAction in project midpoint-studio by Evolveum.
the class BrowseToolPanel method createResultsActionGroup.
private DefaultActionGroup createResultsActionGroup() {
DefaultActionGroup group = new DefaultActionGroup();
AnAction expandAll = MidPointUtils.createAnAction("Expand All", AllIcons.Actions.Expandall, e -> results.expandAll());
group.add(expandAll);
AnAction collapseAll = MidPointUtils.createAnAction("Collapse All", AllIcons.Actions.Collapseall, e -> results.collapseAll());
group.add(collapseAll);
group.add(new Separator());
downloadAction = createAnAction("Download", AllIcons.Actions.Download, e -> downloadPerformed(e, false, rawDownload), e -> e.getPresentation().setEnabled(isDownloadShowEnabled()));
group.add(downloadAction);
showAction = createAnAction("Show", AllIcons.Actions.Show, e -> downloadPerformed(e, true, rawDownload), e -> e.getPresentation().setEnabled(isDownloadShowEnabled()));
group.add(showAction);
deleteAction = createAnAction("Delete", AllIcons.Vcs.Remove, e -> deletePerformed(e, rawDownload), e -> e.getPresentation().setEnabled(isDownloadShowEnabled()));
group.add(deleteAction);
CheckboxAction rawSearch = new CheckboxAction("Raw") {
@Override
public void update(AnActionEvent e) {
e.getPresentation().setEnabled(isDownloadShowEnabled());
super.update(e);
}
@Override
public boolean isSelected(@NotNull AnActionEvent e) {
return BrowseToolPanel.this.rawDownload;
}
@Override
public void setSelected(@NotNull AnActionEvent e, boolean state) {
BrowseToolPanel.this.rawDownload = state;
}
};
group.add(rawSearch);
group.add(new Separator());
processAction = createAnAction("Process", AllIcons.Actions.RealIntentionBulb, e -> processPerformed(e));
group.add(processAction);
group.add(new Separator());
pagingText = new TextAction() {
@NotNull
@Override
public JComponent createCustomComponent(@NotNull Presentation presentation, @NotNull String place) {
JComponent comp = super.createCustomComponent(presentation, place);
comp.setBorder(new CompoundBorder(comp.getBorder(), JBUI.Borders.empty(0, 5)));
return comp;
}
@Override
protected String createText(AnActionEvent evt) {
return createPagingText(evt);
}
};
group.add(pagingText);
return group;
}
Aggregations