tmf: Update Javadoc throughout tmf.ui
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / widgets / timegraph / model / ITimeGraphEntry.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2012 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 * Contributors:
10 * Alvaro Sanchez-Leon - Initial API and implementation
11 * Patrick Tasse - Refactoring
12 *******************************************************************************/
13
14 package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model;
15
16 import java.util.Iterator;
17
18 /**
19 * Interface for an entry (row) in the time graph view
20 *
21 * @version 1.0
22 * @author Alvaro Sanchez-Leon
23 * @author Patrick Tasse
24 */
25 public interface ITimeGraphEntry {
26
27 /**
28 * Returns the parent of this entry, or <code>null</code> if it has none.
29 *
30 * @return the parent element, or <code>null</code> if it has none
31 */
32 public ITimeGraphEntry getParent();
33
34 /**
35 * Returns whether this entry has children.
36 *
37 * @return <code>true</code> if the given element has children,
38 * and <code>false</code> if it has no children
39 */
40 public boolean hasChildren();
41
42 /**
43 * Returns the child elements of this entry.
44 *
45 * @return an array of child elements
46 */
47 public ITimeGraphEntry[] getChildren();
48
49 /**
50 * Returns the name of this entry.
51 *
52 * @return the entry name
53 */
54 public String getName();
55
56 /**
57 * Returns the start time of this entry in nanoseconds.
58 *
59 * @return the start time
60 */
61 public long getStartTime();
62
63 /**
64 * Returns the end time of this entry in nanoseconds.
65 *
66 * @return the end time
67 */
68 public long getEndTime();
69
70 /**
71 * Returns whether this entry has time events.
72 * If true, the time events iterator should not be null.
73 *
74 * @return true if the entry has time events
75 *
76 * @see #getTimeEventsIterator
77 * @see #getTimeEventsIterator(long, long, long)
78 */
79 public boolean hasTimeEvents();
80
81 /**
82 * Get an iterator which returns all time events.
83 *
84 * @return the iterator
85 */
86 public <T extends ITimeEvent> Iterator<T> getTimeEventsIterator();
87
88 /**
89 * Get an iterator which only returns events that fall within the start time and the stop time.
90 * The visible duration is the event duration below which further detail is not discernible.
91 * If no such iterator is implemented, provide a basic iterator which returns all events.
92 *
93 * @param startTime start time in nanoseconds
94 * @param stopTime stop time in nanoseconds
95 * @param visibleDuration duration of one pixel in nanoseconds
96 *
97 * @return the iterator
98 */
99 public <T extends ITimeEvent> Iterator<T> getTimeEventsIterator(long startTime, long stopTime, long visibleDuration);
100 }
This page took 0.0319 seconds and 5 git commands to generate.