1 /*******************************************************************************
2 * Copyright (c) 2012, 2014 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
10 * Mathieu Denis <mathieu.denis@polymtl.ca> - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.ui
.viewers
;
15 import org
.eclipse
.swt
.widgets
.Composite
;
16 import org
.eclipse
.tracecompass
.tmf
.core
.component
.TmfComponent
;
19 * Abstract class that extends {@link TmfComponent} to be specific to viewers.
21 * It allows the access to the control and the parent of a viewer.
23 * @author Mathieu Denis
25 public abstract class TmfViewer
extends TmfComponent
implements ITmfViewer
{
28 * The parent composite that holds the viewer
30 protected Composite fParent
;
33 * Default constructor. The viewer have to be initialize through the
34 * {@link TmfViewer#init(Composite, String)} function later on.
41 * Constructor that initializes the parent of the viewer
44 * The parent composite that holds this viewer
46 * @see TmfComponent#TmfComponent(String)
48 public TmfViewer(Composite parent
) {
49 this(parent
, ""); //$NON-NLS-1$
53 * Constructor that initializes the parent of the viewer and that sets the
57 * The parent composite that holds this viewer
59 * The name of the viewer
61 public TmfViewer(Composite parent
, String name
) {
66 * Performs initialization of the viewer. It initializes the component. Need
67 * to be called when the default constructor is used.
70 * The parent composite of the viewer
72 * The name to give to this viewer
73 * @see TmfComponent#init(String)
75 public void init(Composite parent
, String name
) {
81 * @return the parent of this viewer
83 public Composite
getParent() {
This page took 0.037143 seconds and 5 git commands to generate.