use of com.evolveum.midpoint.schema.traces.OpType in project midpoint-studio by Evolveum.
the class TraceService method createOptions.
private Options createOptions(PredefinedOpView opViewType) {
Options options = new Options();
for (OpType op : OpType.values()) {
if (opViewType.getTypes().contains(op)) {
options.getTypesToShow().add(op);
}
}
for (PerformanceCategory pc : PerformanceCategory.values()) {
if (opViewType.getCategories() == null || opViewType.getCategories().contains(pc)) {
options.getCategoriesToShow().add(pc);
}
}
options.setShowAlsoParents(opViewType.isShowAlsoParents());
options.getColumnsToShow().addAll(opViewType.getColumnsToShow());
return options;
}
use of com.evolveum.midpoint.schema.traces.OpType in project midpoint-studio by Evolveum.
the class TraceOptionsPanel method createOptions.
private Options createOptions() {
Options rv = new Options();
for (Map.Entry<OpType, JCheckBox> e : opTypesChecks.entrySet()) {
if (e.getValue().isSelected()) {
rv.getTypesToShow().add(e.getKey());
}
}
for (Map.Entry<PerformanceCategory, JCheckBox> e : categoriesChecks.entrySet()) {
if (e.getValue().isSelected()) {
rv.getCategoriesToShow().add(e.getKey());
}
}
rv.setShowAlsoParents(alsoParentsCheck.isSelected());
columnsChecks.entrySet().stream().filter(e -> e.getValue().isSelected()).map(Map.Entry::getKey).forEach(column -> rv.getColumnsToShow().add(column));
return rv;
}
use of com.evolveum.midpoint.schema.traces.OpType in project midpoint-studio by Evolveum.
the class TraceOptionsPanel method createOpTypesPanel.
private void createOpTypesPanel(JPanel root) {
JPanel opTypesPanel = createBoxLayoutPanel();
opTypesPanel.setBorder(JBUI.Borders.empty(5));
predefinedOpTypesBox = new ComboBox<>(PredefinedOpTypeSet.values());
predefinedOpTypesBox.setAlignmentX(Component.LEFT_ALIGNMENT);
predefinedOpTypesBox.addActionListener(e -> {
PredefinedOpTypeSet predefinedSet = (PredefinedOpTypeSet) predefinedOpTypesBox.getSelectedItem();
LOG.info("Buhahaha " + predefinedSet);
if (predefinedSet != null) {
opTypesChecks.forEach((opType, checkBox) -> checkBox.setSelected(predefinedSet.contains(opType)));
}
});
opTypesPanel.add(predefinedOpTypesBox);
for (OpType type : OpType.values()) {
JCheckBox check = new JCheckBox();
check.setText(type.getLabel());
opTypesPanel.add(check);
opTypesChecks.put(type, check);
}
root.add(new HeaderDecorator("Operation types to show", opTypesPanel), BorderLayout.NORTH);
}
Aggregations