|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jaret.util.ui.timebars.swt.renderer.RendererBase
public class RendererBase
Base implementation for renderer that support both screen and printer rendering. It's main purpose is scaling beetween screen and printer coordinates (based on a 96dpi for the screen)
| Field Summary | |
|---|---|
protected org.eclipse.swt.printing.Printer |
_printer
printer device if constructed for a printer. |
protected double |
_scaleX
scale factor for valus on the x axis. |
protected double |
_scaleY
scale factor for values on the y axis. |
| Constructor Summary | |
|---|---|
RendererBase(org.eclipse.swt.printing.Printer printer)
May be constructed without printer (supplying null). |
|
| Method Summary | |
|---|---|
void |
drawFocus(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle drawingArea,
TimeBarViewerDelegate delegate,
de.jaret.util.date.Interval interval,
boolean selected,
boolean printing,
boolean overlap)
Draw focus marking when not printing and focussed. |
int |
getDefaultLineWidth()
Retrieve a correctd linewidth taking printer resolution in account when printing. |
org.eclipse.swt.printing.Printer |
getPrinter()
Retrieve the printer device if set. |
double |
getScaleX()
Retrieve the x scale factor. |
double |
getScaleY()
Retruve the y scale value. |
int |
scaleX(int in)
Scale an x value. |
int |
scaleY(int in)
Scale an y value. |
| 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
| Constructor Detail |
|---|
public RendererBase(org.eclipse.swt.printing.Printer printer)
printer - or null| Method Detail |
|---|
public int scaleX(int in)
in - x val to scale
public double getScaleX()
public int scaleY(int in)
in - y val to scale
public double getScaleY()
public org.eclipse.swt.printing.Printer getPrinter()
null
public void drawFocus(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle drawingArea,
TimeBarViewerDelegate delegate,
de.jaret.util.date.Interval interval,
boolean selected,
boolean printing,
boolean overlap)
gc - GCdrawingArea - rectangular drawing areadelegate - tbv delegateinterval - interval that maybe in focusselected - true if the interval is selecetdprinting - true if operating for a printer gcoverlap - true if interval overlaps with otzher intervalspublic int getDefaultLineWidth()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||