de.jaret.util.ui.timebars.swing.renderer
Class DefaultMiscRenderer

java.lang.Object
  extended by de.jaret.util.ui.timebars.swing.renderer.DefaultMiscRenderer
All Implemented Interfaces:
IMiscRenderer

public class DefaultMiscRenderer
extends java.lang.Object
implements IMiscRenderer

Default implementation of th misc renderer for the swing time bar viewer.

Version:
$Id: DefaultMiscRenderer.java 881 2009-09-22 21:25:47Z kliem $
Author:
kliem

Field Summary
static java.awt.Color HIGHLIGHT_COLOR
          color used for highlighting.
 
Constructor Summary
DefaultMiscRenderer()
           
 
Method Summary
 void drawRowBackground(java.awt.Graphics graphics, int x, int y, int width, int height, boolean selected, boolean highlighted)
          Draw a row background for the time bar viewer if a row is either selected or highlighted.
 void drawRowGridLine(java.awt.Graphics graphics, int x1, int y1, int x2, int y2)
          Draw a row gridline for the time bar viewer.
 void renderRegionRect(java.awt.Graphics graphics, TimeBarViewer tbv, TimeBarViewerDelegate delegate)
          Render the selected region.
 void renderSelectionRect(java.awt.Graphics graphics, TimeBarViewer tbv, java.awt.Rectangle selectionRect)
          Render the selection rectangle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIGHLIGHT_COLOR

public static final java.awt.Color HIGHLIGHT_COLOR
color used for highlighting.

Constructor Detail

DefaultMiscRenderer

public DefaultMiscRenderer()
Method Detail

renderRegionRect

public void renderRegionRect(java.awt.Graphics graphics,
                             TimeBarViewer tbv,
                             TimeBarViewerDelegate delegate)
Render the selected region.

Specified by:
renderRegionRect in interface IMiscRenderer
Parameters:
graphics - Graphics to paint with
tbv - timebar viewer
delegate - the delegate

renderSelectionRect

public void renderSelectionRect(java.awt.Graphics graphics,
                                TimeBarViewer tbv,
                                java.awt.Rectangle selectionRect)
Render the selection rectangle.

Specified by:
renderSelectionRect in interface IMiscRenderer
Parameters:
graphics - Graphics to paint with
tbv - timebar viewer
selectionRect - the selection rectangle in coordinates

drawRowGridLine

public void drawRowGridLine(java.awt.Graphics graphics,
                            int x1,
                            int y1,
                            int x2,
                            int y2)
Draw a row gridline for the time bar viewer.

Specified by:
drawRowGridLine in interface IMiscRenderer
Parameters:
graphics - Graphics to draw with
x1 - start x
y1 - start y
x2 - end x
y2 - end y

drawRowBackground

public void drawRowBackground(java.awt.Graphics graphics,
                              int x,
                              int y,
                              int width,
                              int height,
                              boolean selected,
                              boolean highlighted)
Draw a row background for the time bar viewer if a row is either selected or highlighted.

Specified by:
drawRowBackground in interface IMiscRenderer
Parameters:
graphics - Graphics to paint with
x - x cord
y - y coord
width - width of the area
height - height of the area
selected - true if the row is selected
highlighted - true if the row is highlighted


Copyright © 2012. All Rights Reserved.