public class PointPlacemarkAttributes extends java.lang.Object implements Exportable
PointPlacemark
s.Modifier and Type | Field and Description |
---|---|
protected int |
antiAliasHint |
protected static java.awt.Color |
DEFAULT_IMAGE_COLOR
The default image color.
|
static Offset |
DEFAULT_IMAGE_OFFSET
The image offset to use if none specified.
|
static java.lang.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 java.lang.Double |
DEFAULT_IMAGE_SCALE
The image scale to use if none specified.
|
protected static java.awt.Color |
DEFAULT_LABEL_COLOR
The default label color.
|
static java.awt.Font |
DEFAULT_LABEL_FONT
The default font to use for the placemark's label.
|
static Offset |
DEFAULT_LABEL_OFFSET
The default label offset.
|
static java.lang.Double |
DEFAULT_LABEL_SCALE
The label scale to use if none specified.
|
protected static java.awt.Color |
DEFAULT_LINE_COLOR
The default line color.
|
protected boolean |
drawImage |
protected boolean |
drawLabel |
protected java.lang.Double |
heading |
protected java.lang.String |
headingReference |
protected java.awt.image.BufferedImage |
image |
protected java.lang.String |
imageAddress |
protected java.awt.Color |
imageColor
Color to be blended with the image.
|
protected Offset |
imageOffset |
protected java.awt.Font |
labelFont |
protected Material |
labelMaterial |
protected Offset |
labelOffset |
protected java.lang.Double |
labelScale |
protected Material |
lineMaterial |
protected java.lang.Double |
lineWidth |
protected java.lang.Double |
pitch |
protected java.lang.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(java.lang.String mimeType,
java.lang.Object output)
Export the Placemark.
|
protected void |
exportAsKML(java.lang.Object output)
Export the placemark attributes to KML as a
<Style> element. |
int |
getAntiAliasHint()
Returns the anti-alias hint.
|
java.lang.Double |
getHeading()
Returns the placemark image heading.
|
java.lang.String |
getHeadingReference()
Indicates the heading reference.
|
java.awt.image.BufferedImage |
getImage()
Returns the
BufferedImage previously specified to setImage(java.awt.image.BufferedImage) . |
java.lang.String |
getImageAddress()
Returns the address of the placemark's image.
|
java.awt.Color |
getImageColor()
Sets the image color.
|
Offset |
getImageOffset()
Returns the image offset.
|
java.awt.Color |
getLabelColor()
Returns the label diffuse component of the label's material color.
|
java.awt.Font |
getLabelFont() |
Material |
getLabelMaterial()
Returns the label material.
|
Offset |
getLabelOffset()
Returns the label offset.
|
java.lang.Double |
getLabelScale()
Returns the placemark's label scale.
|
java.awt.Color |
getLineColor()
Returns the label diffuse component of the label's material color.
|
Material |
getLineMaterial()
Returns the line color.
|
java.lang.Double |
getLineWidth()
Returns this instance's line width.
|
java.lang.Double |
getPitch()
Indicates the placemark image pitch.
|
java.lang.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.
|
java.lang.String |
isExportFormatSupported(java.lang.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(java.lang.Double heading)
Specifies the placemark image heading, which is used by some placemark implementations to orient the placemark
image.
|
void |
setHeadingReference(java.lang.String headingReference)
Specifies the heading reference.
|
void |
setImage(java.awt.image.BufferedImage image)
Specifies a
BufferedImage for PointPlacemark s associated
with this attribute bundle. |
void |
setImageAddress(java.lang.String address)
Specifies the address of the placemark's image.
|
void |
setImageColor(java.awt.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(java.lang.String labelColorString)
Sets the label color as a string in the form 0xAABBGGRR.
|
void |
setLabelFont(java.awt.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(java.lang.Double scale)
Specifies the placemark label scale.
|
void |
setLineColor(java.lang.String lineColorString)
Sets the line color as a string in the form 0xAABBGGRR.
|
void |
setLineMaterial(Material lineColor)
Sets the line color.
|
void |
setLineWidth(java.lang.Double lineWidth)
Specifies the line width to use when rendering the optional placemark line.
|
void |
setPitch(java.lang.Double pitch)
Specifies the placemark image pitch.
|
void |
setScale(java.lang.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 java.awt.Color DEFAULT_IMAGE_COLOR
public static final Offset DEFAULT_IMAGE_OFFSET
public static final java.lang.String DEFAULT_IMAGE_PATH
public static final java.lang.Double DEFAULT_IMAGE_SCALE
protected static final java.awt.Color DEFAULT_LABEL_COLOR
public static final java.awt.Font DEFAULT_LABEL_FONT
public static final Offset DEFAULT_LABEL_OFFSET
public static final java.lang.Double DEFAULT_LABEL_SCALE
protected static final java.awt.Color DEFAULT_LINE_COLOR
protected boolean drawImage
protected boolean drawLabel
protected java.lang.Double heading
protected java.lang.String headingReference
protected java.awt.image.BufferedImage image
protected java.lang.String imageAddress
protected java.awt.Color imageColor
protected Offset imageOffset
protected java.awt.Font labelFont
protected Material labelMaterial
protected Offset labelOffset
protected java.lang.Double labelScale
protected Material lineMaterial
protected java.lang.Double lineWidth
protected java.lang.Double pitch
protected java.lang.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(java.lang.String mimeType, java.lang.Object output) throws java.io.IOException, java.lang.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).java.io.IOException
- If an exception occurs writing to the output object.java.lang.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(java.lang.Object output) throws javax.xml.stream.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.javax.xml.stream.XMLStreamException
- If an exception occurs while writing the KMLexport(String, Object)
public int getAntiAliasHint()
setAntiAliasHint(int)
for the recognized values.public java.lang.Double getHeading()
public java.lang.String getHeadingReference()
setHeadingReference(String).
public java.awt.image.BufferedImage getImage()
BufferedImage
previously specified to setImage(java.awt.image.BufferedImage)
.public java.lang.String getImageAddress()
public java.awt.Color getImageColor()
setImageColor(java.awt.Color)
public Offset getImageOffset()
public java.awt.Color getLabelColor()
public java.awt.Font getLabelFont()
public Material getLabelMaterial()
public Offset getLabelOffset()
public java.lang.Double getLabelScale()
public java.awt.Color getLineColor()
public Material getLineMaterial()
public java.lang.Double getLineWidth()
public java.lang.Double getPitch()
public java.lang.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 java.lang.String isExportFormatSupported(java.lang.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(java.lang.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(java.lang.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(java.awt.image.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(java.lang.String address)
address
- the address of the placemark's image. May be null, in which case a default image is used.public void setImageColor(java.awt.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(java.lang.String labelColorString)
labelColorString
- the line color. May be null.public void setLabelFont(java.awt.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(java.lang.Double scale)
scale
- the placemark image scale. May be null, in which case no scaling is applied.public void setLineColor(java.lang.String lineColorString)
lineColorString
- the line color. May be null.public void setLineMaterial(Material lineColor)
lineColor
- the line color. May be null.public void setLineWidth(java.lang.Double lineWidth)
lineWidth
- the line width. May be null, in which case a width of 1 is used during rendering.public void setPitch(java.lang.Double pitch)
pitch
- the placemark pitch in degrees. May be null, in which case no pitch is applied during rendering.public void setScale(java.lang.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()