Interface ITimeGraphPresentationProvider
- All Known Implementing Classes:
TimeChartAnalysisProvider,TimeGraphPresentationProvider
public interface ITimeGraphPresentationProvider
Interface for the time graph widget provider
- Author:
- Patrick Tasse
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intState table index for an invisible eventstatic final intState table index for a transparent event (only borders drawn) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColorListener(ITimeGraphColorListener listener) Adds a color settings listener, to be notified when the presentation provider's state colors change.booleanCheck whether time and duration should be displayed in tooltip (after items fromgetEventHoverToolTipInfo(ITimeEvent)).Returns the drawing helper for this presentation provider.Returns a map of name and value providing additional information to display in the tool tip for this event.getEventHoverToolTipInfo(ITimeEvent event, long hoverTime) Returns a map of name and value providing additional information to display in the tool tip for this event.getEventName(ITimeEvent event) Returns the name of this event.getEventStyle(ITimeEvent event) Get the style map of a given ITimeEventgetFilterInput(ITimeEvent event) Get input data used for filteringintgetItemHeight(ITimeGraphEntry entry) Returns the height of this item.org.eclipse.swt.graphics.ImagegetItemImage(ITimeGraphEntry entry) Provides the image icon for a given entry.default StringGet the name of the link typedefault StringGet the id of the state providergetSpecificEventStyle(ITimeEvent event) Get the specific style map for a given event.Returns table of states with state name to state color relationship.intgetStateTableIndex(ITimeEvent event) Returns the index in the state table corresponding to this time event.Returns the name of state types.getStateTypeName(ITimeGraphEntry entry) Returns the name of state type depending on the given entry.voidpostDrawControl(org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.GC gc) Called after drawing the controlvoidpostDrawEntry(ITimeGraphEntry entry, org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.GC gc) Called after drawing an entryvoidpostDrawEvent(ITimeEvent event, org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.GC gc) Called after drawing an eventdefault voidrefresh()Signal the provider that its color settings have changedvoidremoveColorListener(ITimeGraphColorListener listener) Removes a color settings listener.voidSets this presentation provider's drawing helper.
-
Field Details
-
INVISIBLE
static final int INVISIBLEState table index for an invisible event- See Also:
-
TRANSPARENT
static final int TRANSPARENTState table index for a transparent event (only borders drawn)- See Also:
-
-
Method Details
-
getStateTypeName
String getStateTypeName()Returns the name of state types.- Returns:
- the name of state types
-
getStateTypeName
Returns the name of state type depending on the given entry. Note that this overwrites the name which is return by getStateTypeName().- Parameters:
entry- the entry- Returns:
- the name of state type depending on the given entry or null.
-
getStateTable
StateItem[] getStateTable()Returns table of states with state name to state color relationship.- Returns:
- table of states with color and name
- See Also:
-
getStateTableIndex
Returns the index in the state table corresponding to this time event. The index should correspond to a state in the state table, otherwise the color SWT.COLOR_BLACK will be used. If the index returned is TRANSPARENT, only the event borders will be drawn. If the index returned is INVISIBLE or another negative, the event will not be drawn.- Parameters:
event- the time event- Returns:
- the corresponding state table index
- See Also:
-
postDrawControl
void postDrawControl(org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.GC gc) Called after drawing the control- Parameters:
bounds- The drawing rectanglegc- The graphics context
-
postDrawEntry
void postDrawEntry(ITimeGraphEntry entry, org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.GC gc) Called after drawing an entry- Parameters:
entry- the entry that was drawnbounds- the drawing rectanglegc- the graphics context
-
postDrawEvent
void postDrawEvent(ITimeEvent event, org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.GC gc) Called after drawing an event- Parameters:
event- the event that was drawnbounds- the drawing rectanglegc- the graphics context
-
getItemHeight
Returns the height of this item. This value is ignored if the time graph has a fixed item height.- Parameters:
entry- the entry- Returns:
- the item height
- See Also:
-
getItemImage
Provides the image icon for a given entry.- Parameters:
entry- the entry- Returns:
- the image icon
-
getEventName
Returns the name of this event.- Parameters:
event- The event- Returns:
- The event name
-
getEventHoverToolTipInfo
Returns a map of name and value providing additional information to display in the tool tip for this event.- Parameters:
event- the time event- Returns:
- a map of tool tip information
-
getEventHoverToolTipInfo
Returns a map of name and value providing additional information to display in the tool tip for this event.- Parameters:
event- the time eventhoverTime- the time corresponding to the mouse hover position- Returns:
- a map of tool tip information
-
getLinkTypeName
Get the name of the link type- Returns:
- The name of the link type
- Since:
- 4.0
-
displayTimesInTooltip
boolean displayTimesInTooltip()Check whether time and duration should be displayed in tooltip (after items fromgetEventHoverToolTipInfo(ITimeEvent)).- Returns:
trueif times and duration should be displayed on tooltip,falseotherwise.
-
getEventStyle
Get the style map of a given ITimeEvent- Parameters:
event- the time event- Returns:
- the style map, as detailed in
StyleProperties - Since:
- 3.0
-
getPreferenceKey
Get the id of the state provider- Returns:
- The preference key, if there are many instances of a class, this method needs to be overridden
- Since:
- 4.1
-
getSpecificEventStyle
Get the specific style map for a given event.- Parameters:
event- the time event- Returns:
- a style map containing the elements as detailed in
StylePropertiesto override - Since:
- 3.0
-
refresh
default void refresh()Signal the provider that its color settings have changed- Since:
- 3.2
-
getDrawingHelper
ITmfTimeGraphDrawingHelper getDrawingHelper()Returns the drawing helper for this presentation provider.- Returns:
- The drawing helper
- Since:
- 4.0
-
setDrawingHelper
Sets this presentation provider's drawing helper. This helper be needed to know where to draw items, get its coordinates given a time, etc.- Parameters:
helper- The drawing helper- Since:
- 4.0
-
addColorListener
Adds a color settings listener, to be notified when the presentation provider's state colors change.- Parameters:
listener- The new listener for color settings changes- Since:
- 4.0
-
removeColorListener
Removes a color settings listener.- Parameters:
listener- The color settings listener to remove- Since:
- 4.0
-
getFilterInput
Get input data used for filtering- Parameters:
event- The ongoing time event- Returns:
- The map of input data
- Since:
- 4.0
-