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
10 * Marc-Andre Laperle - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.ui
.signal
;
15 import org
.eclipse
.swt
.graphics
.Point
;
16 import org
.eclipse
.swt
.widgets
.Shell
;
19 * The responsibility of this class is to provide information necessary to
20 * decide whether or not views should be time-aligned with each other and at
23 * @see TmfTimeViewAlignmentSignal
27 public class TmfTimeViewAlignmentInfo
{
28 private final Point fViewLocation
;
29 private final int fTimeAxisOffset
;
30 private final Shell fShell
;
33 * Constructs a new TmfTimeViewAlignmentInfo.
36 * used to determine whether or not views should be aligned
39 * location of the view, used to determine whether or not views
40 * should be aligned together
41 * @param timeAxisOffset
42 * offset relative to the view. This offset will be communicated
45 public TmfTimeViewAlignmentInfo(Shell shell
, Point viewLocation
, int timeAxisOffset
) {
47 fViewLocation
= viewLocation
;
48 fTimeAxisOffset
= timeAxisOffset
;
52 * Get the shell containing this alignment.
56 public Shell
getShell() {
61 * Get the absolute view location. This value is only valid at the time of
62 * the TmfTimeViewAlignmentInfo creation so extra care must be given in
63 * cases where the particular view might have been resized, moved, etc.
65 * @return the absolute view location
67 public Point
getViewLocation() {
72 * Offset relative to the view corresponding to the start of the time axis.
74 * @return the offset in pixels
76 public int getTimeAxisOffset() {
77 return fTimeAxisOffset
;
This page took 0.031279 seconds and 5 git commands to generate.