Interface TimeScaleRenderer

All Known Implementing Classes:
BoxTimeScaleRenderer, DefaultTimeScaleRenderer, OldDefaultTimeScaleRenderer

public interface TimeScaleRenderer

Interface for a renderer used to render a time scale in the TimeBarViewer. Care has to be taken not to create a JComponent for every call of getRendererComponent. The renderer should guard one JComponent to configure and return on subsequent calls.

$Id: 800 2008-12-27 22:27:33Z kliem $
Peter Kliem

Method Summary
 int getHeight()
          Return the height needed for painting the time scale.
 javax.swing.JComponent getRendererComponent(TimeBarViewer tbv, boolean top)
          Return a JComponent to be used to render the time scale.

Method Detail


javax.swing.JComponent getRendererComponent(TimeBarViewer tbv,
                                            boolean top)
Return a JComponent to be used to render the time scale. The component has to be configured properly before returning it. All needed information about the time scale, major and minor ticks can be obtainend by the TimeBarViewer.

The component may implement getToolTipText(MouseEvent evt) to return a proper tooltip for the location

tbv - the TimeBarViwer the component is used for
top - if true the scale is drawn at the top of the diagram
a configured JComponent


int getHeight()
Return the height needed for painting the time scale. The value will be fetched only once when the renderer is set for the TimeBarViewer for reasons of stability in painting.

the height of the time scale

Copyright © 2012. All Rights Reserved.