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

java.lang.Object
  extended by de.jaret.util.ui.timebars.swt.renderer.RendererBase
      extended by de.jaret.util.ui.timebars.swt.renderer.DefaultGapRenderer
All Implemented Interfaces:
TimeBarGapRenderer

public class DefaultGapRenderer
extends RendererBase
implements TimeBarGapRenderer

Gap renderer rendering a double headed arrow and the time between the intervals.

Version:
$Id: DefaultGapRenderer.java 781 2008-09-20 20:10:18Z kliem $
Author:
Peter Kliem

Field Summary
 
Fields inherited from class de.jaret.util.ui.timebars.swt.renderer.RendererBase
_printer, _scaleX, _scaleY
 
Constructor Summary
DefaultGapRenderer()
          Default constructor.
DefaultGapRenderer(org.eclipse.swt.printing.Printer printer)
          Construct a DefaultGapRanderer for a printer.
 
Method Summary
 TimeBarGapRenderer createPrintRenderer(org.eclipse.swt.printing.Printer printer)
          Create a similar renderer for printing.
 void dispose()
          Dispose any resources.
 void draw(org.eclipse.swt.graphics.GC gc, TimeBarViewerDelegate delegate, TimeBarRow row, de.jaret.util.date.Interval i1, de.jaret.util.date.Interval i2, org.eclipse.swt.graphics.Rectangle drawingArea, boolean printing)
          Draw the gap decorator.
 
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
 

Constructor Detail

DefaultGapRenderer

public DefaultGapRenderer(org.eclipse.swt.printing.Printer printer)
Construct a DefaultGapRanderer for a printer.

Parameters:
printer - printer device to use

DefaultGapRenderer

public DefaultGapRenderer()
Default constructor.

Method Detail

draw

public void draw(org.eclipse.swt.graphics.GC gc,
                 TimeBarViewerDelegate delegate,
                 TimeBarRow row,
                 de.jaret.util.date.Interval i1,
                 de.jaret.util.date.Interval i2,
                 org.eclipse.swt.graphics.Rectangle drawingArea,
                 boolean printing)
Draw the gap decorator.

Specified by:
draw in interface TimeBarGapRenderer
Parameters:
gc - GC to use
delegate - TimeBarViewerDelaget
row - row in which the intervals are located
i1 - left interval (may be null)
i2 - right interval (may be null)
drawingArea - drawing area in beetween the intervals
printing - flag indicating that the drawing is don efor a printer

dispose

public void dispose()
Dispose any resources.

Specified by:
dispose in interface TimeBarGapRenderer

createPrintRenderer

public TimeBarGapRenderer createPrintRenderer(org.eclipse.swt.printing.Printer printer)
Create a similar renderer for printing. The creation should copy settings made to the producing renderer.

Specified by:
createPrintRenderer in interface TimeBarGapRenderer
Parameters:
printer - Printer device
Returns:
a configured renderer for printing.


Copyright © 2012. All Rights Reserved.