de.jaret.util.ui.timebars.swt.renderer
Class AbstractTimeBarRenderer

java.lang.Object
  extended by de.jaret.util.ui.timebars.swt.renderer.RendererBase
      extended by de.jaret.util.ui.timebars.swt.renderer.AbstractTimeBarRenderer
All Implemented Interfaces:
TimeBarRenderer, TimeBarRenderer2
Direct Known Subclasses:
DefaultRenderer

public abstract class AbstractTimeBarRenderer
extends RendererBase
implements TimeBarRenderer, TimeBarRenderer2

Abstract base class for TimeBarRenderers.

Version:
$Id: AbstractTimeBarRenderer.java 800 2008-12-27 22:27:33Z kliem $
Author:
kliem

Field Summary
 
Fields inherited from class de.jaret.util.ui.timebars.swt.renderer.RendererBase
_printer, _scaleX, _scaleY
 
Constructor Summary
AbstractTimeBarRenderer(org.eclipse.swt.printing.Printer printer)
          Construct the base for a printer.
 
Method Summary
 org.eclipse.swt.graphics.Rectangle getPreferredDrawingBounds(org.eclipse.swt.graphics.Rectangle intervalDrawingArea, TimeBarViewerDelegate delegate, de.jaret.util.date.Interval interval, boolean selected, boolean printing, boolean overlap)
          Retrieve the preferred drawing bounds for a specific interval.
 
Methods inherited from class de.jaret.util.ui.timebars.swt.renderer.RendererBase
drawFocus, getDefaultLineWidth, getPrinter, getScaleX, getScaleY, scaleX, scaleY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.jaret.util.ui.timebars.swt.renderer.TimeBarRenderer
contains, createPrintrenderer, dispose, draw, getContainingRectangle, getToolTipText
 
Methods inherited from interface de.jaret.util.ui.timebars.swt.renderer.TimeBarRenderer2
contains, createPrintrenderer, dispose, draw, getContainingRectangle, getToolTipText
 

Constructor Detail

AbstractTimeBarRenderer

public AbstractTimeBarRenderer(org.eclipse.swt.printing.Printer printer)
Construct the base for a printer.

Parameters:
printer - printer
Method Detail

getPreferredDrawingBounds

public org.eclipse.swt.graphics.Rectangle getPreferredDrawingBounds(org.eclipse.swt.graphics.Rectangle intervalDrawingArea,
                                                                    TimeBarViewerDelegate delegate,
                                                                    de.jaret.util.date.Interval interval,
                                                                    boolean selected,
                                                                    boolean printing,
                                                                    boolean overlap)
Retrieve the preferred drawing bounds for a specific interval. Default implementation simply returns the intervalDrawingArea.

Specified by:
getPreferredDrawingBounds in interface TimeBarRenderer2
Parameters:
intervalDrawingArea - the rectangle to render the interval in.
delegate - the viewer delegate
interval - the interval to be rendered
selected - true if the interval is selected
printing - true if rendering is done for a prinetr
overlap - true if the interval is drawn as one of several intervals that overlap while beeing drawn.
Returns:
the bounding rectangle that the renderer will paint in when rendering


Copyright © 2012. All Rights Reserved.