de.jaret.util.ui.timebars.swt.renderer
Interface HeaderRenderer

All Known Implementing Classes:
DefaultHeaderRenderer

public interface HeaderRenderer

This interface describes a renderer used to render the header of a row.

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

Method Summary
 boolean contains(org.eclipse.swt.graphics.Rectangle drawingArea, int x, int y)
          Check whether a position in the header should be active for selecting.
 HeaderRenderer createPrintRenderer(org.eclipse.swt.printing.Printer printer)
          Create a similar renderer for printing.
 void dispose()
          Dispose the renderer.
 void draw(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle drawingArea, TimeBarViewerDelegate delegate, TimeBarRowHeader header, boolean selected, boolean printing)
          Draw the header.
 java.lang.String getToolTipText(TimeBarRow row, org.eclipse.swt.graphics.Rectangle drawingArea, int x, int y)
          Retrieve the tooltip for a position inside the header.
 

Method Detail

draw

void draw(org.eclipse.swt.graphics.GC gc,
          org.eclipse.swt.graphics.Rectangle drawingArea,
          TimeBarViewerDelegate delegate,
          TimeBarRowHeader header,
          boolean selected,
          boolean printing)
Draw the header.

Parameters:
gc - GC to use (clipped to drawing area)
drawingArea - Rectangle to paint within
delegate - TimeBarViewerDelegate for retrieving some support
header - the header to paint
selected - true if the row is selected
printing - flag indicating the current drawing is done for a printer

getToolTipText

java.lang.String getToolTipText(TimeBarRow row,
                                org.eclipse.swt.graphics.Rectangle drawingArea,
                                int x,
                                int y)
Retrieve the tooltip for a position inside the header.

Parameters:
row - the header is for
drawingArea - area in which the header has been drawn
x - x of the position in question
y - of the position in question
Returns:
the tooltip for the position or null

contains

boolean contains(org.eclipse.swt.graphics.Rectangle drawingArea,
                 int x,
                 int y)
Check whether a position in the header should be active for selecting.

Parameters:
drawingArea - area in which the header has been drawn
x - x of the position in question
y - of the position in question
Returns:
true if this position hits an active part leeding to selection of the row.

dispose

void dispose()
Dispose the renderer. Should free up any resources locked.


createPrintRenderer

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

Parameters:
printer - Printer device
Returns:
a configured renderer for printing.


Copyright © 2012. All Rights Reserved.