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
.views
;
15 import org
.eclipse
.tracecompass
.tmf
.ui
.signal
.TmfTimeViewAlignmentInfo
;
18 * An interface that adds the time-axis alignment feature to a view. This
19 * interface provides information about the current state of alignment of the
20 * view as well as performs alignment operations in case the views become
21 * misaligned (resize, moved, etc).
25 public interface ITmfTimeAligned
{
28 * Get the time alignment information. The view provides information about
29 * where the time-axis is in addition to information necessary to decide
30 * whether or not views should be time-aligned with each other (Shell,
33 * @return the time alignment information
35 TmfTimeViewAlignmentInfo
getTimeViewAlignmentInfo();
38 * Get the available width for the specified time-axis offset. The
39 * implementation should return the width that would be available if the
40 * time-axis was to be at that offset. When about to perform a re-alignment,
41 * the alignment algorithm will choose the narrowest width to accommodate
44 * @param requestedOffset
45 * the requested time-axis offset. Greater or equal to zero.
46 * @return the available width. Should be greater or equal to zero.
48 int getAvailableWidth(int requestedOffset
);
51 * Perform the alignment by moving the time-axis to the specified offset and
52 * the resizing it to the specified width. Implementations should handle
53 * cases were the requested width is greater than the width of the view. For
54 * example, Integer.MAX_VALUE can be requested in order to obtain the
55 * largest width possible.
58 * the time-axis offset. Greater or equal to zero.
60 * the time-axis width. Greater or equal to zero. Can be
63 void performAlign(int offset
, int width
);
This page took 0.032605 seconds and 5 git commands to generate.