|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.jaret.util.ui.timebars.swt.TimeBarPrinter
public class TimeBarPrinter
Utility class for printing a time bar chart. All renderers used have to support the creation of a print renderer.
Field Summary | |
---|---|
protected TimeBarViewerDelegate |
_delegate
timebarviewerdelegate works for the printer. |
protected double |
_footerHeight
height of the footer in cm. |
protected TimeBarGapRenderer |
_gapRenderer
gap raenderer. |
protected GlobalAssistantRenderer |
_globalAssistantRenderer
global assistance renderer. |
protected GridRenderer |
_gridRenderer
grid renderer. |
protected HeaderRenderer |
_headerRenderer
header renderer. |
protected HierarchyRenderer |
_hierarchyRenderer
hierarchy renderer. |
protected double |
_marginBottom
bottom margin in cm. |
protected double |
_marginLeft
left margin in cm. |
protected double |
_marginRight
right margin in cm. |
protected double |
_marginTop
top margin in cm. |
protected TimeBarMarkerRenderer |
_markerRenderer
marker renderer. |
protected org.eclipse.swt.printing.Printer |
_printer
printer device. |
protected java.util.Map<java.lang.Class<? extends de.jaret.util.date.Interval>,TimeBarRenderer> |
_printerRendererMap
mapping between interval classes and renderers (printer). |
protected IRelationRenderer |
_relationRenderer
relation renderer. |
protected TimeBarRenderer |
_renderer
time bar renderer. |
protected double |
_scaleX
scale factor horizontal. |
protected double |
_scaleY
scale factor vertical. |
protected TimeScaleRenderer |
_timeScaleRenderer
time scale renderer. |
protected TitleRenderer |
_titleRenderer
title renderer. |
Constructor Summary | |
---|---|
TimeBarPrinter(org.eclipse.swt.printing.Printer printer)
Construct a timebar printer. |
Method Summary | |
---|---|
void |
dispose()
Dispose whatever needs disposal. |
TimeBarViewerDelegate |
getDelegate()
Access to the delegate. |
double |
getFooterHeight()
|
double |
getMarginBottom()
Retrieve the bottom margin (cm). |
double |
getMarginLeft()
Retrieve the left margin (cm). |
double |
getMarginRight()
Retrieve the right margin (cm). |
double |
getMarginTop()
Retrieve the top margin (cm). |
org.eclipse.swt.printing.Printer |
getPrinter()
Retrieve the printer device. |
protected TimeBarRenderer |
getRenderer(java.lang.Class<? extends de.jaret.util.date.Interval> clazz)
Retrieve a renderer for a given class. |
double |
getScaleX()
Retrieve the scale factor for the x axis. |
double |
getScaleY()
Retrieve the scale factor for the y axis. |
void |
init(TimeBarViewer tbv)
Init the timebarprinter with the appropriate rendereres and settings from the timebarviewer. |
protected int |
pixelForCmX(double cm)
Convert a value in cm to a number of printer pixels (x axis). |
protected int |
pixelForCmY(double cm)
Convert a value in cm to a number of printer pixels (y axis). |
void |
print(ViewConfiguration vc)
Do the printing. |
int |
scaleX(int in)
Scale a pixel value to printer coordinates (x axis). |
int |
scaleY(int in)
Scale a pixel value to printer coordinates (y axis). |
void |
setFooterHeight(double footerHeight)
|
void |
setMarginBottom(double marginBottom)
Set the bottom margin (cm). |
void |
setMarginLeft(double marginLeft)
Set the left margin (cm). |
void |
setMarginRight(double marginRight)
Set the right margin (cm). |
void |
setMarginTop(double marginTop)
Set the top margin (cm). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.swt.printing.Printer _printer
protected double _scaleX
protected double _scaleY
protected TimeScaleRenderer _timeScaleRenderer
protected HeaderRenderer _headerRenderer
protected TimeBarRenderer _renderer
protected HierarchyRenderer _hierarchyRenderer
protected GridRenderer _gridRenderer
protected TimeBarGapRenderer _gapRenderer
protected TimeBarMarkerRenderer _markerRenderer
protected TitleRenderer _titleRenderer
protected GlobalAssistantRenderer _globalAssistantRenderer
protected IRelationRenderer _relationRenderer
protected java.util.Map<java.lang.Class<? extends de.jaret.util.date.Interval>,TimeBarRenderer> _printerRendererMap
protected TimeBarViewerDelegate _delegate
protected double _footerHeight
protected double _marginTop
protected double _marginBottom
protected double _marginLeft
protected double _marginRight
Constructor Detail |
---|
public TimeBarPrinter(org.eclipse.swt.printing.Printer printer)
printer
- printer deviceMethod Detail |
---|
public int scaleX(int in)
in
- value to scale
public double getScaleX()
public int scaleY(int in)
in
- value to scale
public double getScaleY()
protected int pixelForCmX(double cm)
cm
- value to convert
protected int pixelForCmY(double cm)
cm
- value to convert
public org.eclipse.swt.printing.Printer getPrinter()
public TimeBarViewerDelegate getDelegate()
public void init(TimeBarViewer tbv)
tbv
- timebarviewer giving the settingsprotected TimeBarRenderer getRenderer(java.lang.Class<? extends de.jaret.util.date.Interval> clazz)
clazz
- class in question
public void print(ViewConfiguration vc)
vc
- configuration to use for printing.public void dispose()
public double getFooterHeight()
public void setFooterHeight(double footerHeight)
footerHeight
- height of the footer line in cmpublic double getMarginTop()
public void setMarginTop(double marginTop)
marginTop
- margin in cmpublic double getMarginBottom()
public void setMarginBottom(double marginBottom)
marginBottom
- margin in cmpublic double getMarginLeft()
public void setMarginLeft(double marginLeft)
marginLeft
- margin in cmpublic double getMarginRight()
public void setMarginRight(double marginRight)
marginRight
- margin in cm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |