1 /*******************************************************************************
2 * Copyright (c) 2009, 2012 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 * Alvaro Sanchez-Leon - Initial API and implementation
11 * Patrick Tasse - Refactoring
12 *******************************************************************************/
14 package org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
;
16 import java
.util
.Iterator
;
19 * Interface for an entry (row) in the time graph view
22 * @author Alvaro Sanchez-Leon
23 * @author Patrick Tasse
25 public interface ITimeGraphEntry
{
28 * Returns the parent of this entry, or <code>null</code> if it has none.
30 * @return the parent element, or <code>null</code> if it has none
32 public ITimeGraphEntry
getParent();
35 * Returns whether this entry has children.
37 * @return <code>true</code> if the given element has children,
38 * and <code>false</code> if it has no children
40 public boolean hasChildren();
43 * Returns the child elements of this entry.
45 * @return an array of child elements
47 public ITimeGraphEntry
[] getChildren();
50 * Returns the name of this entry.
52 * @return the entry name
54 public String
getName();
57 * Returns the start time of this entry in nanoseconds.
59 * @return the start time
61 public long getStartTime();
64 * Returns the end time of this entry in nanoseconds.
66 * @return the end time
68 public long getEndTime();
71 * Returns whether this entry has time events.
72 * If true, the time events iterator should not be null.
74 * @return true if the entry has time events
76 * @see #getTimeEventsIterator
77 * @see #getTimeEventsIterator(long, long, long)
79 public boolean hasTimeEvents();
82 * Get an iterator which returns all time events.
84 * @return the iterator
86 public <T
extends ITimeEvent
> Iterator
<T
> getTimeEventsIterator();
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.
93 * @param startTime start time in nanoseconds
94 * @param stopTime stop time in nanoseconds
95 * @param visibleDuration duration of one pixel in nanoseconds
97 * @return the iterator
99 public <T
extends ITimeEvent
> Iterator
<T
> getTimeEventsIterator(long startTime
, long stopTime
, long visibleDuration
);
This page took 0.0319 seconds and 5 git commands to generate.