Introduce Latency scattergraph
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.os.linux.ui / src / org / eclipse / tracecompass / internal / analysis / os / linux / ui / views / latency / LatencyScatterView.java
CommitLineData
a5c41909
MK
1/*******************************************************************************
2 * Copyright (c) 2015 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 ********************************************************************************/
9
10package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency;
11import static org.eclipse.tracecompass.common.core.NonNullUtils.nullToEmptyString;
12
13import org.eclipse.jdt.annotation.Nullable;
14import org.eclipse.swt.SWT;
15import org.eclipse.swt.custom.SashForm;
16import org.eclipse.swt.widgets.Composite;
17import org.eclipse.tracecompass.tmf.ui.views.TmfView;
18
19/**
20 * Some stuff
21 *
22 * @author Matthew Khouzam
23 */
24public class LatencyScatterView extends TmfView {
25 // Attributes
26 // ------------------------------------------------------------------------
27
28 /** The view's ID */
29 public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.views.latency.scatter"; //$NON-NLS-1$
30
31 private @Nullable LatencyScatterGraphViewer fScatterViewer;
32
33 // ------------------------------------------------------------------------
34 // Constructor
35 // ------------------------------------------------------------------------
36
37 /**
38 * Constructor
39 */
40 public LatencyScatterView() {
41 super(ID);
42 }
43
44 // ------------------------------------------------------------------------
45 // ViewPart
46 // ------------------------------------------------------------------------
47
48 @Override
49 public void createPartControl(@Nullable Composite parent) {
50 SashForm sf = new SashForm(parent, SWT.NONE);
51 fScatterViewer = new LatencyScatterGraphViewer(sf, nullToEmptyString(Messages.LatencyScatterView_title), nullToEmptyString(Messages.LatencyScatterView_xAxis), nullToEmptyString(Messages.LatencyScatterView_yAxis));
52 }
53
54 // ------------------------------------------------------------------------
55 // Operations
56 // ------------------------------------------------------------------------
57
58 @Override
59 public void setFocus() {
60 if (fScatterViewer != null) {
61 fScatterViewer.getControl().setFocus();
62 }
63 }
64
65 @Override
66 public void dispose() {
67 super.dispose();
68 if (fScatterViewer != null) {
69 fScatterViewer.dispose();
70 }
71 }
72
73}
This page took 0.028775 seconds and 5 git commands to generate.