Class DefaultTimelineStyleProvider
java.lang.Object
org.eclipse.nebula.widgets.timeline.jface.DefaultTimelineStyleProvider
- All Implemented Interfaces:
ITimelineStyleProvider
public class DefaultTimelineStyleProvider extends java.lang.Object implements ITimelineStyleProvider
-
Constructor Summary
Constructors Constructor Description DefaultTimelineStyleProvider(org.eclipse.jface.resource.ResourceManager resourceManager) -
Method Summary
Modifier and Type Method Description org.eclipse.swt.graphics.ColorgetBackgroundColor()Get diagram background color.org.eclipse.swt.graphics.ColorgetColor(org.eclipse.swt.graphics.RGB rgb)Get a color for the given RGB value.org.eclipse.swt.graphics.ColorgetCursorColor()Get the color for a non-selected cursor.org.eclipse.draw2d.BordergetDetailAreaBorder()Get the border for the detail area.org.eclipse.swt.graphics.ColorgetGridColor()Get the color of the grid.intgetGridLineStyle()Get the line style for the grid.org.eclipse.swt.graphics.ColorgetLaneColor()Get the color for the next lane.intgetLaneHeight()Get height for a given lane.org.eclipse.draw2d.BordergetOverviewAreaBorder()Get the border for the overview area.org.eclipse.draw2d.geometry.InsetsgetOverviewInsets()Get the insets for the overview area.intgetOverviewLaneHeight()Get height for a given lane in overview.intgetOverviewSelectionBackgroundAlpha()Get the alpha value for the overview selection figure.org.eclipse.swt.graphics.ColorgetOverviewSelectionBackgroundColor()Get the background color for the overview selection.org.eclipse.draw2d.BordergetOverviewSelectionBorder()Get the border for the overview selection figure.org.eclipse.swt.graphics.ColorgetSelectedCursorColor()Get the color for a selected cursor.java.lang.StringgetTimeLabel(double timestamp, java.util.concurrent.TimeUnit unit)Get a human readable timestamp for a given time.org.eclipse.draw2d.BordergetTrackBorder(java.lang.String title)Get the border for a track.doublegetZoomFactor()Get the multiplier for the zoom factor to be applied on a zoomIn/zoomOut operation.voidselectEvent(EventFigure eventFigure)Apply styling to select an event figure.booleanshowGrid()Display the grid in the detail area.booleanshowOverview()Display the overview area.booleanshowTimeAxis()Display the time axis below the detail area.voidunselectEvent(EventFigure eventFigure)Revert styling of an event figure selection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.nebula.widgets.timeline.jface.ITimelineStyleProvider
dispose
-
Constructor Details
-
DefaultTimelineStyleProvider
public DefaultTimelineStyleProvider(org.eclipse.jface.resource.ResourceManager resourceManager)
-
-
Method Details
-
getBackgroundColor
public org.eclipse.swt.graphics.Color getBackgroundColor()Description copied from interface:ITimelineStyleProviderGet diagram background color.- Specified by:
getBackgroundColorin interfaceITimelineStyleProvider- Returns:
- background color
-
getDetailAreaBorder
public org.eclipse.draw2d.Border getDetailAreaBorder()Description copied from interface:ITimelineStyleProviderGet the border for the detail area.- Specified by:
getDetailAreaBorderin interfaceITimelineStyleProvider- Returns:
- detail area border
-
getOverviewAreaBorder
public org.eclipse.draw2d.Border getOverviewAreaBorder()Description copied from interface:ITimelineStyleProviderGet the border for the overview area.- Specified by:
getOverviewAreaBorderin interfaceITimelineStyleProvider- Returns:
- overview area border
-
getGridColor
public org.eclipse.swt.graphics.Color getGridColor()Description copied from interface:ITimelineStyleProviderGet the color of the grid.- Specified by:
getGridColorin interfaceITimelineStyleProvider- Returns:
- grid color
-
getGridLineStyle
public int getGridLineStyle()Description copied from interface:ITimelineStyleProviderGet the line style for the grid.- Specified by:
getGridLineStylein interfaceITimelineStyleProvider- Returns:
- grid line style
-
getOverviewSelectionBorder
public org.eclipse.draw2d.Border getOverviewSelectionBorder()Description copied from interface:ITimelineStyleProviderGet the border for the overview selection figure.- Specified by:
getOverviewSelectionBorderin interfaceITimelineStyleProvider- Returns:
- overview selection figure border
-
getOverviewSelectionBackgroundColor
public org.eclipse.swt.graphics.Color getOverviewSelectionBackgroundColor()Description copied from interface:ITimelineStyleProviderGet the background color for the overview selection.- Specified by:
getOverviewSelectionBackgroundColorin interfaceITimelineStyleProvider- Returns:
- figure background color
-
getOverviewSelectionBackgroundAlpha
public int getOverviewSelectionBackgroundAlpha()Description copied from interface:ITimelineStyleProviderGet the alpha value for the overview selection figure.- Specified by:
getOverviewSelectionBackgroundAlphain interfaceITimelineStyleProvider- Returns:
- alpha value
-
getTrackBorder
public org.eclipse.draw2d.Border getTrackBorder(java.lang.String title)Description copied from interface:ITimelineStyleProviderGet the border for a track.- Specified by:
getTrackBorderin interfaceITimelineStyleProvider- Parameters:
title- track title- Returns:
- track border
-
getCursorColor
public org.eclipse.swt.graphics.Color getCursorColor()Description copied from interface:ITimelineStyleProviderGet the color for a non-selected cursor.- Specified by:
getCursorColorin interfaceITimelineStyleProvider- Returns:
- cursor color
-
getSelectedCursorColor
public org.eclipse.swt.graphics.Color getSelectedCursorColor()Description copied from interface:ITimelineStyleProviderGet the color for a selected cursor.- Specified by:
getSelectedCursorColorin interfaceITimelineStyleProvider- Returns:
- selected cursor color
-
showGrid
public boolean showGrid()Description copied from interface:ITimelineStyleProviderDisplay the grid in the detail area.- Specified by:
showGridin interfaceITimelineStyleProvider- Returns:
trueto display the grid,falseto hide
-
showTimeAxis
public boolean showTimeAxis()Description copied from interface:ITimelineStyleProviderDisplay the time axis below the detail area.- Specified by:
showTimeAxisin interfaceITimelineStyleProvider- Returns:
trueto display the time axis,falseto hide
-
getLaneColor
public org.eclipse.swt.graphics.Color getLaneColor()Description copied from interface:ITimelineStyleProviderGet the color for the next lane.- Specified by:
getLaneColorin interfaceITimelineStyleProvider- Returns:
- lane color
-
getLaneHeight
public int getLaneHeight()Description copied from interface:ITimelineStyleProviderGet height for a given lane.- Specified by:
getLaneHeightin interfaceITimelineStyleProvider- Returns:
- height in pixels
-
selectEvent
Description copied from interface:ITimelineStyleProviderApply styling to select an event figure.- Specified by:
selectEventin interfaceITimelineStyleProvider- Parameters:
eventFigure- figure to style
-
unselectEvent
Description copied from interface:ITimelineStyleProviderRevert styling of an event figure selection.- Specified by:
unselectEventin interfaceITimelineStyleProvider- Parameters:
eventFigure- figure to revert style
-
getZoomFactor
public double getZoomFactor()Description copied from interface:ITimelineStyleProviderGet the multiplier for the zoom factor to be applied on a zoomIn/zoomOut operation.- Specified by:
getZoomFactorin interfaceITimelineStyleProvider- Returns:
- zoom factor multiplier
-
getColor
public org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.RGB rgb)Description copied from interface:ITimelineStyleProviderGet a color for the given RGB value. The style provider should take care to buffer colors and to dispose them when the widget gets disposed.- Specified by:
getColorin interfaceITimelineStyleProvider- Parameters:
rgb- RGB value to get color for- Returns:
- color
-
showOverview
public boolean showOverview()Description copied from interface:ITimelineStyleProviderDisplay the overview area.- Specified by:
showOverviewin interfaceITimelineStyleProvider- Returns:
trueto display the overview area,falseto hide
-
getOverviewLaneHeight
public int getOverviewLaneHeight()Description copied from interface:ITimelineStyleProviderGet height for a given lane in overview.- Specified by:
getOverviewLaneHeightin interfaceITimelineStyleProvider- Returns:
- height in pixels
-
getOverviewInsets
public org.eclipse.draw2d.geometry.Insets getOverviewInsets()Description copied from interface:ITimelineStyleProviderGet the insets for the overview area. These insets will be applied within the border acquired fromITimelineStyleProvider.getOverviewAreaBorder(). The top inset will also be used for lane spacing.- Specified by:
getOverviewInsetsin interfaceITimelineStyleProvider- Returns:
- insets to be used for the overview area
-
getTimeLabel
public java.lang.String getTimeLabel(double timestamp, java.util.concurrent.TimeUnit unit)Description copied from interface:ITimelineStyleProviderGet a human readable timestamp for a given time. The provided label will be used for axis labels and cursor popups.- Specified by:
getTimeLabelin interfaceITimelineStyleProvider- Parameters:
timestamp- timestamp in eventTimeunit- time unit to be used- Returns:
- time value
-