Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.views.styledmap.clip.layout.impl
Class AbstractDefaultAugmentation

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.views.styledmap.clip.layout.impl.AbstractDefaultAugmentation
All Implemented Interfaces:
LayoutAugmentation
Direct Known Subclasses:
ColumnLayout.ColumnAugmentation, RowLayout.RowAugmentation

public abstract class AbstractDefaultAugmentation
extends Object
implements LayoutAugmentation

Base class for layout augmentations.

Author:
Simon Templer

Field Summary
static int DEFAULT_MARGIN
          Default margin in pixels
 
Constructor Summary
AbstractDefaultAugmentation()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MARGIN

public static final int DEFAULT_MARGIN
Default margin in pixels

See Also:
Constant Field Values
Constructor Detail

AbstractDefaultAugmentation

public AbstractDefaultAugmentation()
Method Detail

paint

public final void paint(Graphics2D g,
                        org.jdesktop.swingx.mapviewer.JXMapViewer map,
                        List<PainterProxy> painters,
                        int width,
                        int height)
Description copied from interface: LayoutAugmentation
Paint the layout augmentation.

Specified by:
paint in interface LayoutAugmentation
Parameters:
g - the graphics to paint on
map - the corresponding map viewer
painters - the list of layouted painters
width - the width of the paint area
height - the height of the paint area
See Also:
LayoutAugmentation.paint(Graphics2D, JXMapViewer, List, int, int)

doPaint

protected abstract void doPaint(Graphics2D g,
                                org.jdesktop.swingx.mapviewer.JXMapViewer map,
                                List<PainterProxy> painters,
                                int width,
                                int height)
Paint the layout augmentation.

Parameters:
g - the graphics to paint on
map - the corresponding map viewer
painters - the list of layouted painters
width - the width of the paint area
height - the height of the paint area

getFont

protected Font getFont(Font originalFont)
Get the font to use for augmentation text.

Parameters:
originalFont - the original font applied to the graphics
Returns:
the font to use for the augmentation

drawText

protected void drawText(Graphics2D g,
                        String text,
                        int x,
                        int y)
Draw a text.

Parameters:
g - the graphics context
text - the text to draw
x - the x coordinate where the text should be rendered
y - the y coordinate where the text should be rendered

drawSplitLine

protected void drawSplitLine(Graphics2D g,
                             int x1,
                             int y1,
                             int x2,
                             int y2)
Draw a split line.

Parameters:
g - the graphics context
x1 - the x coordinate of the line start point
y1 - the y coordinate of the line start point
x2 - the x coordinate of the line end point
y2 - the y coordinate of the line end point

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d