1 /*******************************************************************************
2 * Copyright (c) 2015 Ericsson
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 ********************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.analysis
.os
.linux
.ui
.views
.latency
;
11 import static org
.eclipse
.tracecompass
.common
.core
.NonNullUtils
.nullToEmptyString
;
13 import org
.eclipse
.jdt
.annotation
.Nullable
;
14 import org
.eclipse
.swt
.SWT
;
15 import org
.eclipse
.swt
.custom
.SashForm
;
16 import org
.eclipse
.swt
.widgets
.Composite
;
17 import org
.eclipse
.tracecompass
.tmf
.ui
.views
.TmfView
;
22 * @author Matthew Khouzam
24 public class LatencyScatterView
extends TmfView
{
26 // ------------------------------------------------------------------------
29 public static final String ID
= "org.eclipse.tracecompass.analysis.os.linux.views.latency.scatter"; //$NON-NLS-1$
31 private @Nullable LatencyScatterGraphViewer fScatterViewer
;
33 // ------------------------------------------------------------------------
35 // ------------------------------------------------------------------------
40 public LatencyScatterView() {
44 // ------------------------------------------------------------------------
46 // ------------------------------------------------------------------------
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
));
54 // ------------------------------------------------------------------------
56 // ------------------------------------------------------------------------
59 public void setFocus() {
60 if (fScatterViewer
!= null) {
61 fScatterViewer
.getControl().setFocus();
66 public void dispose() {
68 if (fScatterViewer
!= null) {
69 fScatterViewer
.dispose();