< prev index next >
application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/ChartAndTableUI.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The contents of this file are subject to the terms of either the Universal Permissive License
* v 1.0 as shown at http://oss.oracle.com/licenses/upl
--- 1,8 ----
/*
! * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2019, Red Hat Inc. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The contents of this file are subject to the terms of either the Universal Permissive License
* v 1.0 as shown at http://oss.oracle.com/licenses/upl
*** 82,110 ****
private static final String SASH = "sash"; //$NON-NLS-1$
private static final String TABLE = "table"; //$NON-NLS-1$
private static final String CHART = "chart"; //$NON-NLS-1$
private static final String SELECTED = "selected"; //$NON-NLS-1$
! private final IItemFilter pageFilter;
! private final StreamModel model;
protected CheckboxTableViewer chartLegend;
! protected final Form form;
! protected final Composite chartContainer;
! protected final ChartCanvas chartCanvas;
! protected final FilterComponent tableFilterComponent;
! protected final ItemHistogram table;
! protected final SashForm sash;
! private final IPageContainer pageContainer;
protected List<IAction> allChartSeriesActions;
private IItemCollection selectionItems;
private IRange<IQuantity> timeRange;
protected XYChart chart;
protected FlavorSelector flavorSelector;
ChartAndTableUI(IItemFilter pageFilter, StreamModel model, Composite parent, FormToolkit toolkit,
IPageContainer pageContainer, IState state, String sectionTitle, IItemFilter tableFilter, Image icon,
FlavorSelectorState flavorSelectorState) {
this.pageFilter = pageFilter;
this.model = model;
this.pageContainer = pageContainer;
form = DataPageToolkit.createForm(parent, toolkit, sectionTitle, icon);
sash = new SashForm(form.getBody(), SWT.VERTICAL);
--- 83,118 ----
private static final String SASH = "sash"; //$NON-NLS-1$
private static final String TABLE = "table"; //$NON-NLS-1$
private static final String CHART = "chart"; //$NON-NLS-1$
private static final String SELECTED = "selected"; //$NON-NLS-1$
! private static final int X_OFFSET = 180;
! private IItemFilter pageFilter;
! protected StreamModel model;
protected CheckboxTableViewer chartLegend;
! protected Form form;
! protected Composite chartContainer;
! protected ChartCanvas chartCanvas;
! protected FilterComponent tableFilterComponent;
! protected ItemHistogram table;
! protected SashForm sash;
! private IPageContainer pageContainer;
protected List<IAction> allChartSeriesActions;
private IItemCollection selectionItems;
private IRange<IQuantity> timeRange;
protected XYChart chart;
protected FlavorSelector flavorSelector;
ChartAndTableUI(IItemFilter pageFilter, StreamModel model, Composite parent, FormToolkit toolkit,
IPageContainer pageContainer, IState state, String sectionTitle, IItemFilter tableFilter, Image icon,
FlavorSelectorState flavorSelectorState) {
+ init(pageFilter, model, parent, toolkit, pageContainer, state, sectionTitle, tableFilter, icon, flavorSelectorState);
+ }
+
+ protected void init(IItemFilter pageFilter, StreamModel model, Composite parent, FormToolkit toolkit,
+ IPageContainer pageContainer, IState state, String sectionTitle, IItemFilter tableFilter, Image icon,
+ FlavorSelectorState flavorSelectorState) {
this.pageFilter = pageFilter;
this.model = model;
this.pageContainer = pageContainer;
form = DataPageToolkit.createForm(parent, toolkit, sectionTitle, icon);
sash = new SashForm(form.getBody(), SWT.VERTICAL);
*** 137,147 ****
gd.widthHint = 180;
chartLegend.getControl().setLayoutData(gd);
PersistableSashForm.loadState(sash, state.getChild(SASH));
DataPageToolkit.createChartTimestampTooltip(chartCanvas);
! chart = new XYChart(pageContainer.getRecordingRange(), RendererToolkit.empty(), 180);
DataPageToolkit.setChart(chartCanvas, chart, pageContainer::showSelection);
SelectionStoreActionToolkit.addSelectionStoreRangeActions(pageContainer.getSelectionStore(), chart,
JfrAttributes.LIFETIME, NLS.bind(Messages.ChartAndTableUI_TIMELINE_SELECTION, form.getText()),
chartCanvas.getContextMenu());
buildChart();
--- 145,155 ----
gd.widthHint = 180;
chartLegend.getControl().setLayoutData(gd);
PersistableSashForm.loadState(sash, state.getChild(SASH));
DataPageToolkit.createChartTimestampTooltip(chartCanvas);
! chart = new XYChart(pageContainer.getRecordingRange(), RendererToolkit.empty(), X_OFFSET);
DataPageToolkit.setChart(chartCanvas, chart, pageContainer::showSelection);
SelectionStoreActionToolkit.addSelectionStoreRangeActions(pageContainer.getSelectionStore(), chart,
JfrAttributes.LIFETIME, NLS.bind(Messages.ChartAndTableUI_TIMELINE_SELECTION, form.getText()),
chartCanvas.getContextMenu());
buildChart();
< prev index next >