Search in sources :

Example 6 with PerformanceCategory

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);
}
Also used : HeaderDecorator(com.evolveum.midpoint.studio.ui.HeaderDecorator) PerformanceCategory(com.evolveum.midpoint.schema.traces.PerformanceCategory)

Aggregations

PerformanceCategory (com.evolveum.midpoint.schema.traces.PerformanceCategory)6 PerformanceCategoryInfo (com.evolveum.midpoint.schema.traces.PerformanceCategoryInfo)3 Map (java.util.Map)3 OpNode (com.evolveum.midpoint.schema.traces.OpNode)2 OpType (com.evolveum.midpoint.schema.traces.OpType)2 MidPointProjectNotifier (com.evolveum.midpoint.studio.impl.MidPointProjectNotifier)2 MidPointProjectNotifierAdapter (com.evolveum.midpoint.studio.impl.MidPointProjectNotifierAdapter)2 TreeTableColumnDefinition (com.evolveum.midpoint.studio.ui.TreeTableColumnDefinition)2 ListTableModel (com.evolveum.midpoint.studio.ui.trace.singleOp.model.ListTableModel)2 MidPointUtils.formatTime (com.evolveum.midpoint.studio.util.MidPointUtils.formatTime)2 SingleOperationPerformanceInformationType (com.evolveum.midpoint.xml.ns._public.common.common_3.SingleOperationPerformanceInformationType)2 JBSplitter (com.intellij.ui.JBSplitter)2 OnePixelSplitter (com.intellij.ui.OnePixelSplitter)2 JBScrollPane (com.intellij.ui.components.JBScrollPane)2 JBTable (com.intellij.ui.table.JBTable)2 MessageBus (com.intellij.util.messages.MessageBus)2 BorderLayoutPanel (com.intellij.util.ui.components.BorderLayoutPanel)2 java.awt (java.awt)2 ArrayList (java.util.ArrayList)2 Comparator (java.util.Comparator)2