public class PointPlacemarkAttributes extends Object implements Exportable
PointPlacemark
s.Modifier and Type | Field and Description |
---|---|
protected int |
antiAliasHint |
protected static Color |
DEFAULT_IMAGE_COLOR
The default image color.
|
static Offset |
DEFAULT_IMAGE_OFFSET
The image offset to use if none specified.
|
static String |
DEFAULT_IMAGE_PATH
The image file to use for the placemark's icon if no image file is specified in the placemark attributes.
|
static Double |
DEFAULT_IMAGE_SCALE
The image scale to use if none specified.
|
protected static Color |
DEFAULT_LABEL_COLOR
The default label color.
|
static Font |
DEFAULT_LABEL_FONT
The default font to use for the placemark's label.
|
static Offset |
DEFAULT_LABEL_OFFSET
The default label offset.
|
static Double |
DEFAULT_LABEL_SCALE
The label scale to use if none specified.
|
protected static Color |
DEFAULT_LINE_COLOR
The default line color.
|
protected boolean |
drawImage |
protected boolean |
drawLabel |
protected Double |
heading |
protected String |
headingReference |
protected BufferedImage |
image |
protected String |
imageAddress |
protected Color |
imageColor
Color to be blended with the image.
|
protected Offset |
imageOffset |
protected Font |
labelFont |
protected Material |
labelMaterial |
protected Offset |
labelOffset |
protected Double |
labelScale |
protected Material |
lineMaterial |
protected Double |
lineWidth |
protected Double |
pitch |
protected Double |
scale |
protected boolean |
unresolved |
protected boolean |
usePointAsDefaultImage |
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED
Constructor and Description |
---|
PointPlacemarkAttributes()
Constructs an instance with default values for image address, image offset, image scale, label offset, label font
and label color.
|
PointPlacemarkAttributes(PointPlacemarkAttributes attrs)
Constructs an instance and initializes it to the values in a specified instance.
|
Modifier and Type | Method and Description |
---|---|
void |
copy(PointPlacemarkAttributes attrs)
Copies all values, including null values, from another instance to this one.
|
void |
export(String mimeType,
Object output)
Export the Placemark.
|
protected void |
exportAsKML(Object output)
Export the placemark attributes to KML as a
<Style> element. |
int |
getAntiAliasHint()
Returns the anti-alias hint.
|
Double |
getHeading()
Returns the placemark image heading.
|
String |
getHeadingReference()
Indicates the heading reference.
|
BufferedImage |
getImage()
Returns the
BufferedImage previously specified to setImage(java.awt.image.BufferedImage) . |
String |
getImageAddress()
Returns the address of the placemark's image.
|
Color |
getImageColor()
Sets the image color.
|
Offset |
getImageOffset()
Returns the image offset.
|
Color |
getLabelColor()
Returns the label diffuse component of the label's material color.
|
Font |
getLabelFont() |
Material |
getLabelMaterial()
Returns the label material.
|
Offset |
getLabelOffset()
Returns the label offset.
|
Double |
getLabelScale()
Returns the placemark's label scale.
|
Color |
getLineColor()
Returns the label diffuse component of the label's material color.
|
Material |
getLineMaterial()
Returns the line color.
|
Double |
getLineWidth()
Returns this instance's line width.
|
Double |
getPitch()
Indicates the placemark image pitch.
|
Double |
getScale()
Returns the placemark image scale.
|
boolean |
isDrawImage()
Indicates whether the placemark's image is drawn.
|
boolean |
isDrawLabel()
Indicates whether the placemark's label is drawn.
|
String |
isExportFormatSupported(String format)
Does this object support a certain export format?
|
boolean |
isUnresolved()
Indicates whether one or more members of this> remain unresolved because they must be retrieved from an
external source.
|
boolean |
isUsePointAsDefaultImage()
Indicates whether to draw a point when the current source image is null.
|
void |
setAntiAliasHint(int antiAliasHint)
Specifies whether and how line anti-aliasing is performed.
|
void |
setDrawImage(boolean drawImage)
Specifies whether to draw the placemark's image.
|
void |
setDrawLabel(boolean drawLabel)
Specifies whether to draw the placemark's label.
|
void |
setHeading(Double heading)
Specifies the placemark image heading, which is used by some placemark implementations to orient the placemark
image.
|
void |
setHeadingReference(String headingReference)
Specifies the heading reference.
|
void |
setImage(BufferedImage image)
Specifies a
BufferedImage for PointPlacemark s associated
with this attribute bundle. |
void |
setImageAddress(String address)
Specifies the address of the placemark's image.
|
void |
setImageColor(Color imageColor)
Sets the image color.
|
void |
setImageOffset(Offset offset)
Specifies a location within the placemark image to align with the placemark point.
|
void |
setLabelColor(String labelColorString)
Sets the label color as a string in the form 0xAABBGGRR.
|
void |
setLabelFont(Font labelFont) |
void |
setLabelMaterial(Material color)
Sets the label material.
|
void |
setLabelOffset(Offset offset)
Specifies a location relative to the placemark's image at which to align the label.
|
void |
setLabelScale(Double scale)
Specifies the placemark label scale.
|
void |
setLineColor(String lineColorString)
Sets the line color as a string in the form 0xAABBGGRR.
|
void |
setLineMaterial(Material lineColor)
Sets the line color.
|
void |
setLineWidth(Double lineWidth)
Specifies the line width to use when rendering the optional placemark line.
|
void |
setPitch(Double pitch)
Specifies the placemark image pitch.
|
void |
setScale(Double scale)
Specifies the placemark image scale.
|
void |
setUnresolved(boolean unresolved)
Specifies whether one or more fields of this> remain unresolved because they must be retrieved from an
external source.
|
void |
setUsePointAsDefaultImage(boolean usePointAsDefaultImage)
Specifies whether to draw a point when the current source image is null.
|
protected int antiAliasHint
protected static final Color DEFAULT_IMAGE_COLOR
public static final Offset DEFAULT_IMAGE_OFFSET
public static final String DEFAULT_IMAGE_PATH
public static final Double DEFAULT_IMAGE_SCALE
protected static final Color DEFAULT_LABEL_COLOR
public static final Font DEFAULT_LABEL_FONT
public static final Offset DEFAULT_LABEL_OFFSET
public static final Double DEFAULT_LABEL_SCALE
protected static final Color DEFAULT_LINE_COLOR
protected boolean drawImage
protected boolean drawLabel
protected Double heading
protected String headingReference
protected BufferedImage image
protected String imageAddress
protected Color imageColor
protected Offset imageOffset
protected Font labelFont
protected Material labelMaterial
protected Offset labelOffset
protected Double labelScale
protected Material lineMaterial
protected Double lineWidth
protected Double pitch
protected Double scale
protected boolean unresolved
protected boolean usePointAsDefaultImage
public PointPlacemarkAttributes()
public PointPlacemarkAttributes(PointPlacemarkAttributes attrs)
attrs
- the instance from which to copy the initial attribute values of this. May be null.public void copy(PointPlacemarkAttributes attrs)
attrs
- the instance to copy values from.public void export(String mimeType, Object output) throws IOException, UnsupportedOperationException
output
object will receive the exported data. The type of this object depends
on the export format. The formats and object types supported by this class are:
Format Supported output object types ================================================================================ KML (application/vnd.google-earth.kml+xml) java.io.Writer java.io.OutputStream javax.xml.stream.XMLStreamWriter
export
in interface Exportable
mimeType
- MIME type of desired export format.output
- An object that will receive the exported data. The type of this object depends on the export
format (see above).IOException
- If an exception occurs writing to the output object.UnsupportedOperationException
- if the format is not supported by this object, or if the output
argument is not of a supported type.Exportable.isExportFormatSupported(String)
protected void exportAsKML(Object output) throws XMLStreamException
<Style>
element. The output
object will receive the
data. This object must be one of: java.io.Writeroutput
- Object to receive the generated KML.XMLStreamException
- If an exception occurs while writing the KMLexport(String, Object)
public int getAntiAliasHint()
setAntiAliasHint(int)
for the recognized values.public Double getHeading()
public String getHeadingReference()
setHeadingReference(String).
public BufferedImage getImage()
BufferedImage
previously specified to setImage(java.awt.image.BufferedImage)
.public String getImageAddress()
public Color getImageColor()
setImageColor(java.awt.Color)
public Offset getImageOffset()
public Color getLabelColor()
public Font getLabelFont()
public Material getLabelMaterial()
public Offset getLabelOffset()
public Double getLabelScale()
public Color getLineColor()
public Material getLineMaterial()
public Double getLineWidth()
public Double getPitch()
public Double getScale()
public boolean isDrawImage()
true
if the image is drawn, otherwise false
.public boolean isDrawLabel()
true
if the label is drawn, otherwise false
.public String isExportFormatSupported(String format)
isExportFormatSupported
in interface Exportable
format
- Desired export format.Exportable.FORMAT_SUPPORTED
, Exportable.FORMAT_NOT_SUPPORTED
, or Exportable.FORMAT_PARTIALLY_SUPPORTED
.Exportable.export(String, Object)
public boolean isUnresolved()
public boolean isUsePointAsDefaultImage()
setUsePointAsDefaultImage(boolean)
public void setAntiAliasHint(int antiAliasHint)
GL.GL_NEAREST
, GL.GL_FASTEST
, and GL.GL_NICEST
.antiAliasHint
- the anti-alias hint.public void setDrawImage(boolean drawImage)
drawImage
- true
to draw the image, otherwise false
.public void setDrawLabel(boolean drawLabel)
drawLabel
- true
to draw the label, otherwise false
.public void setHeading(Double heading)
heading
- the placemark heading in degrees clockwise from North. May be null, in which case no heading is
applied during rendering.public void setHeadingReference(String headingReference)
AVKey.RELATIVE_TO_SCREEN
, the heading is
interpreted as relative to the screen and the placemark icon maintains the heading relative to the screen's
vertical edges. If AVKey.RELATIVE_TO_GLOBE
, the heading is interpreted relative
to the globe and the placemark icon maintains the heading relative to the globe's north direction.
The default heading reference is null, which PointPlacemark
interprets as AVKey.RELATIVE_TO_SCREEN
.headingReference
- the heading reference. See the description for possible values.public void setImage(BufferedImage image)
BufferedImage
for PointPlacemark
s associated
with this attribute bundle. When this method is called, this attribute bundle's image address is automatically
set to a unique identifier for the image.image
- the buffered image to use for the associated point placemarks. May be null, in which case this
attribute bundle's image address is set to null by this method.public void setImageAddress(String address)
address
- the address of the placemark's image. May be null, in which case a default image is used.public void setImageColor(Color imageColor)
imageColor
- New image color.getImageColor()
public void setImageOffset(Offset offset)
offset
- the hot spot controlling the image's placement relative to the placemark point. May be null to
indicate that the image's lower left corner is aligned with the placemark point.public void setLabelColor(String labelColorString)
labelColorString
- the line color. May be null.public void setLabelFont(Font labelFont)
public void setLabelMaterial(Material color)
color
- the line material. May be null.public void setLabelOffset(Offset offset)
offset
- the hot spot controlling the image's placement relative to the placemark point. May be null to
indicate the default label offset.public void setLabelScale(Double scale)
scale
- the placemark image scale. May be null, in which case no scaling is applied.public void setLineColor(String lineColorString)
lineColorString
- the line color. May be null.public void setLineMaterial(Material lineColor)
lineColor
- the line color. May be null.public void setLineWidth(Double lineWidth)
lineWidth
- the line width. May be null, in which case a width of 1 is used during rendering.public void setPitch(Double pitch)
pitch
- the placemark pitch in degrees. May be null, in which case no pitch is applied during rendering.public void setScale(Double scale)
scale
- the placemark image scale. May be null, in which case no scaling is applied.public void setUnresolved(boolean unresolved)
unresolved
- true if there are unresolved fields, false if no fields remain unresolved.public void setUsePointAsDefaultImage(boolean usePointAsDefaultImage)
usePointAsDefaultImage
- true to draw a point when the current source image is null, otherwise false.isUsePointAsDefaultImage()