public abstract class AbstractDefaultAugmentation extends Object implements LayoutAugmentation
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MARGIN
Default margin in pixels
|
Constructor and Description |
---|
AbstractDefaultAugmentation() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doPaint(Graphics2D g,
org.jdesktop.swingx.mapviewer.JXMapViewer map,
List<PainterProxy> painters,
int width,
int height)
Paint the layout augmentation.
|
protected void |
drawSplitLine(Graphics2D g,
int x1,
int y1,
int x2,
int y2)
Draw a split line.
|
protected void |
drawText(Graphics2D g,
String text,
int x,
int y)
Draw a text.
|
protected Font |
getFont(Font originalFont)
Get the font to use for augmentation text.
|
void |
paint(Graphics2D g,
org.jdesktop.swingx.mapviewer.JXMapViewer map,
List<PainterProxy> painters,
int width,
int height)
Paint the layout augmentation.
|
public static final int DEFAULT_MARGIN
public final void paint(Graphics2D g, org.jdesktop.swingx.mapviewer.JXMapViewer map, List<PainterProxy> painters, int width, int height)
LayoutAugmentation
paint
in interface LayoutAugmentation
g
- the graphics to paint onmap
- the corresponding map viewerpainters
- the list of layouted painterswidth
- the width of the paint areaheight
- the height of the paint areaLayoutAugmentation.paint(Graphics2D, JXMapViewer, List, int, int)
protected abstract void doPaint(Graphics2D g, org.jdesktop.swingx.mapviewer.JXMapViewer map, List<PainterProxy> painters, int width, int height)
g
- the graphics to paint onmap
- the corresponding map viewerpainters
- the list of layouted painterswidth
- the width of the paint areaheight
- the height of the paint areaprotected Font getFont(Font originalFont)
originalFont
- the original font applied to the graphicsprotected void drawText(Graphics2D g, String text, int x, int y)
g
- the graphics contexttext
- the text to drawx
- the x coordinate where the text should be renderedy
- the y coordinate where the text should be renderedprotected void drawSplitLine(Graphics2D g, int x1, int y1, int x2, int y2)
g
- the graphics contextx1
- the x coordinate of the line start pointy1
- the y coordinate of the line start pointx2
- the x coordinate of the line end pointy2
- the y coordinate of the line end pointBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a