Search in sources :

Example 1 with ViewType

use of com.insightfullogic.honest_profiler.ports.javafx.ViewType in project honest-profiler by jvm-profiling-tools.

the class ProfileRootController method show.

// View Methods
/**
 * Show the selected View.
 * <p>
 *
 * @param viewType the type of View which was selected
 */
private void show(ViewType viewType) {
    // Show/hide the Views based on the selected ViewType.
    for (int i = 0; i < viewChoice.getItems().size(); i++) {
        Node child = content.getChildren().get(i);
        child.setManaged(viewType.ordinal() == i);
        child.setVisible(viewType.ordinal() == i);
    }
    // Activate and deactivate the relevant controllers.
    controllerMap.forEach((type, list) -> list.forEach(ctrl -> ctrl.setActive(viewType == type)));
}
Also used : Button(javafx.scene.control.Button) ProfileContext(com.insightfullogic.honest_profiler.ports.javafx.model.ProfileContext) ConversionUtil.getStringConverterForType(com.insightfullogic.honest_profiler.ports.javafx.util.ConversionUtil.getStringConverterForType) MouseEvent(javafx.scene.input.MouseEvent) INFO_LABEL_PROFILESAMPLECOUNT(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.INFO_LABEL_PROFILESAMPLECOUNT) HashMap(java.util.HashMap) ApplicationContext(com.insightfullogic.honest_profiler.ports.javafx.model.ApplicationContext) FLAME(com.insightfullogic.honest_profiler.ports.javafx.ViewType.FLAME) BindUtil.flatExtractor(com.insightfullogic.honest_profiler.ports.javafx.util.BindUtil.flatExtractor) ContextMenu(javafx.scene.control.ContextMenu) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) FLAT(com.insightfullogic.honest_profiler.ports.javafx.ViewType.FLAT) BY_FQMN_LINENR(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_FQMN_LINENR) CONTENT_LABEL_PROFILESAMPLECOUNT(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.CONTENT_LABEL_PROFILESAMPLECOUNT) TOOLTIP_BUTTON_FREEZE_UNFROZEN(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.TOOLTIP_BUTTON_FREEZE_UNFROZEN) ALL_TOGETHER(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping.ALL_TOGETHER) ANCESTOR_TREE_EXTRACTOR(com.insightfullogic.honest_profiler.ports.javafx.util.BindUtil.ANCESTOR_TREE_EXTRACTOR) ViewType(com.insightfullogic.honest_profiler.ports.javafx.ViewType) Tooltip(javafx.scene.control.Tooltip) BY_METHOD_ID(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_METHOD_ID) Label(javafx.scene.control.Label) MenuItem(javafx.scene.control.MenuItem) TREE(com.insightfullogic.honest_profiler.ports.javafx.ViewType.TREE) Node(javafx.scene.Node) BY_NAME(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping.BY_NAME) DESCENDANT_FLAT_EXTRACTOR(com.insightfullogic.honest_profiler.ports.javafx.util.BindUtil.DESCENDANT_FLAT_EXTRACTOR) Icon.viewFor(com.insightfullogic.honest_profiler.ports.javafx.view.Icon.viewFor) BY_FQMN(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_FQMN) DESCENDANT_TREE_EXTRACTOR(com.insightfullogic.honest_profiler.ports.javafx.util.BindUtil.DESCENDANT_TREE_EXTRACTOR) UNFREEZE_16(com.insightfullogic.honest_profiler.ports.javafx.view.Icon.UNFREEZE_16) ChoiceBox(javafx.scene.control.ChoiceBox) INFO_CHOICE_VIEWTYPE(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.INFO_CHOICE_VIEWTYPE) TOOLTIP_BUTTON_FREEZE_FROZEN(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.TOOLTIP_BUTTON_FREEZE_FROZEN) FXML(javafx.fxml.FXML) INFO_BUTTON_FREEZE_FROZEN(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.INFO_BUTTON_FREEZE_FROZEN) List(java.util.List) ActionEvent(javafx.event.ActionEvent) FREEZE_16(com.insightfullogic.honest_profiler.ports.javafx.view.Icon.FREEZE_16) BindUtil.treeExtractor(com.insightfullogic.honest_profiler.ports.javafx.util.BindUtil.treeExtractor) AnchorPane(javafx.scene.layout.AnchorPane) BY_ID(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping.BY_ID) BY_BCI(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_BCI) INFO_BUTTON_COMPARE(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.INFO_BUTTON_COMPARE) INFO_BUTTON_FREEZE_UNFROZEN(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.INFO_BUTTON_FREEZE_UNFROZEN) LIVE(com.insightfullogic.honest_profiler.ports.javafx.model.ProfileContext.ProfileMode.LIVE) Node(javafx.scene.Node)

Example 2 with ViewType

use of com.insightfullogic.honest_profiler.ports.javafx.ViewType in project honest-profiler by jvm-profiling-tools.

the class ProfileDiffRootController method show.

// View Switch
/**
 * Show the selected View.
 * <p>
 *
 * @param viewType the type of View which was selected
 */
private void show(ViewType viewType) {
    // Show/hide the Views based on the selected ViewType.
    for (int i = 0; i < viewChoice.getItems().size(); i++) {
        Node child = content.getChildren().get(i);
        child.setManaged(viewType.ordinal() == i);
        child.setVisible(viewType.ordinal() == i);
    }
    // Activate and deactivate the relevant controllers.
    controllerMap.forEach((type, list) -> list.forEach(ctrl -> ctrl.setActive(viewType == type)));
}
Also used : ProfileContext(com.insightfullogic.honest_profiler.ports.javafx.model.ProfileContext) ConversionUtil.getStringConverterForType(com.insightfullogic.honest_profiler.ports.javafx.util.ConversionUtil.getStringConverterForType) HashMap(java.util.HashMap) ApplicationContext(com.insightfullogic.honest_profiler.ports.javafx.model.ApplicationContext) FLAME(com.insightfullogic.honest_profiler.ports.javafx.ViewType.FLAME) INFO_LABEL_BASESOURCE(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.INFO_LABEL_BASESOURCE) BindUtil.flatExtractor(com.insightfullogic.honest_profiler.ports.javafx.util.BindUtil.flatExtractor) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) FLAT(com.insightfullogic.honest_profiler.ports.javafx.ViewType.FLAT) BY_FQMN_LINENR(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_FQMN_LINENR) ALL_TOGETHER(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping.ALL_TOGETHER) ViewType(com.insightfullogic.honest_profiler.ports.javafx.ViewType) INFO_LABEL_NEWSOURCE(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.INFO_LABEL_NEWSOURCE) BY_METHOD_ID(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_METHOD_ID) Label(javafx.scene.control.Label) TREE(com.insightfullogic.honest_profiler.ports.javafx.ViewType.TREE) Node(javafx.scene.Node) BY_NAME(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping.BY_NAME) BY_FQMN(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_FQMN) ChoiceBox(javafx.scene.control.ChoiceBox) INFO_CHOICE_VIEWTYPE(com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.INFO_CHOICE_VIEWTYPE) FXML(javafx.fxml.FXML) List(java.util.List) BindUtil.treeExtractor(com.insightfullogic.honest_profiler.ports.javafx.util.BindUtil.treeExtractor) AnchorPane(javafx.scene.layout.AnchorPane) BY_ID(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping.BY_ID) BY_BCI(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_BCI) Node(javafx.scene.Node)

Aggregations

BY_BCI (com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_BCI)2 BY_FQMN (com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_FQMN)2 BY_FQMN_LINENR (com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_FQMN_LINENR)2 BY_METHOD_ID (com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping.BY_METHOD_ID)2 ALL_TOGETHER (com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping.ALL_TOGETHER)2 BY_ID (com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping.BY_ID)2 BY_NAME (com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping.BY_NAME)2 ViewType (com.insightfullogic.honest_profiler.ports.javafx.ViewType)2 FLAME (com.insightfullogic.honest_profiler.ports.javafx.ViewType.FLAME)2 FLAT (com.insightfullogic.honest_profiler.ports.javafx.ViewType.FLAT)2 TREE (com.insightfullogic.honest_profiler.ports.javafx.ViewType.TREE)2 ApplicationContext (com.insightfullogic.honest_profiler.ports.javafx.model.ApplicationContext)2 ProfileContext (com.insightfullogic.honest_profiler.ports.javafx.model.ProfileContext)2 BindUtil.flatExtractor (com.insightfullogic.honest_profiler.ports.javafx.util.BindUtil.flatExtractor)2 BindUtil.treeExtractor (com.insightfullogic.honest_profiler.ports.javafx.util.BindUtil.treeExtractor)2 ConversionUtil.getStringConverterForType (com.insightfullogic.honest_profiler.ports.javafx.util.ConversionUtil.getStringConverterForType)2 INFO_CHOICE_VIEWTYPE (com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.INFO_CHOICE_VIEWTYPE)2 Arrays.asList (java.util.Arrays.asList)2 HashMap (java.util.HashMap)2 List (java.util.List)2