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

All Known Implementing Classes:
DefaultRelationRenderer

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 798 2008-12-27 21:51:27Z kliem $
Author:
kliem

Method Summary
 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, java.awt.Graphics graphics)
          Do the complete relation rendering.
 

Method Detail

renderRelations

void renderRelations(TimeBarViewerDelegate delegate,
                     java.awt.Graphics graphics)
Do the complete relation rendering.

Parameters:
delegate - the delegate
graphics - Graphics to paint on

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


Copyright © 2012. All Rights Reserved.