Package de.latlon.deejump.plugin.style
Class BitmapVertexStyle
- java.lang.Object
-
- com.vividsolutions.jump.workbench.ui.renderer.style.VertexStyle
-
- de.latlon.deejump.plugin.style.BitmapVertexStyle
-
- All Implemented Interfaces:
Style,Cloneable,SLDImporter.FillStyle,SLDImporter.SizedStrokeFillStyle,SLDImporter.SizedStyle,SLDImporter.StrokeFillStyle,SLDImporter.StrokeStyle
public class BitmapVertexStyle extends VertexStyle
BitmapVertexStyle- Version:
- $Revision$, $Date: 2008-02-14 14:37:00 +0100 (Thu, 14 Feb 2008) $
- Author:
- Andreas Schmitz, last edited by: $Author$
-
-
Field Summary
-
Fields inherited from class com.vividsolutions.jump.workbench.ui.renderer.style.VertexStyle
shape, size
-
-
Constructor Summary
Constructors Constructor Description BitmapVertexStyle()BitmapVertexStyle(String fileName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFileName()ImagegetImage()static BufferedImagegetUpdatedSVGImage(String fileName, String stroke, String fill, int size)voidpaint(Graphics2D g, Point2D p)protected voidrender(Graphics2D g)voidsetFileName(String fileName)voidsetFillColor(Color c)voidsetLineColor(Color c)voidsetSize(int size)static StringtoHexColor(Color color)static StringBufferupdateSVGColors(File file, String stroke, String fill)-
Methods inherited from class com.vividsolutions.jump.workbench.ui.renderer.style.VertexStyle
clone, getFillColor, getFilling, getLineColor, getShape, getSize, initialize, isEnabled, paint, setAlpha, setEnabled, setFilling, setLinePattern, setLineWidth, setRenderingLinePattern
-
-
-
-
Constructor Detail
-
BitmapVertexStyle
public BitmapVertexStyle()
-
BitmapVertexStyle
public BitmapVertexStyle(String fileName)
- Parameters:
fileName- the name of the file describing this BitmapVertexStyle
-
-
Method Detail
-
paint
public void paint(Graphics2D g, Point2D p)
- Overrides:
paintin classVertexStyle
-
render
protected void render(Graphics2D g)
- Overrides:
renderin classVertexStyle
-
getImage
public Image getImage()
- Returns:
- the image
-
getFileName
public String getFileName()
- Returns:
- the image
-
setFillColor
public void setFillColor(Color c)
- Specified by:
setFillColorin interfaceSLDImporter.FillStyle- Overrides:
setFillColorin classVertexStyle- Parameters:
c- a Color
-
setLineColor
public void setLineColor(Color c)
- Specified by:
setLineColorin interfaceSLDImporter.StrokeStyle- Overrides:
setLineColorin classVertexStyle- Parameters:
c- line Color
-
setSize
public void setSize(int size)
- Specified by:
setSizein interfaceSLDImporter.SizedStyle- Overrides:
setSizein classVertexStyle- Parameters:
size- size
-
toHexColor
public static String toHexColor(Color color)
- Parameters:
color- the color to encode- Returns:
- a #rrggbb string
-
updateSVGColors
public static StringBuffer updateSVGColors(File file, String stroke, String fill) throws IOException
- Parameters:
file- the svg filestroke- hex value of the stroke color to usefill- hex value of the fill color to use- Returns:
- the new svg code
- Throws:
IOException- if an IOException occurs
-
getUpdatedSVGImage
public static BufferedImage getUpdatedSVGImage(String fileName, String stroke, String fill, int size)
- Parameters:
fileName- svg file namestroke- hex value of the stroke color to usefill- hex value of the fill color to usesize- image size- Returns:
- a SVG image with black colors overwritten with the given colors
-
setFileName
public void setFileName(String fileName)
- Parameters:
fileName- file name to use
-
-