Package org.jxmapviewer.painter
Class AttributionPainter
java.lang.Object
- All Implemented Interfaces:
Painter<JXMapViewer>
public class AttributionPainter extends AbstractPainter<JXMapViewer>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jxmapviewer.painter.AbstractPainter
AbstractPainter.Interpolation -
Constructor Summary
Constructors Constructor Description AttributionPainter() -
Method Summary
Modifier and Type Method Description protected voiddoPaint(java.awt.Graphics2D graphics, JXMapViewer mapViewer, int width, int height)Subclasses must implement this method and perform custom painting operations here.voidsetBackgroundColor(java.awt.Color backgroundColor)Set backround color of the attribution boxvoidsetFont(java.awt.Font font)Set font of the attribution textvoidsetFontColor(java.awt.Color fontColor)Set font color of the attribution textvoidsetMargin(int margin)Set margin around the attribution text in pixelsvoidsetPosition(int vertical, int horizontal)Set position of the attribution box should be SwingConstants.Methods inherited from class org.jxmapviewer.painter.AbstractPainter
clearCache, configureGraphics, getFilters, getInterpolation, isAntialiasing, isCacheable, isDirty, isVisible, paint, setAntialiasing, setCacheable, setDirty, setFilters, setInterpolation, setVisible, shouldUseCache, validateMethods inherited from class org.jxmapviewer.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Constructor Details
-
AttributionPainter
public AttributionPainter()
-
-
Method Details
-
doPaint
Description copied from class:AbstractPainterSubclasses must implement this method and perform custom painting operations here.- Specified by:
doPaintin classAbstractPainter<JXMapViewer>- Parameters:
graphics- The Graphics2D object in which to paintmapViewer- an optional configuration parameterwidth- the widthheight- 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 positionhorizontal- horizontal position
-