public class MarkerIcon
extends javax.swing.ImageIcon
Constructor and Description |
---|
MarkerIcon(java.awt.Shape shape,
java.awt.Color drawColor,
java.awt.Color fillColor)
Create a MarkerIcon from a specified shape, draw color and fill color.
|
MarkerIcon(java.lang.String fileName)
Create a marker icon from an image file.
|
MarkerIcon(java.net.URL url)
Create a marker icon from an image file specified by a URL.
|
Modifier and Type | Method and Description |
---|---|
java.net.URL |
getIconUrl()
Get the URL for the icon.
|
int |
getXOffset()
Get the XOffset for this MarkerIcon.
|
int |
getYOffset()
Get the YOffset for this MarkerIcon.
|
boolean |
isPoint()
Return whether this MarkerIcon is a single point.
|
void |
setOffset(int xOffset,
int yOffset)
Set the offset for this MarkerIcon.
|
void |
writeToFile(java.lang.String fileName)
Write this icon to a file.
|
public MarkerIcon(java.awt.Shape shape, java.awt.Color drawColor, java.awt.Color fillColor)
shape
- the shapedrawColor
- fillColor
- java.lang.IllegalArgumentException
- if both draw and fill color are null.public MarkerIcon(java.lang.String fileName)
fileName
- the name of the filepublic MarkerIcon(java.net.URL url)
url
- the url of the filepublic java.net.URL getIconUrl()
public int getXOffset()
public int getYOffset()
public boolean isPoint()
public void setOffset(int xOffset, int yOffset)
xOffset
- the X coordinate of the offset, in pixel coordinatesyOffset
- the Y coordinate of the offset, in pixel coordinatespublic void writeToFile(java.lang.String fileName)
fileName
- the file to write to.