Commit | Line | Data |
---|---|---|
b23cbbfc MAL |
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 | ||
07daa331 | 14 | import org.eclipse.jdt.annotation.Nullable; |
b23cbbfc MAL |
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 | |
fc409c43 | 27 | * @deprecated Use {@link #viewDataChanged(Iterable)} instead |
b23cbbfc | 28 | */ |
fc409c43 | 29 | @Deprecated |
8a461885 GB |
30 | default void dataChanged(List<ISegment> newData) { |
31 | // do nothing | |
32 | } | |
b23cbbfc MAL |
33 | |
34 | /** | |
35 | * Notification that the selection of the data changed in the viewer. | |
36 | * | |
37 | * @param newSelectionData | |
38 | * the new selection of the data | |
fc409c43 | 39 | * @deprecated Use {@link #selectedDataChanged(Iterable)} instead |
b23cbbfc | 40 | */ |
fc409c43 | 41 | @Deprecated |
8a461885 GB |
42 | default void dataSelectionChanged(@Nullable List<ISegment> newSelectionData) { |
43 | // do nothing | |
44 | } | |
fc409c43 GB |
45 | |
46 | /** | |
47 | * Notification that the data changed in the viewer. | |
48 | * | |
49 | * @param newData | |
50 | * the new data | |
6dc61a6f | 51 | * @since 2.0 |
fc409c43 GB |
52 | */ |
53 | default void viewDataChanged(Iterable<? extends ISegment> newData) { | |
54 | // To be implemented by children | |
55 | } | |
56 | ||
57 | /** | |
58 | * Notification that the selection of the data changed in the viewer. | |
59 | * | |
60 | * @param newSelectionData | |
61 | * the new selection of the data | |
6dc61a6f | 62 | * @since 2.0 |
fc409c43 GB |
63 | */ |
64 | default void selectedDataChanged(@Nullable Iterable<? extends ISegment> newSelectionData) { | |
65 | // To be implemented in children | |
66 | } | |
b23cbbfc | 67 | } |