de.jaret.util.ui.table.renderer
Interface ITableHeaderRenderer

All Known Implementing Classes:
DefaultTableHeaderRenderer

public interface ITableHeaderRenderer

Interface describing a header renderer for the jaret table.

Version:
$Id: ITableHeaderRenderer.java 608 2007-10-23 19:24:34Z kliem $
Author:
Peter Kliem

Method Summary
 boolean disableClipping()
          If this method returns true the gc for drawing will not be limited by a clipping rect.
 void dispose()
          Dispose any resources allocated.
 void draw(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle, IColumn column, int sortingPosition, boolean sortDir, boolean printing)
          Draw a table header.
 ITableHeaderRenderer getPrintRenderer(org.eclipse.swt.printing.Printer printer)
          Create a table header renderer for printing.
 boolean isSortingClick(org.eclipse.swt.graphics.Rectangle drawingArea, IColumn column, int x, int y)
          Check whether a click hits the area reserved for sorting indication.
 

Method Detail

draw

void draw(org.eclipse.swt.graphics.GC gc,
          org.eclipse.swt.graphics.Rectangle rectangle,
          IColumn column,
          int sortingPosition,
          boolean sortDir,
          boolean printing)
Draw a table header.

Parameters:
gc - GC to be used
rectangle - rectangle to draw within
column - the column for which the header is painted.
sortingPosition - if the column is part of the sorting set this indicates the sorting order position. A value of 0 means no sorting.
sortDir - if sorting this indicates the sorting direction. true means ascending.
printing - true if the draw operation is for a printer

disableClipping

boolean disableClipping()
If this method returns true the gc for drawing will not be limited by a clipping rect. This is useful for slanted header texts but should be used with the appropriate care.

Returns:
true if the rendering should not be clipped.

isSortingClick

boolean isSortingClick(org.eclipse.swt.graphics.Rectangle drawingArea,
                       IColumn column,
                       int x,
                       int y)
Check whether a click hits the area reserved for sorting indication.

Parameters:
drawingArea - drawing aea of the header
column - column
x - x coordinat of the click
y - y coordinate of the click
Returns:
true if the click is in the area that should be active for sorting

getPrintRenderer

ITableHeaderRenderer getPrintRenderer(org.eclipse.swt.printing.Printer printer)
Create a table header renderer for printing.

Parameters:
printer - the printer that will be used
Returns:
a configured header renderer for printing.

dispose

void dispose()
Dispose any resources allocated.



Copyright © 2012. All Rights Reserved.