Class ScalebarDrawer
- java.lang.Object
-
- org.mapfish.print.processor.map.scalebar.ScalebarDrawer
-
- Direct Known Subclasses:
BarScalebarDrawer
,LineScalebarDrawer
public abstract class ScalebarDrawer extends java.lang.Object
Base class for drawing a scale bar.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ScalebarDrawer(java.awt.Graphics2D graphics2d, ScaleBarRenderSettings settings)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
draw()
Start the rendering of the scalebar.protected abstract void
drawBar()
Draws the bar itself.java.awt.Graphics2D
getGraphics2d()
ScalebarAttribute.ScalebarAttributeValues
getParams()
ScaleBarRenderSettings
getSettings()
-
-
-
Constructor Detail
-
ScalebarDrawer
protected ScalebarDrawer(java.awt.Graphics2D graphics2d, ScaleBarRenderSettings settings)
Constructor.- Parameters:
graphics2d
- The graphics context.settings
- Parameters for rendering the scalebar.
-
-
Method Detail
-
draw
public final void draw()
Start the rendering of the scalebar.
-
drawBar
protected abstract void drawBar()
Draws the bar itself. The transformation is setup in a manner where the bar should be drawn into the rectangle (0, 0) (intervals*intervalWidth, -barSize).
-
getGraphics2d
public final java.awt.Graphics2D getGraphics2d()
-
getSettings
public final ScaleBarRenderSettings getSettings()
-
getParams
public final ScalebarAttribute.ScalebarAttributeValues getParams()
-
-