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

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

public class DefaultMiscRenderer
extends RendererBase
implements IMiscRenderer

Default implementation of the IMiscRenderer for SWT.

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

Field Summary
 
Fields inherited from class de.jaret.util.ui.timebars.swt.renderer.RendererBase
_printer, _scaleX, _scaleY
 
Constructor Summary
DefaultMiscRenderer()
          Default constructor.
DefaultMiscRenderer(org.eclipse.swt.printing.Printer printer)
          Construct the renderer for printing.
 
Method Summary
 IMiscRenderer createPrintRenderer(org.eclipse.swt.printing.Printer printer)
          Create a renderre suitable for printing.
 void dispose()
          Dispose whatever ressources have been allocated.
 void renderRegionSelection(org.eclipse.swt.graphics.GC gc, TimeBarViewer tbv, TimeBarViewerDelegate delegate)
          Render the region selection.
 void renderSelectionRect(org.eclipse.swt.graphics.GC gc, java.awt.Rectangle selRect)
          Render the selection rectangle.
 
Methods inherited from class de.jaret.util.ui.timebars.swt.renderer.RendererBase
drawFocus, getDefaultLineWidth, getPrinter, getScaleX, getScaleY, scaleX, scaleY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMiscRenderer

public DefaultMiscRenderer()
Default constructor.


DefaultMiscRenderer

public DefaultMiscRenderer(org.eclipse.swt.printing.Printer printer)
Construct the renderer for printing.

Parameters:
printer - the printer device.
Method Detail

dispose

public void dispose()
Dispose whatever ressources have been allocated.

Specified by:
dispose in interface IMiscRenderer

renderRegionSelection

public void renderRegionSelection(org.eclipse.swt.graphics.GC gc,
                                  TimeBarViewer tbv,
                                  TimeBarViewerDelegate delegate)
Render the region selection.

Specified by:
renderRegionSelection in interface IMiscRenderer
Parameters:
gc - GC to use
tbv - viewer
delegate - delegate

renderSelectionRect

public void renderSelectionRect(org.eclipse.swt.graphics.GC gc,
                                java.awt.Rectangle selRect)
Render the selection rectangle.

Specified by:
renderSelectionRect in interface IMiscRenderer
Parameters:
gc - to paint with
selRect - retangle

createPrintRenderer

public IMiscRenderer createPrintRenderer(org.eclipse.swt.printing.Printer printer)
Create a renderre suitable for printing.

Specified by:
createPrintRenderer in interface IMiscRenderer
Parameters:
printer - the printer device to use
Returns:
a configured misc renderer ready for printing


Copyright © 2012. All Rights Reserved.