|
||||||||||
| 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
de.jaret.util.ui.timebars.swt.renderer.OldDefaultTimeScaleRenderer
public class OldDefaultTimeScaleRenderer
A default timescale renderer using the TickScaler to render a readable scale for use cases taht display something in the range of hours and more in the timebar viewer. A holiday enumerator is used to display special and holidays in the tooltip. Suports horizontal and ertical orientation.
| Field Summary | |
|---|---|
protected de.jaret.util.date.holidayenumerator.HolidayEnumerator |
_holidayEnumerator
holiday enumeratotr for tooltips. |
protected static int |
MAJORLENGTH
length of major ticks. |
protected static int |
MINORLENGTH
length of minor ticks. |
protected static int |
PREFERREDHEIGHT
preferred height. |
| Fields inherited from class de.jaret.util.ui.timebars.swt.renderer.RendererBase |
|---|
_printer, _scaleX, _scaleY |
| Constructor Summary | |
|---|---|
OldDefaultTimeScaleRenderer()
Default constructor. |
|
OldDefaultTimeScaleRenderer(org.eclipse.swt.printing.Printer printer)
Construct the renderer for a prinetr device. |
|
| Method Summary | |
|---|---|
TimeScaleRenderer |
createPrintRenderer(org.eclipse.swt.printing.Printer printer)
Create a timescale renderer setup for printing. |
void |
dispose()
Dispose resources. |
void |
draw(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle drawingArea,
TimeBarViewerDelegate delegate,
boolean top,
boolean printing)
Draw the Timescale. |
void |
drawHorizontal(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle drawingArea,
TimeBarViewerDelegate delegate,
boolean top,
boolean printing)
Draw the horizontal scale. |
int |
getHeight()
Returns the prferred height for rendering. |
java.lang.String |
getToolTipText(TimeBarViewer tbv,
org.eclipse.swt.graphics.Rectangle drawingArea,
int x,
int y)
Retrieve the tooltip text for a given locatin in the timescale. |
protected java.lang.String |
getToolTipTextForDate(de.jaret.util.date.JaretDate date,
TickScaler.Range range)
Convert date to string for tooltip display. |
void |
setHolidayEnumerator(de.jaret.util.date.holidayenumerator.HolidayEnumerator he)
Set a holidayenumerator for diasplaying special days as tooltip. |
boolean |
supportsOptimizedScrolling()
Report whether this renderer can be used with optimized scrolling. |
| 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 |
| Field Detail |
|---|
protected static final int PREFERREDHEIGHT
protected static final int MINORLENGTH
protected static final int MAJORLENGTH
protected de.jaret.util.date.holidayenumerator.HolidayEnumerator _holidayEnumerator
| Constructor Detail |
|---|
public OldDefaultTimeScaleRenderer(org.eclipse.swt.printing.Printer printer)
printer - printer devicepublic OldDefaultTimeScaleRenderer()
| Method Detail |
|---|
public void setHolidayEnumerator(de.jaret.util.date.holidayenumerator.HolidayEnumerator he)
he - holidayenumerator to use
public void draw(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle drawingArea,
TimeBarViewerDelegate delegate,
boolean top,
boolean printing)
draw in interface TimeScaleRenderergc - GraphicsContext to paint with.drawingArea - Rectangel denoting the area to draw in. The gc is clipped to this area.delegate - TimeBarViewerDelegate exposed for callbackstop - if true the tmiescale is in position top, bottom otherwiseprinting - flag to indicate printing.
public void drawHorizontal(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle drawingArea,
TimeBarViewerDelegate delegate,
boolean top,
boolean printing)
gc - GCdrawingArea - drawing areadelegate - the timebar viewer delegatetop - true for top positionprinting - true if printing
public java.lang.String getToolTipText(TimeBarViewer tbv,
org.eclipse.swt.graphics.Rectangle drawingArea,
int x,
int y)
getToolTipText in interface TimeScaleRenderertbv - TimeBarViewerdrawingArea - area in that the timescale has been paintedx - x coordinatey - y coordinate
null
protected java.lang.String getToolTipTextForDate(de.jaret.util.date.JaretDate date,
TickScaler.Range range)
date - daterange - last range
public int getHeight()
getHeight in interface TimeScaleRendererpublic void dispose()
dispose in interface TimeScaleRendererpublic TimeScaleRenderer createPrintRenderer(org.eclipse.swt.printing.Printer printer)
createPrintRenderer in interface TimeScaleRendererprinter - Printer device taht will be used.
public boolean supportsOptimizedScrolling()
supportsOptimizedScrolling in interface TimeScaleRenderer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||