de.jaret.util.ui.timebars.swing.renderer
Interface TimeBarGapRenderer
- All Known Implementing Classes:
- DefaultGapRenderer
public interface TimeBarGapRenderer
Interface for supplying a JComponent for rendering the gaps between two intervals. The supplied JComponent should be
reused and only be set up for rendering a single gap. Setup is done by the TimeBarViewer
. Since in some
situations the gap betwwen two intervals is very small (or non-existent) it is possible to enforce a minimum width
for the clipping rect and size for the gap rendering component.
- Version:
- $Id: TimeBarGapRenderer.java 800 2008-12-27 22:27:33Z kliem $
- Author:
- Peter Kliem
getTimeBarGapRendererComponent
javax.swing.JComponent getTimeBarGapRendererComponent(TimeBarViewer tbv,
TimeBarRow row,
de.jaret.util.date.Interval interval1,
de.jaret.util.date.Interval interval2)
- Parameters:
tbv
- the calling TimeBarViewerrow
- the row the intervals are ininterval1
- left interval (may be null if the gap is the starting "gap")interval2
- right interval (may be null
if it is the ending "gap")
- Returns:
- a configured JComponent for rendering
getMinimumWidth
int getMinimumWidth()
- By returning a non negative value a minimum width will be given to the renderer. The size and clipping rect will
be centered around the middle of the gap between the two intervals.
- Returns:
- minimum width for the rendering component. A negative value indicates no need for a fixed minimum width
Copyright © 2012. All Rights Reserved.