use of com.evolveum.midpoint.schema.traces.PerformanceCategory in project midpoint-studio by Evolveum.
the class TraceOptionsPanel method createCategoriesPanel.
private void createCategoriesPanel(JPanel root) {
JPanel categories = createBoxLayoutPanel();
categories.setBorder(JBUI.Borders.empty(5));
predefinedCategoriesBox = new ComboBox<>(PredefinedPerformanceCategoriesSet.values());
predefinedCategoriesBox.setAlignmentX(Component.LEFT_ALIGNMENT);
predefinedCategoriesBox.addActionListener(e -> {
PredefinedPerformanceCategoriesSet predefinedSet = (PredefinedPerformanceCategoriesSet) predefinedCategoriesBox.getSelectedItem();
LOG.info("Buhahaha " + predefinedSet);
if (predefinedSet != null) {
categoriesChecks.forEach((category, checkBox) -> checkBox.setSelected(predefinedSet.contains(category)));
alsoParentsCheck.setSelected(predefinedSet.isShowParents());
}
});
categories.add(predefinedCategoriesBox);
for (PerformanceCategory type : PerformanceCategory.values()) {
JCheckBox check = new JCheckBox();
check.setText(type.getLabel());
categories.add(check);
categoriesChecks.put(type, check);
}
alsoParentsCheck = new JCheckBox();
alsoParentsCheck.setText("Show also parents");
categories.add(alsoParentsCheck);
root.add(new HeaderDecorator("Categories to show", categories), BorderLayout.CENTER);
}
Aggregations