This package contains a suite of classes and interfaces to define and display a model of intervals over a discrete set of rows. There are two concrete implementations of the viewer in the appropiate packages for Swing and SWT. They are designed to be as interchangeable as possible and do both base on a delegate that encapsulates most of the functionality. In cases where GUI specific classes are needed in generalized code (i.e. Rectangle, Color) the swing implementations have been preferred since the usage of the swing version should not need the swt library jars.

The TimeBarViewer is the viewer for a TimeBarModel. It displays rows of intervals over a time scale. The displayed rows may be sorted by a TimeBarRowSorter and filtered by a TimeBarRowFilter without affecting the model itself. The displayed intervals can be filtered by a TimeBarIntervalFilter.

Selections can be done for intervals and/or rows. This is controlled and distributed by a TimeBarSelectionModel.

The row header has to be a PropertyObservable. A simple row header implementation is supplied with the DefaultRowHeader.

Rendering in the Swing version: Rendering of the row headers is done by a JComponent supplied by a TimeBarRenderer. A default row header renderer using a JLabel is supplied (DefaultTimeBarHeaderRenderer). The intervals itself are rendered by a TimeBarRenderer. A default renderer using a JButton for rendering is supplied (DefaultTimeBarRenderer). The time scale (x axis) is rendered by the JComponent supplied by a TimeScaleRenderer. A simple default time scale renderer is supplied with the DefaultTimeScaleRenderer. For some application it is useful to display information in between two intervals. For those situations a TimeBarGapRenderer can be used.

Rendering in the SWT version: Rendering in the SWT version is done by renderers like in the swing version. The basic difference is, that there are no components (in SWT the term "widget" would be appropriate) used. The renderers will do their painting job directly. Default renderes are supplied in the package de.jaret.util.ui.timebars.sw.renderer.

As a useful utility class the TimeBarViewerSynchronizer synchronizes a set of TableBarViewers on certain aspects.

(c) 2004 Peter Kliem