49e0cb08819ee2fe9b1310a548a22e8af1f1ffcc
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.timing.ui / src / org / eclipse / tracecompass / analysis / timing / ui / views / segmentstore / density / ISegmentStoreDensityViewerDataListener.java
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
10 package org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.density;
11
12 import java.util.List;
13
14 import org.eclipse.jdt.annotation.Nullable;
15 import org.eclipse.tracecompass.segmentstore.core.ISegment;
16
17 /**
18 * A listener that gets notified when the viewer sees its data changed or its
19 * data selection change.
20 */
21 public interface ISegmentStoreDensityViewerDataListener {
22 /**
23 * Notification that the data changed in the viewer.
24 *
25 * @param newData
26 * the new data
27 * @deprecated Use {@link #viewDataChanged(Iterable)} instead
28 */
29 @Deprecated
30 void dataChanged(List<ISegment> newData);
31
32 /**
33 * Notification that the selection of the data changed in the viewer.
34 *
35 * @param newSelectionData
36 * the new selection of the data
37 * @deprecated Use {@link #selectedDataChanged(Iterable)} instead
38 */
39 @Deprecated
40 void dataSelectionChanged(@Nullable List<ISegment> newSelectionData);
41
42 /**
43 * Notification that the data changed in the viewer.
44 *
45 * @param newData
46 * the new data
47 * @since 2.0
48 */
49 default void viewDataChanged(Iterable<? extends ISegment> newData) {
50 // To be implemented by children
51 }
52
53 /**
54 * Notification that the selection of the data changed in the viewer.
55 *
56 * @param newSelectionData
57 * the new selection of the data
58 * @since 2.0
59 */
60 default void selectedDataChanged(@Nullable Iterable<? extends ISegment> newSelectionData) {
61 // To be implemented in children
62 }
63 }
This page took 0.032228 seconds and 4 git commands to generate.