Class AttributionPainter

java.lang.Object
All Implemented Interfaces:
Painter<JXMapViewer>

public class AttributionPainter
extends AbstractPainter<JXMapViewer>
  • Constructor Details

  • Method Details

    • doPaint

      protected void doPaint​(java.awt.Graphics2D graphics, JXMapViewer mapViewer, int width, int height)
      Description copied from class: AbstractPainter
      Subclasses must implement this method and perform custom painting operations here.
      Specified by:
      doPaint in class AbstractPainter<JXMapViewer>
      Parameters:
      graphics - The Graphics2D object in which to paint
      mapViewer - an optional configuration parameter
      width - the width
      height - the height
    • setMargin

      public void setMargin​(int margin)
      Set margin around the attribution text in pixels
      Parameters:
      margin - margin
    • setBackgroundColor

      public void setBackgroundColor​(java.awt.Color backgroundColor)
      Set backround color of the attribution box
      Parameters:
      backgroundColor - color, default white
    • setFontColor

      public void setFontColor​(java.awt.Color fontColor)
      Set font color of the attribution text
      Parameters:
      fontColor - color, default black
    • setFont

      public void setFont​(java.awt.Font font)
      Set font of the attribution text
      Parameters:
      font - font, default Dialog,10px
    • setPosition

      public void setPosition​(int vertical, int horizontal)
      Set position of the attribution box should be SwingConstants.(TOP,BOTTOM,LEFT,RIGHT)
      Parameters:
      vertical - vertical position
      horizontal - horizontal position