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

All Known Implementing Classes:
RelationRenderer

public interface IRelationRenderer

Interface describing the rendering part for relations between intervals. The relation renderer is responsible for all the calculations to be done when rendering (so it can decide whether to paint lines for relations between intervals that are not shown). It is also responsible for supplying a hit detection for selecting of relations.

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

Method Summary
 IRelationRenderer createPrintRenderer(org.eclipse.swt.printing.Printer printer)
          Create a renderer suitable for printing.
 void dispose()
          Dispose resources the renderer might have aquired.
 java.util.List<IIntervalRelation> getRelationsForCoord(int x, int y)
          Retrieve the list of relations that are hit a the given coordinate.
 java.lang.String getTooltip(int x, int y)
          Supply a tooltip for a position in the diagram area.
 void renderRelations(TimeBarViewerDelegate delegate, org.eclipse.swt.graphics.GC gc, boolean printing)
          Do the complete relation rendering.
 

Method Detail

renderRelations

void renderRelations(TimeBarViewerDelegate delegate,
                     org.eclipse.swt.graphics.GC gc,
                     boolean printing)
Do the complete relation rendering.

Parameters:
delegate - the delegate
gc - GC to paint on
printing - true when used throughout printing

getRelationsForCoord

java.util.List<IIntervalRelation> getRelationsForCoord(int x,
                                                       int y)
Retrieve the list of relations that are hit a the given coordinate.

Parameters:
x - x coordinate
y - y coordinate
Returns:
List of realations that may be empty but must not be null

getTooltip

java.lang.String getTooltip(int x,
                            int y)
Supply a tooltip for a position in the diagram area.

Parameters:
x - x coordinate
y - y coordinate
Returns:
null for no tooltip contribution or tooltip to be displayed

createPrintRenderer

IRelationRenderer createPrintRenderer(org.eclipse.swt.printing.Printer printer)
Create a renderer suitable for printing.

Parameters:
printer - printer device
Returns:
renderer configured and ready for printing

dispose

void dispose()
Dispose resources the renderer might have aquired.



Copyright © 2012. All Rights Reserved.