de.jaret.util.ui.timebars
Interface TimeBarViewerInterface

All Known Implementing Classes:
TimeBarViewer, TimeBarViewer

public interface TimeBarViewerInterface

This interface has to be implemented by the Swing and SWT version of the timebar viewer. Its use is mainly for the TimeBarViewerDelegate to interact with the concrete implementation it supports. Applications should use the specific TimeBarViewer (Swing or SWT) directly.

Version:
$Id: TimeBarViewerInterface.java 1083 2011-07-01 20:29:16Z kliem $
Author:
Peter Kliem

Nested Class Summary
static class TimeBarViewerInterface.Orientation
          enum for the possible orientations.
 
Field Summary
static int DEFAULT_ROWHEIGHT
          default for the rowheight.
static int DEFAULT_XAXISHEIGHT
          default for the xaxis (timescale) height.
static int DEFAULT_YAXISWIDTH
          default for the yaxis width.
static java.lang.String PROPERTYNAME_FIRSTROW
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_FIRSTROWOFFSET
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_INTERVALFILTER
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_MAXDATE
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_MINDATE
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_PIXELPERSECOND
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_ROWFILTER
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_ROWHEIGHT
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_ROWHEIGHTDRAGGINGALLOWED
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_ROWSORTER
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_STARTDATE
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_XAXISHEIGHT
          property name constant of the bound property.
static java.lang.String PROPERTYNAME_YAXISWIDTH
          property name constant of the bound property.
static int TIMESCALE_POSITION_BOTTOM
          Constant value indicating the time scale should be drawn at the bottom of the diagram.
static int TIMESCALE_POSITION_NONE
          Constant value indicating no time scale should be painted.
static int TIMESCALE_POSITION_TOP
          Constant value indicating the time scale should be drawn on top of the diagram.
 
Method Summary
 void addFocussedIntervalListener(FocussedIntervalListener listener)
          Add a listener to be informed when the focus inside the viewer changes.
 void addIntervalModificator(IntervalModificator intervalModificator)
          Add an intervalModificator controlling changes on the intervals.
 void addMarker(TimeBarMarker marker)
          Add a timebar marker.
 void addMarkers(java.util.List<TimeBarMarker> markers)
          Directly set a list of markers.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a PropertyChangeListener.
 void addSelectionRectListener(ISelectionRectListener listener)
          Add a listener to be informed when the selection rect changes.
 void addTimeBarChangeListener(ITimeBarChangeListener listener)
          Add a listener to be informaed about interval changes.
 void clearRegionRect()
          Remove the selction of a region if existent.
 de.jaret.util.date.JaretDate dateForX(int x)
          Get the corresponding date for an x coordinate in the viewer area.
 de.jaret.util.date.JaretDate dateForXY(int x, int y)
          Get the corresponding date for a point in the viewer area.
 void displayBodyContextMenu(int x, int y)
          Display the context menu for the normal viewer body.
 void displayHeaderContextMenu(TimeBarRow row, int x, int y)
          Display the header context menu.
 void displayHierarchyContextMenu(TimeBarRow row, int x, int y)
          Display the hierarchy area context menu.
 void displayIntervalContextMenu(de.jaret.util.date.Interval interval, int x, int y)
          Display the context menu for an interval.
 void displayTimeScaleContextMenu(int x, int y)
          Display the context menu for the time scale.
 void displayTitleContextMenu(int x, int y)
          Display the title area context menu.
 void doScrollHorizontal(int diff)
          Do horizontal scrolling by diff pixel.
 void doScrollVertical(int diff)
          Do vertical scrolling by diff pixel.
 void firePropertyChange(java.lang.String string, double oldValue, double newValue)
          Fire a property change.
 void firePropertyChangeX(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)
          Fire a property change.
 void fireSelectionChanged()
          Called by the delegate whenever the selection changed (to support selction provider under SWT).
 boolean getAdjustMinMaxDatesByModel()
          Retrieve the adjustment policy for min and max date.
 int getAutoScaleRows()
          Get the number of rows (columns) that the viewer scales itself to.
 int getAutoscrollDelta()
          Retrieve the currently set autoscroll delta.
 TimeBarViewerDelegate getDelegate()
          Retrieve the delegate ATTENTION: the delegate is for mostly internal usage only.
 boolean getDragAllSelectedIntervals()
          If true all selected intervals will be dragged together with the interval on that the drag happened.
 boolean getDrawRowGrid()
          Retrieve the status of row grid drawing.
 int getFirstRowDisplayed()
          Retrieve the index of the first row that is displayed.
 int getFirstRowOffset()
          Retrieve the pixeloffset for the first row.
 java.lang.String getHeaderToolTipText(TimeBarRow row, int x, int y)
          Retrieve the tooltip for a position on a row.
 int getHeight()
          Return the height of the viewer.
 boolean getHideRoot()
          Retrieve whether the root node is shown when using a hierachical model.
 HierarchicalTimeBarModel getHierarchicalModel()
          Retrieve the hierarchical model of the viewer.
 HierarchicalViewState getHierarchicalViewState()
          Retrieve the hierarchical viewstate used by the viewer.
 java.lang.String getHierarchyToolTipText(TimeBarNode node, int x, int y)
          Retrieve the tooltip for a position in the hierarchy.
 int getHierarchyWidth()
          Retrieve the width of the hierarchy area.
 java.lang.String getIntervalToolTipText(de.jaret.util.date.Interval interval, java.awt.Rectangle intervalRect, int x, int y)
          Get the tooltip text for a given location in a rendered interval.
 boolean getMarkerDraggingInDiagramArea()
          Retrieve whether marker dragging in the diagram area is activated.
 java.util.List<TimeBarMarker> getMarkers()
          Retrieve the list of al markers.
 int getMarkerWidth(TimeBarMarker marker)
          Get the width for marker painting (as requested by a marker renderer).
 de.jaret.util.date.JaretDate getMaxDate()
          Retrieve the maximum date that can be displayed.
 de.jaret.util.date.JaretDate getMinDate()
          Retrieve the minimum value present in the data of the viewer.
 TimeBarModel getModel()
          Retrieve the flat model used by the viewer.
 java.lang.String getName()
          Retrieve the name set on the viewer.
 boolean getOptimizeScrolling()
          Get whether optimzed scrollnig is used.
 IOverlapStrategy getOverlapStrategy()
          Retrieve the used strategy for determing overlap information.
 double getPixelPerSecond()
          Return the pixel per second ratio.
 de.jaret.util.misc.Pair<TimeBarRow,de.jaret.util.date.JaretDate> getPopUpInformation()
          Retrieve the row and date of the click leading to the activation of a context menu.
 TimeBarNode getPpsRow()
          Retrieve the row that hold intervals (PpsIntervals) defining the pps value for different intervals.
 TBRect getRegionRect()
          Retrieve the selected region.
 boolean getRegionRectEnable()
          Retrieve whether region selections are enabled.
 java.util.List<IIntervalRelation> getRelationsForCoord(int x, int y)
          Retrieve the list of relations hit for a coordinate.
 java.lang.String getRelationTooltip(int x, int y)
          Provide the tooltip for a relation if any.
 TimeBarRow getRowForXY(int x, int y)
          Retrieve the row for a given point.
 TimeBarRow getRowForY(int y)
          Retrieve the row for a given y coodinate (x if oriented vertcal; use getRowForXY instead!).
 int getRowHeight()
          Retrieve the current row height or the default row height if variable row heights/widths are enabled.
 int getScrollLookBackMinutes()
          Retrieve the time to be additionally considered (looking back) when deciding which intervals are to be painted.
 int getScrollLookForwardMinutes()
          Retrieve the time to be additionally considered (looking forward) when deciding which intervals are to be painted.
 boolean getScrollOnFocus()
          Retrieve the state of the scroll to focus flag.
 int getSecondsDisplayed()
          Get the seconds currently displayed by the diagram.
 int getSelectionDelta()
          Retrieve the selection delta used to determine whether a marker or interval edge is clicked/dragged.
 TimeBarSelectionModel getSelectionModel()
          Get the selection model of the viewer.
 de.jaret.util.date.JaretDate getStartDate()
          Retrive the current start date of the displayed time span.
 boolean getStrictClipTimeCheck()
          Retrieve the strategy for filtering when painting (see setStrictClipTimeCheck(boolean)).
 TimeBarViewerInterface.Orientation getTBOrientation()
          Retrieve the orientation of the viewer.
 ITimeBarViewState getTimeBarViewState()
          Retrieve the statndard viewstate of the viewer containing the row heights/column widths.
 java.lang.String getTimeScaleToolTipText(int x, int y)
          Retrieve the tooltip for a position on the timescale.
 java.lang.String getTitle()
          Retrieve the title.
 java.lang.String getToolTipText()
          Return the tool tip text of the viewer.
 boolean getUseUniformHeight()
          Retrieve whether uniform height is use for all intervals in a row.
 int getWidth()
          Return the width of the viewer.
 int getXAxisHeight()
          Retrieve the height (or width when orientation is vertical) of the timescale.
 int getYAxisWidth()
          Retrieve the width of the y axis (header area).
 int getYForRow(TimeBarRow row)
          Retrieve the y coordinate in the diagram pane for the given row.
 boolean hasVariableXScale()
          Retrieve the state of the variable xscale state.
 boolean isAutoscrollEnabled()
          Get the autoscroll behaviour.
 boolean isDisplayed(de.jaret.util.date.JaretDate date)
          Check whether a date is currently visible.
 boolean isInDiagram(int x, int y)
          Check whether a given point is in the main diagram area.
 boolean isInHierarchySelectionArea(TimeBarNode node, int x, int y)
          Check whether the given position is in the selection area of the hierarchy.
 boolean isInRowAxis(int x, int y)
          Check whether a given point is in the row axis area (hierarchy or header).
 boolean isInToggleArea(TimeBarNode node, int x, int y)
          Check whether the given position should toggle expanded state of a node.
 boolean isLineDraggingAllowed()
          Check whether it is allowed to drag the limiting lines of the hierarchy ara and the header (yaxis) area.
 boolean isMilliAccuracy()
          Check whether th delegate is setup for millisecond accuracy.
 boolean isRowHeightDragginAllowed()
          Check whether row height dragging is allowed.
 void remFocussedIntervalListener(FocussedIntervalListener listener)
          Remove a focussedIntervalListener.
 void remIntervalModificator(IntervalModificator intervalModificator)
          Remove an interval modificator.
 void remMarker(TimeBarMarker marker)
          Remove a timebar marker.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a property change listener.
 void removeTimeBarChangeListener(ITimeBarChangeListener listener)
          Remove a timebar change listener.
 void remSelectionRectListener(ISelectionRectListener listener)
          Remove a selection rect listener.
 void repaint()
          Mark the whole viewer as dirty causing a repaint.
 void repaint(int x, int y, int width, int height)
          Mark area the needs repaint.
 void repaint(java.awt.Rectangle rect)
          Mark area to be repainted.
 boolean rowLineHit(int x, int y)
          Check whether a row delimiter line is hit by a coordinate.
 int scrollDateToVisible(de.jaret.util.date.JaretDate date)
          Scroll a date into the visible area of the viewer.
 void scrollIntervalToVisible(TimeBarRow row, de.jaret.util.date.Interval interval)
          Make sure the specified interval is in the visibe area of the viewer.
 void scrollRowToVisible(TimeBarRow row)
          Make sure the specified row is visible.
 void setAdjustMinMaxDatesByModel(boolean adjustMinMaxDatesByModel)
          Set the adjustment policy.
 void setAutoScaleRows(int rows)
          Set a number of rows (columns) to be displayed by the viewer.
 void setAutoscrollDelta(int autoscrollDelta)
          Set the autoscroll delta.
 void setAutoscrollEnabled(boolean enableAutoscroll)
          Set the autoscroll behaviour.
 void setCursor(int cursorType)
          Set the cursor type.
 void setDragAllSelectedIntervals(boolean dragAllSelectedIntervals)
          If set to true all selected intervals are dragged when an interval is dragged.
 void setDrawRowGrid(boolean drawRowGrid)
          Set the row grid drawing status.
 void setFirstRow(int firstRow, int pixOffset)
          Set the first row to be displayed.
 void setFirstRowDisplayed(int rowIdx)
          Set the first row to be displayed.
 void setFirstRowDisplayed(TimeBarRow row)
          Set the the first row to be displayed.
 void setFirstRowOffset(int offset)
          Set the pixeloffset of the first row.
 void setHideRoot(boolean hideRoot)
          Set whether the root node should be shown when using a hierachical model.
 void setHierarchicalViewState(HierarchicalViewState hierarchicalViewState)
          Set the hierarchical viewstate to be used.
 void setHierarchyWidth(int width)
          Set the width of the hierarchy area of the viewer.
 void setInitialDisplayRange(de.jaret.util.date.JaretDate startDate, int secondsDisplayed)
          Set a date range and scaling that will be set as the initial display right after the viewer is displayed.
 void setLastRow(int index)
          Set the last row in the viewer.
 void setLastRow(TimeBarRow row)
          Set the last row in the viewer.
 void setLineDraggingAllowed(boolean lineDraggingAllowed)
          Set the allowance for line dragging of the limiting lines for hierarchy and header(yaxis) areas.
 void setMarkerDraggingInDiagramArea(boolean allowed)
          Set whether marker dragging is allowed in the diagram area (If intervals are modificable the marker will only be grabbed when no other operation is applicable).
 void setMaxDate(de.jaret.util.date.JaretDate maxDate)
          Set the maximum date to be displayed.
 void setMilliAccuracy(boolean milliAccuracy)
          Set the delegates status concerning millisecond accuracy.
 void setMinDate(de.jaret.util.date.JaretDate minDate)
          Set the minimum date to be displayed.
 void setModel(HierarchicalTimeBarModel hModel)
          Set a hierarchical model to be displayed.
 void setModel(TimeBarModel model)
          Set the flat model to be displayed.
 void setName(java.lang.String name)
          Set a name as a simple string property for internal application use.
 void setOptimizeScrolling(boolean optimizeScrolling)
          Set whether optimized scrolling should be used.
 void setOverlapStrategy(IOverlapStrategy overlapStrategy)
          Set the strategy to be used for calculating overlap information.
 void setPixelPerSecond(double pixelPerSecond)
          Sets the scale ox the x axis as pixel per second, thus a value of 1000.0 / (24.0 * 60 * 60) will result in displaying one day over 1000 pixel.
 void setRegionRectEnable(boolean enabled)
          Enable/Disable region selections.
 void setRowHeight(int rowHeight)
          Set the height for the rows in pixel.
 void setRowHeightDraggingAllowed(boolean rowHeightDraggingAllowed)
          Set whether row height dragging should be allowed.
 void setScrollLookBackMinutes(int scrollLookBackMinutes)
          Set the additional time to be considered when deciding whether to draw an interval looking back.
 void setScrollLookForwardMinutes(int scrollLookForwardMinutes)
          Set the additional time to be considered when deciding whether to draw an interval looking forward.
 void setScrollOnFocus(boolean scrollOnFocus)
          If set to true the viewer will scroll to the begin of an interval if it's focussed.
 void setSecondsDisplayed(int seconds, boolean center)
          Set the scaling of the x axis by specifying the number of seconds that should be displayed.
 void setSecondsDisplayed(int seconds, de.jaret.util.date.JaretDate centerDate)
          Set the scaling of the x axis by specifying the number of seconds that should be displayed.
 void setSelectionDelta(int selectionDelta)
          Set the selection delta used to determine whether a marker or interval edge is clicked/dragged.
 void setSelectionModel(TimeBarSelectionModel selectionModel)
          Set the selectionmodel to be used by the viewer.
 void setStartDate(de.jaret.util.date.JaretDate startDate)
          Set the start date of the display.
 void setStrictClipTimeCheck(boolean strictClipTimeCheck)
          Set the optimization strategy for interval filtering when painting.
 void setTBOrientation(TimeBarViewerInterface.Orientation orientation)
          Set the orientation of the viewer.
 void setTitle(java.lang.String title)
          Set a title for the viewer to be displayed.
 void setUseUniformHeight(boolean useUniformHeight)
          Set whether all intervals in a non overlapping drawn row should use the same height/width.
 void setVariableXScale(boolean state)
          Set the state for the variable xscale.
 void setXAxisHeight(int height)
          Set the height (or width) of the timescale.
 void setYAxisWidth(int width)
          Set the width of the y axis (the header area).
 java.awt.Rectangle timeBarContainingRect(de.jaret.util.date.Interval interval, java.awt.Rectangle intervalRect, boolean overlappig)
          Calculate/get the containing rectangle of a rendered interval.
 boolean timeBarContains(de.jaret.util.date.Interval interval, java.awt.Rectangle intervalRect, int x, int y, boolean overlapping)
          Check whether a location is contained in a rendered interval.
 void updateXScrollBar(int max, int pos, int secondsDisplayed)
          Update the x scrollbar.
 void updateYScrollBar(int max, int pos, int rowsDisplayed)
          Update the y scrollbar.
 int xForDate(de.jaret.util.date.JaretDate date)
          Get the corresponding x coordinate in the viewer area for a given date.
 

Field Detail

TIMESCALE_POSITION_TOP

static final int TIMESCALE_POSITION_TOP
Constant value indicating the time scale should be drawn on top of the diagram.

See Also:
Constant Field Values

TIMESCALE_POSITION_BOTTOM

static final int TIMESCALE_POSITION_BOTTOM
Constant value indicating the time scale should be drawn at the bottom of the diagram.

See Also:
Constant Field Values

TIMESCALE_POSITION_NONE

static final int TIMESCALE_POSITION_NONE
Constant value indicating no time scale should be painted.

See Also:
Constant Field Values

DEFAULT_ROWHEIGHT

static final int DEFAULT_ROWHEIGHT
default for the rowheight.

See Also:
Constant Field Values

DEFAULT_XAXISHEIGHT

static final int DEFAULT_XAXISHEIGHT
default for the xaxis (timescale) height.

See Also:
Constant Field Values

DEFAULT_YAXISWIDTH

static final int DEFAULT_YAXISWIDTH
default for the yaxis width.

See Also:
Constant Field Values

PROPERTYNAME_STARTDATE

static final java.lang.String PROPERTYNAME_STARTDATE
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_FIRSTROW

static final java.lang.String PROPERTYNAME_FIRSTROW
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_FIRSTROWOFFSET

static final java.lang.String PROPERTYNAME_FIRSTROWOFFSET
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_ROWHEIGHT

static final java.lang.String PROPERTYNAME_ROWHEIGHT
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_XAXISHEIGHT

static final java.lang.String PROPERTYNAME_XAXISHEIGHT
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_YAXISWIDTH

static final java.lang.String PROPERTYNAME_YAXISWIDTH
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_ROWFILTER

static final java.lang.String PROPERTYNAME_ROWFILTER
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_ROWSORTER

static final java.lang.String PROPERTYNAME_ROWSORTER
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_INTERVALFILTER

static final java.lang.String PROPERTYNAME_INTERVALFILTER
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_MAXDATE

static final java.lang.String PROPERTYNAME_MAXDATE
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_MINDATE

static final java.lang.String PROPERTYNAME_MINDATE
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_PIXELPERSECOND

static final java.lang.String PROPERTYNAME_PIXELPERSECOND
property name constant of the bound property.

See Also:
Constant Field Values

PROPERTYNAME_ROWHEIGHTDRAGGINGALLOWED

static final java.lang.String PROPERTYNAME_ROWHEIGHTDRAGGINGALLOWED
property name constant of the bound property.

See Also:
Constant Field Values
Method Detail

getDelegate

TimeBarViewerDelegate getDelegate()
Retrieve the delegate ATTENTION: the delegate is for mostly internal usage only. The interface and behavior may change.

Returns:
the delegate used by the viewer.

updateXScrollBar

void updateXScrollBar(int max,
                      int pos,
                      int secondsDisplayed)
Update the x scrollbar.

Parameters:
max - max value for the scrollbar (seconds)
pos - current positions in seconds
secondsDisplayed - the number of seconds displayed by the viewer

updateYScrollBar

void updateYScrollBar(int max,
                      int pos,
                      int rowsDisplayed)
Update the y scrollbar.

Parameters:
max - max value for the scrollbar (row)
pos - first row displayed
rowsDisplayed - number of rows currently displayed

repaint

void repaint()
Mark the whole viewer as dirty causing a repaint.


repaint

void repaint(java.awt.Rectangle rect)
Mark area to be repainted.

Parameters:
rect - java.awt.Rectangle that needs to be repainted

repaint

void repaint(int x,
             int y,
             int width,
             int height)
Mark area the needs repaint.

Parameters:
x - x coordinate
y - y coordinate
width - width of the area
height - height of the area

getHeight

int getHeight()
Return the height of the viewer.

Returns:
height

getWidth

int getWidth()
Return the width of the viewer.

Returns:
width

dateForX

de.jaret.util.date.JaretDate dateForX(int x)
Get the corresponding date for an x coordinate in the viewer area.

Parameters:
x - in the viewer area
Returns:
corresponding date

dateForXY

de.jaret.util.date.JaretDate dateForXY(int x,
                                       int y)
Get the corresponding date for a point in the viewer area.

Parameters:
x - x coordinate in the viewer area
y - y coordinate in the viewer area
Returns:
corresponding date

xForDate

int xForDate(de.jaret.util.date.JaretDate date)
Get the corresponding x coordinate in the viewer area for a given date.

Parameters:
date - Date
Returns:
x coordinate in the viewer area

timeBarContains

boolean timeBarContains(de.jaret.util.date.Interval interval,
                        java.awt.Rectangle intervalRect,
                        int x,
                        int y,
                        boolean overlapping)
Check whether a location is contained in a rendered interval.

Parameters:
interval - Interval to be checked
intervalRect - bounding rect for the interval
x - location x
y - location y
overlapping - true if there are overlapping intervals and drawing mode is not drawOverlapped
Returns:
true if contained

timeBarContainingRect

java.awt.Rectangle timeBarContainingRect(de.jaret.util.date.Interval interval,
                                         java.awt.Rectangle intervalRect,
                                         boolean overlappig)
Calculate/get the containing rectangle of a rendered interval.

Parameters:
interval - Interval for which the containing rect should be calculated
intervalRect - Rectangle in the viewer (bounding rectangle)
overlappig - true if there are overlapping intervals and drawing mode is not drawOverlapped
Returns:
java.awt.Rectangle containing rectangle

setCursor

void setCursor(int cursorType)
Set the cursor type.

Parameters:
cursorType - java.awt.cursor type

getToolTipText

java.lang.String getToolTipText()
Return the tool tip text of the viewer.

Returns:
ToolTipText for the viewer

getIntervalToolTipText

java.lang.String getIntervalToolTipText(de.jaret.util.date.Interval interval,
                                        java.awt.Rectangle intervalRect,
                                        int x,
                                        int y)
Get the tooltip text for a given location in a rendered interval.

Parameters:
interval - Interval
intervalRect - bounding rectangle for the interval
x - location x
y - location y
Returns:
the tooltip text or null if none could be found

getRelationTooltip

java.lang.String getRelationTooltip(int x,
                                    int y)
Provide the tooltip for a relation if any.

Parameters:
x - x coordinate
y - y coordinate
Returns:
tooltip text or null

getPixelPerSecond

double getPixelPerSecond()
Return the pixel per second ratio.

Returns:
pixel per second

setPixelPerSecond

void setPixelPerSecond(double pixelPerSecond)
Sets the scale ox the x axis as pixel per second, thus a value of 1000.0 / (24.0 * 60 * 60) will result in displaying one day over 1000 pixel. The property is a bound property and can be listened to by a PropertyChangeListener.

Parameters:
pixelPerSecond - pixel per second.

setSecondsDisplayed

void setSecondsDisplayed(int seconds,
                         boolean center)
Set the scaling of the x axis by specifying the number of seconds that should be displayed.

Parameters:
seconds - number of seconds that will be displayed on the x axis
center - if set to true the center date will be fixed while scaling

setSecondsDisplayed

void setSecondsDisplayed(int seconds,
                         de.jaret.util.date.JaretDate centerDate)
Set the scaling of the x axis by specifying the number of seconds that should be displayed.

Parameters:
seconds - number of seconds that will be displayed on the x axis
centerDate - date that will be fixed while scaling

getRowHeight

int getRowHeight()
Retrieve the current row height or the default row height if variable row heights/widths are enabled.

Returns:
row height in pixel

setRowHeight

void setRowHeight(int rowHeight)
Set the height for the rows in pixel. This property is bound.

Parameters:
rowHeight - new row height

getStartDate

de.jaret.util.date.JaretDate getStartDate()
Retrive the current start date of the displayed time span.

Returns:
start date of the visual section

setStartDate

void setStartDate(de.jaret.util.date.JaretDate startDate)
Set the start date of the display.

Parameters:
startDate - first date to be displayed

getMinDate

de.jaret.util.date.JaretDate getMinDate()
Retrieve the minimum value present in the data of the viewer.

Returns:
minimum date that can be displayed

setMinDate

void setMinDate(de.jaret.util.date.JaretDate minDate)
Set the minimum date to be displayed. Note: this will only have an effect if min/max is not adjusted by the model.

Parameters:
minDate - minimum date to be displayed

getMaxDate

de.jaret.util.date.JaretDate getMaxDate()
Retrieve the maximum date that can be displayed.

Returns:
maximum date that can be displayed

setMaxDate

void setMaxDate(de.jaret.util.date.JaretDate maxDate)
Set the maximum date to be displayed. Note: this will only have an effect if min/max is not adjusted by the model.

Parameters:
maxDate - maximum date to be displayed

getAdjustMinMaxDatesByModel

boolean getAdjustMinMaxDatesByModel()
Retrieve the adjustment policy for min and max date.

Returns:
true if min/max are adjusted by the model

setAdjustMinMaxDatesByModel

void setAdjustMinMaxDatesByModel(boolean adjustMinMaxDatesByModel)
Set the adjustment policy.

Parameters:
adjustMinMaxDatesByModel - if set to true min and max dates are set by the model

getFirstRowDisplayed

int getFirstRowDisplayed()
Retrieve the index of the first row that is displayed.

Returns:
index of the first displayed row

setFirstRow

void setFirstRow(int firstRow,
                 int pixOffset)
Set the first row to be displayed.

Parameters:
firstRow - upmost row to be displayed
pixOffset - pixel offset

setFirstRowDisplayed

void setFirstRowDisplayed(int rowIdx)
Set the first row to be displayed.

Parameters:
rowIdx - index of the first row to be displayed

setFirstRowDisplayed

void setFirstRowDisplayed(TimeBarRow row)
Set the the first row to be displayed.

Parameters:
row - row that should be the topmost row displayed.

getFirstRowOffset

int getFirstRowOffset()
Retrieve the pixeloffset for the first row.

Returns:
pixel offset of the first row

setFirstRowOffset

void setFirstRowOffset(int offset)
Set the pixeloffset of the first row.

Parameters:
offset - pixeloffset for the first row

setLastRow

void setLastRow(int index)
Set the last row in the viewer. If there are not enough rows for the row beeing the last row the row will be displayed as far down as possible by setting the first row to 0.

Parameters:
index - index of the row to be displayed at the bottom of the viewer.

setLastRow

void setLastRow(TimeBarRow row)
Set the last row in the viewer. If there are not enough rows for the row beeing the last row the row will be displayed as far down as possible by setting the first row to 0.

Parameters:
row - the row to be displayed at the bottom of the viewer.

getSelectionModel

TimeBarSelectionModel getSelectionModel()
Get the selection model of the viewer.

Returns:
the selection model of the viewer

setSelectionModel

void setSelectionModel(TimeBarSelectionModel selectionModel)
Set the selectionmodel to be used by the viewer.

Parameters:
selectionModel - selection model to be used

setYAxisWidth

void setYAxisWidth(int width)
Set the width of the y axis (the header area). The width is initialized with the width announced by the header renderer.

Parameters:
width - width in pixel

getYAxisWidth

int getYAxisWidth()
Retrieve the width of the y axis (header area).

Returns:
width of the header area

setHierarchyWidth

void setHierarchyWidth(int width)
Set the width of the hierarchy area of the viewer. The width is initialized by the hierarchy renderer if set and applicable.

Parameters:
width - width in pixels

getHierarchyWidth

int getHierarchyWidth()
Retrieve the width of the hierarchy area.

Returns:
the width of the hierarchy area

getXAxisHeight

int getXAxisHeight()
Retrieve the height (or width when orientation is vertical) of the timescale.

Returns:
returns the xAxisHeight.

setXAxisHeight

void setXAxisHeight(int height)
Set the height (or width) of the timescale.

Parameters:
height - height or width for the time scale

setAutoscrollEnabled

void setAutoscrollEnabled(boolean enableAutoscroll)
Set the autoscroll behaviour. If autoscroll is enabled, drag and select by selection rect will autoscroll the viewer.

Parameters:
enableAutoscroll - true for enabling autoscroll

isAutoscrollEnabled

boolean isAutoscrollEnabled()
Get the autoscroll behaviour.

Returns:
true if autoscroll is enabled.

getDrawRowGrid

boolean getDrawRowGrid()
Retrieve the status of row grid drawing.

Returns:
true if the row grid drawing is enabled

setDrawRowGrid

void setDrawRowGrid(boolean drawRowGrid)
Set the row grid drawing status. If set to true rows will be separated by lines.

Parameters:
drawRowGrid - if true, rows will be separated by a thin line

addIntervalModificator

void addIntervalModificator(IntervalModificator intervalModificator)
Add an intervalModificator controlling changes on the intervals.

Parameters:
intervalModificator - interval modificator to add

remIntervalModificator

void remIntervalModificator(IntervalModificator intervalModificator)
Remove an interval modificator.

Parameters:
intervalModificator - interval modificator to remove

firePropertyChange

void firePropertyChange(java.lang.String string,
                        double oldValue,
                        double newValue)
Fire a property change.

Parameters:
string - property name
oldValue - old value
newValue - new value

firePropertyChangeX

void firePropertyChangeX(java.lang.String propName,
                         java.lang.Object oldValue,
                         java.lang.Object newValue)
Fire a property change.

Parameters:
propName - property name
oldValue - old value
newValue - new value

addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener.

Parameters:
listener - property change listener to add

removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener.

Parameters:
listener - listener to remove

getTimeScaleToolTipText

java.lang.String getTimeScaleToolTipText(int x,
                                         int y)
Retrieve the tooltip for a position on the timescale.

Parameters:
x - x coordinate
y - y coordinate
Returns:
the tooltip text or null indicating no tt is available

getHeaderToolTipText

java.lang.String getHeaderToolTipText(TimeBarRow row,
                                      int x,
                                      int y)
Retrieve the tooltip for a position on a row.

Parameters:
row - row displayed on the location
x - x coordinate
y - y coordinate
Returns:
the tooltip text or null indicating no tt is available

getHierarchyToolTipText

java.lang.String getHierarchyToolTipText(TimeBarNode node,
                                         int x,
                                         int y)
Retrieve the tooltip for a position in the hierarchy.

Parameters:
node - node displayed at the location
x - x coordinate
y - y coordinate
Returns:
the tooltip text or null indicating no tt is available

getTimeBarViewState

ITimeBarViewState getTimeBarViewState()
Retrieve the statndard viewstate of the viewer containing the row heights/column widths.

Returns:
the viewstate used by the viewer

getHierarchicalViewState

HierarchicalViewState getHierarchicalViewState()
Retrieve the hierarchical viewstate used by the viewer.

Returns:
the hierarchical viewstate

setHierarchicalViewState

void setHierarchicalViewState(HierarchicalViewState hierarchicalViewState)
Set the hierarchical viewstate to be used. Most probably no one needs to do this, since a default viewstate is used when setting a hierarchical model.

Parameters:
hierarchicalViewState - viewstate to use

setModel

void setModel(TimeBarModel model)
Set the flat model to be displayed.

Parameters:
model - the model to be displyed

setModel

void setModel(HierarchicalTimeBarModel hModel)
Set a hierarchical model to be displayed.

Parameters:
hModel - hierarchial model

getModel

TimeBarModel getModel()
Retrieve the flat model used by the viewer. This will always return a flat model, even if a hierarchical model has been set. In this case the warpping flat model is returned.

Returns:
the flat model used by the viewer

getHierarchicalModel

HierarchicalTimeBarModel getHierarchicalModel()
Retrieve the hierarchical model of the viewer. This may be null if a flat model has been set directly.

Returns:
the hierarchical model or null

getMarkerWidth

int getMarkerWidth(TimeBarMarker marker)
Get the width for marker painting (as requested by a marker renderer).

Parameters:
marker - marker to check the width for
Returns:
overall width for marker painting

setTitle

void setTitle(java.lang.String title)
Set a title for the viewer to be displayed.

Parameters:
title - or null indicating no title.

getTitle

java.lang.String getTitle()
Retrieve the title.

Returns:
the title.

displayBodyContextMenu

void displayBodyContextMenu(int x,
                            int y)
Display the context menu for the normal viewer body.

Parameters:
x - x coordinate for the menu
y - y coordinate for the menu

displayTimeScaleContextMenu

void displayTimeScaleContextMenu(int x,
                                 int y)
Display the context menu for the time scale.

Parameters:
x - x coordinate for the menu
y - y coordinate for the menu

displayIntervalContextMenu

void displayIntervalContextMenu(de.jaret.util.date.Interval interval,
                                int x,
                                int y)
Display the context menu for an interval.

Parameters:
interval - interval clicked on
x - x coordinate for the menu
y - y coordinate for the menu

displayHeaderContextMenu

void displayHeaderContextMenu(TimeBarRow row,
                              int x,
                              int y)
Display the header context menu.

Parameters:
row - row clicked on
x - x coordinate for the menu
y - y coordinate for the menu

displayHierarchyContextMenu

void displayHierarchyContextMenu(TimeBarRow row,
                                 int x,
                                 int y)
Display the hierarchy area context menu.

Parameters:
row - row clicked on
x - x coordinate for the menu
y - y coordinate for the menu

displayTitleContextMenu

void displayTitleContextMenu(int x,
                             int y)
Display the title area context menu.

Parameters:
x - x coordinate for the menu
y - y coordinate for the menu

isInToggleArea

boolean isInToggleArea(TimeBarNode node,
                       int x,
                       int y)
Check whether the given position should toggle expanded state of a node.

Parameters:
node - the node rendered
x - x coordinate
y - y coordinate
Returns:
true if toggling should occur

isInHierarchySelectionArea

boolean isInHierarchySelectionArea(TimeBarNode node,
                                   int x,
                                   int y)
Check whether the given position is in the selection area of the hierarchy.

Parameters:
node - the node
x - x coordinate
y - y coordinate
Returns:
true if the coordniate is in the hierarchy area

addMarker

void addMarker(TimeBarMarker marker)
Add a timebar marker.

Parameters:
marker - marker to add

remMarker

void remMarker(TimeBarMarker marker)
Remove a timebar marker.

Parameters:
marker - marker to remove

getMarkers

java.util.List<TimeBarMarker> getMarkers()
Retrieve the list of al markers.

Returns:
List of all added timebar markers

addMarkers

void addMarkers(java.util.List<TimeBarMarker> markers)
Directly set a list of markers.

Parameters:
markers - list of timebar markers

getSelectionDelta

int getSelectionDelta()
Retrieve the selection delta used to determine whether a marker or interval edge is clicked/dragged.

Returns:
max distance for detection

setSelectionDelta

void setSelectionDelta(int selectionDelta)
Set the selection delta used to determine whether a marker or interval edge is clicked/dragged. A larger selection delta will result in easier selection of of interval bounds and other in place draggable elements but may cause problems when draggable elements are near to each other since more elements are in range and the selected element will be determined by the sequence of checks in the code of the viewer.

A selection delta of n means clicks willl have to be on the element or (n-1) pixels away to consider an element hit.

Parameters:
selectionDelta - max distance for detection

isLineDraggingAllowed

boolean isLineDraggingAllowed()
Check whether it is allowed to drag the limiting lines of the hierarchy ara and the header (yaxis) area.

Returns:
true if dragging is allowed.

setLineDraggingAllowed

void setLineDraggingAllowed(boolean lineDraggingAllowed)
Set the allowance for line dragging of the limiting lines for hierarchy and header(yaxis) areas.

Parameters:
lineDraggingAllowed - true for enabling the drag possibility

isRowHeightDragginAllowed

boolean isRowHeightDragginAllowed()
Check whether row height dragging is allowed.

Returns:
true if enabled

setRowHeightDraggingAllowed

void setRowHeightDraggingAllowed(boolean rowHeightDraggingAllowed)
Set whether row height dragging should be allowed.

Parameters:
rowHeightDraggingAllowed - true to allow interactive dragging of row heights

getMarkerDraggingInDiagramArea

boolean getMarkerDraggingInDiagramArea()
Retrieve whether marker dragging in the diagram area is activated.

Returns:
true if marker dragging in the diagram area is allowed

setMarkerDraggingInDiagramArea

void setMarkerDraggingInDiagramArea(boolean allowed)
Set whether marker dragging is allowed in the diagram area (If intervals are modificable the marker will only be grabbed when no other operation is applicable).

Parameters:
allowed - true for allowing marker drag in the diagram area.

getYForRow

int getYForRow(TimeBarRow row)
Retrieve the y coordinate in the diagram pane for the given row.

Parameters:
row - row
Returns:
y coordinate in the diagram pane or -1 if the y coordinate could not be retrieved

getRowForY

TimeBarRow getRowForY(int y)
Retrieve the row for a given y coodinate (x if oriented vertcal; use getRowForXY instead!).

Parameters:
y - coordinate
Returns:
row or null

getRowForXY

TimeBarRow getRowForXY(int x,
                       int y)
Retrieve the row for a given point.

Parameters:
x - x coordinate
y - y coordinate
Returns:
row or null

isMilliAccuracy

boolean isMilliAccuracy()
Check whether th delegate is setup for millisecond accuracy. This will only have an impact on the x scroll bar.

Returns:
true if ms accuracy ist set

setMilliAccuracy

void setMilliAccuracy(boolean milliAccuracy)
Set the delegates status concerning millisecond accuracy. If set to true the x scroll bar will operate in milliseconds (normal operation: seconds).

Parameters:
milliAccuracy - true to use ms accuracy

hasVariableXScale

boolean hasVariableXScale()
Retrieve the state of the variable xscale state. If true a list of intervals contlrols different pps values for different intervals on the axis.

Returns:
true if a varying pps value is used

setVariableXScale

void setVariableXScale(boolean state)
Set the state for the variable xscale.

Parameters:
state - true if a variable scale should be used.

getPpsRow

TimeBarNode getPpsRow()
Retrieve the row that hold intervals (PpsIntervals) defining the pps value for different intervals.

Returns:
the row or null if no variable xscale has been defined.

doScrollHorizontal

void doScrollHorizontal(int diff)
Do horizontal scrolling by diff pixel. The method ought to copy the content of the diagramRect and produce dirty regions for the parts not affected by the scroll. The method is intended to be used by the TimeBarViewerDelegate only.

Parameters:
diff - pixel difference (positive for right scroll)

doScrollVertical

void doScrollVertical(int diff)
Do vertical scrolling by diff pixel. The method ought to copy the content of the diagramRect and produce dirty regions for the parts not affected by the scroll. The method is intended to be used by the TimeBarViewerDelegate only.

Parameters:
diff - pixel difference (positive for downwards scroll)

getOptimizeScrolling

boolean getOptimizeScrolling()
Get whether optimzed scrollnig is used.

Returns:
true if optimized scrolling is used

setOptimizeScrolling

void setOptimizeScrolling(boolean optimizeScrolling)
Set whether optimized scrolling should be used. The default is false since this may cause problems on some platforms using SWT (Linux/GTK and OSX/intel). Optimized scrolling can not be used together with a variable xscale.

Parameters:
optimizeScrolling - true for optimized scrolling

getTBOrientation

TimeBarViewerInterface.Orientation getTBOrientation()
Retrieve the orientation of the viewer.

Returns:
the orientation of the viewer

setTBOrientation

void setTBOrientation(TimeBarViewerInterface.Orientation orientation)
Set the orientation of the viewer.

Parameters:
orientation - the new orientation for the viewer

getAutoScaleRows

int getAutoScaleRows()
Get the number of rows (columns) that the viewer scales itself to.

Returns:
number of rows to display or -1 if no scale has been set

setAutoScaleRows

void setAutoScaleRows(int rows)
Set a number of rows (columns) to be displayed by the viewer. The row height will always be changed to math the number of rows to display.

Parameters:
rows - the number of rows or -1 for no special scaling (default)

fireSelectionChanged

void fireSelectionChanged()
Called by the delegate whenever the selection changed (to support selction provider under SWT).


addTimeBarChangeListener

void addTimeBarChangeListener(ITimeBarChangeListener listener)
Add a listener to be informaed about interval changes.

Parameters:
listener - listener

removeTimeBarChangeListener

void removeTimeBarChangeListener(ITimeBarChangeListener listener)
Remove a timebar change listener.

Parameters:
listener - listener to remove

addFocussedIntervalListener

void addFocussedIntervalListener(FocussedIntervalListener listener)
Add a listener to be informed when the focus inside the viewer changes.

Parameters:
listener - listener to be added.

remFocussedIntervalListener

void remFocussedIntervalListener(FocussedIntervalListener listener)
Remove a focussedIntervalListener.

Parameters:
listener - listener to be removed from the listener list.

addSelectionRectListener

void addSelectionRectListener(ISelectionRectListener listener)
Add a listener to be informed when the selection rect changes.

Parameters:
listener - listener to be added.

remSelectionRectListener

void remSelectionRectListener(ISelectionRectListener listener)
Remove a selection rect listener.

Parameters:
listener - listener to be removed from the listener list.

rowLineHit

boolean rowLineHit(int x,
                   int y)
Check whether a row delimiter line is hit by a coordinate.

Parameters:
x - x coord
y - y coord
Returns:
true if a row line is hit

isInRowAxis

boolean isInRowAxis(int x,
                    int y)
Check whether a given point is in the row axis area (hierarchy or header).

Parameters:
x - x coordinate
y - y coordinate
Returns:
true if the point is in either hierarchy or header area

isInDiagram

boolean isInDiagram(int x,
                    int y)
Check whether a given point is in the main diagram area.

Parameters:
x - x coordinate
y - y coordinate
Returns:
true if the point is in the diagram rectangle

isDisplayed

boolean isDisplayed(de.jaret.util.date.JaretDate date)
Check whether a date is currently visible.

Parameters:
date - dat eto check
Returns:
true if the date is currently displayed

getStrictClipTimeCheck

boolean getStrictClipTimeCheck()
Retrieve the strategy for filtering when painting (see setStrictClipTimeCheck(boolean)).

Returns:
true if strict checking is enabled

setStrictClipTimeCheck

void setStrictClipTimeCheck(boolean strictClipTimeCheck)
Set the optimization strategy for interval filtering when painting.

Parameters:
strictClipTimeCheck - If set to true, intervals are filtered strictly by their interval bounds, disallowing rendering beyond the bounding box calculated by the interval bounds. Defaults to false resulting in filtering by the preferred drawing area.

getScrollLookBackMinutes

int getScrollLookBackMinutes()
Retrieve the time to be additionally considered (looking back) when deciding which intervals are to be painted. Only taken into accoutn when StrictClipTimeCheck is false. Default is 120 Minutes.

Returns:
time in minutes

setScrollLookBackMinutes

void setScrollLookBackMinutes(int scrollLookBackMinutes)
Set the additional time to be considered when deciding whether to draw an interval looking back. Only taken into account when StrictClipTimeCheck is true.

Parameters:
scrollLookBackMinutes - time in minutes

getScrollLookForwardMinutes

int getScrollLookForwardMinutes()
Retrieve the time to be additionally considered (looking forward) when deciding which intervals are to be painted. Only taken into account when StrictClipTimeCheck is true.

Returns:
time in mnutes

setScrollLookForwardMinutes

void setScrollLookForwardMinutes(int scrollLookForwardMinutes)
Set the additional time to be considered when deciding whether to draw an interval looking forward. Only taken into account when StrictClipTimeCheck is true.

Parameters:
scrollLookForwardMinutes - time in minutes

getSecondsDisplayed

int getSecondsDisplayed()
Get the seconds currently displayed by the diagram.

Returns:
the number of seconds currently displayed by the diagram geometry

getOverlapStrategy

IOverlapStrategy getOverlapStrategy()
Retrieve the used strategy for determing overlap information.

Returns:
the overlap strategy

setOverlapStrategy

void setOverlapStrategy(IOverlapStrategy overlapStrategy)
Set the strategy to be used for calculating overlap information.

Parameters:
overlapStrategy - the strytegy to be used. May not be null.

getName

java.lang.String getName()
Retrieve the name set on the viewer.

Returns:
the name or null if no name has been set

setName

void setName(java.lang.String name)
Set a name as a simple string property for internal application use.

Parameters:
name - name of the viewer

getAutoscrollDelta

int getAutoscrollDelta()
Retrieve the currently set autoscroll delta.

Returns:
the autoscroll delat in pixel

setAutoscrollDelta

void setAutoscrollDelta(int autoscrollDelta)
Set the autoscroll delta. This value will be used to deteremine the autoscroll deltas when the mouse pointer is not in the diagram rectangle. It is specified in pixel so it is always relative to the timescale. The value will also be used to limit the maximum delta when resizing an interval (edge dragging) with the cursor outside the diagram rectangle.

Parameters:
autoscrollDelta - delta in pixel

getDragAllSelectedIntervals

boolean getDragAllSelectedIntervals()
If true all selected intervals will be dragged together with the interval on that the drag happened.

Returns:
the state of the flag

setDragAllSelectedIntervals

void setDragAllSelectedIntervals(boolean dragAllSelectedIntervals)
If set to true all selected intervals are dragged when an interval is dragged. The default is false.

Parameters:
dragAllSelectedIntervals - true to drag all selcted intervals

getRelationsForCoord

java.util.List<IIntervalRelation> getRelationsForCoord(int x,
                                                       int y)
Retrieve the list of relations hit for a coordinate. This method is in the interface to allow tookit independent implementation of the relation select mechanism.

Parameters:
x - x coordinate
y - y coordinate
Returns:
the list of relations or null if no relations can be found

getScrollOnFocus

boolean getScrollOnFocus()
Retrieve the state of the scroll to focus flag.

Returns:
true if the viewer should scroll to the focussed interval

setScrollOnFocus

void setScrollOnFocus(boolean scrollOnFocus)
If set to true the viewer will scroll to the begin of an interval if it's focussed.

Parameters:
scrollOnFocus - true for scrolling to the focussed interval

getHideRoot

boolean getHideRoot()
Retrieve whether the root node is shown when using a hierachical model.

Returns:
true if the root is not shown

setHideRoot

void setHideRoot(boolean hideRoot)
Set whether the root node should be shown when using a hierachical model.

Parameters:
hideRoot - true if the root node should be hidden

getRegionRect

TBRect getRegionRect()
Retrieve the selected region.

Returns:
the selected region or null

clearRegionRect

void clearRegionRect()
Remove the selction of a region if existent.


setRegionRectEnable

void setRegionRectEnable(boolean enabled)
Enable/Disable region selections.

Parameters:
enabled - true enabling

getRegionRectEnable

boolean getRegionRectEnable()
Retrieve whether region selections are enabled.

Returns:
true if region selections are enabled

setUseUniformHeight

void setUseUniformHeight(boolean useUniformHeight)
Set whether all intervals in a non overlapping drawn row should use the same height/width.

Parameters:
useUniformHeight - true for uniform heights/widths

getUseUniformHeight

boolean getUseUniformHeight()
Retrieve whether uniform height is use for all intervals in a row.

Returns:
true if all intervals in a non overlapping drawn row should use the same height/width

setInitialDisplayRange

void setInitialDisplayRange(de.jaret.util.date.JaretDate startDate,
                            int secondsDisplayed)
Set a date range and scaling that will be set as the initial display right after the viewer is displayed.

Parameters:
startDate - start date
secondsDisplayed - seconds to be displayed in the viewer

getPopUpInformation

de.jaret.util.misc.Pair<TimeBarRow,de.jaret.util.date.JaretDate> getPopUpInformation()
Retrieve the row and date of the click leading to the activation of a context menu.

Returns:
Pair containing the row and date of the click position. Might be null if no click has been recorded.

scrollDateToVisible

int scrollDateToVisible(de.jaret.util.date.JaretDate date)
Scroll a date into the visible area of the viewer.

Parameters:
date - date to be shown.
Returns:
the number of seconds the start date have been modified

scrollRowToVisible

void scrollRowToVisible(TimeBarRow row)
Make sure the specified row is visible.

Parameters:
row - TimeBarRow to be in the visible area.

scrollIntervalToVisible

void scrollIntervalToVisible(TimeBarRow row,
                             de.jaret.util.date.Interval interval)
Make sure the specified interval is in the visibe area of the viewer. If the interval does not fit in the visible area, the beginning of the interval will be displayed.

Parameters:
row - TimeBarRow of the interval
interval - inteval.


Copyright © 2012. All Rights Reserved.