public class BasicTacticalGraphicAttributes extends java.lang.Object implements TacticalGraphicAttributes
TacticalGraphicAttributes
.Modifier and Type | Field and Description |
---|---|
protected java.awt.Font |
font
Indicates the font used to render text modifiers.
|
protected Material |
interiorMaterial
Indicates the material properties of the graphic's interior.
|
protected java.lang.Double |
interiorOpacity
Indicates the opacity of the graphic's interior as a floating-point value in the range 0.0 to 1.0.
|
protected Material |
outlineMaterial
Indicates the material properties of the graphic's outline.
|
protected java.lang.Double |
outlineOpacity
Indicates the opacity of the graphic's outline as a floating-point value in the range 0.0 to 1.0.
|
protected double |
outlineWidth
Indicates the line width (in pixels) used when rendering the shape's outline.
|
protected java.lang.Double |
scale
Indicates the symbol scale as a ratio of the symbol's original size, or
null to use the symbol's
default scale. |
protected Material |
textMaterial
Indicates the material used to render text modifiers.
|
Constructor and Description |
---|
BasicTacticalGraphicAttributes()
Creates a new
BasicTacticalGraphicAttributes . |
BasicTacticalGraphicAttributes(TacticalGraphicAttributes attributes)
Creates a new
BasicTacticalGraphicAttributes configured with the specified attributes . |
Modifier and Type | Method and Description |
---|---|
TacticalGraphicAttributes |
copy()
Returns a new TacticalGraphicAttributes instance of the same type as this TacticalGraphicAttributes who's
properties are configured exactly as this TacticalGraphicAttributes.
|
void |
copy(TacticalGraphicAttributes attributes)
Copies the specified TacticalGraphicAttributes' properties into this object's properties.
|
Material |
getInteriorMaterial()
Indicates the material properties of the graphic's interior.
|
java.lang.Double |
getInteriorOpacity()
Indicates the opacity of the graphic's interior as a floating-point value in the range 0.0 to 1.0.
|
Material |
getOutlineMaterial()
Indicates the material properties of the graphic's outline.
|
java.lang.Double |
getOutlineOpacity()
Indicates the opacity of the graphic's outline as a floating-point value in the range 0.0 to 1.0.
|
java.lang.Double |
getOutlineWidth()
Indicates the line width (in pixels) used when rendering the graphic's outline.
|
java.lang.Double |
getScale()
Indicates the graphic scale as a ratio of the graphics's original size.
|
java.awt.Font |
getTextModifierFont()
Indicates the font used to render text modifiers.
|
Material |
getTextModifierMaterial()
Indicates the material used to render text modifiers.
|
void |
setInteriorMaterial(Material material)
Specifies the material properties of the graphic's interior.
|
void |
setInteriorOpacity(java.lang.Double opacity)
Specifies the opacity of the graphic's interior as a floating-point value in the range 0.0 to 1.0.
|
void |
setOutlineMaterial(Material material)
Specifies the material properties of the graphic's outline.
|
void |
setOutlineOpacity(java.lang.Double opacity)
Specifies the opacity of the graphic's outline as a floating-point value in the range 0.0 to 1.0.
|
void |
setOutlineWidth(java.lang.Double width)
Specifies the line width (in pixels) to use when rendering the graphic's outline.
|
void |
setScale(java.lang.Double scale)
Specifies the graphic scale as a ratio of the graphics's original size.
|
void |
setTextModifierFont(java.awt.Font font)
Specifies the font used to render text modifiers.
|
void |
setTextModifierMaterial(Material material)
Specifies the material used to render text modifiers.
|
protected java.awt.Font font
protected Material interiorMaterial
null
.protected java.lang.Double interiorOpacity
protected Material outlineMaterial
null
.protected java.lang.Double outlineOpacity
protected double outlineWidth
protected java.lang.Double scale
null
to use the symbol's
default scale. Initially null
.protected Material textMaterial
public BasicTacticalGraphicAttributes()
BasicTacticalGraphicAttributes
.public BasicTacticalGraphicAttributes(TacticalGraphicAttributes attributes)
BasicTacticalGraphicAttributes
configured with the specified attributes
.attributes
- the attributes to configure the new BasicTacticalGraphicAttributes
with.java.lang.IllegalArgumentException
- if attributes
is null
.public TacticalGraphicAttributes copy()
copy
in interface TacticalGraphicAttributes
public void copy(TacticalGraphicAttributes attributes)
null
.copy
in interface TacticalGraphicAttributes
attributes
- the attributes to copy.public Material getInteriorMaterial()
setInteriorMaterial
for more information on how this material is interpreted.getInteriorMaterial
in interface TacticalGraphicAttributes
TacticalGraphicAttributes.setInteriorMaterial(Material)
public java.lang.Double getInteriorOpacity()
getInteriorOpacity
in interface TacticalGraphicAttributes
TacticalGraphicAttributes.setInteriorOpacity(Double)
public Material getOutlineMaterial()
setOutlineMaterial
for more information on how this material is interpreted.getOutlineMaterial
in interface TacticalGraphicAttributes
TacticalGraphicAttributes.setOutlineMaterial(Material)
public java.lang.Double getOutlineOpacity()
getOutlineOpacity
in interface TacticalGraphicAttributes
TacticalGraphicAttributes.setOutlineOpacity(Double)
public java.lang.Double getOutlineWidth()
getOutlineWidth
in interface TacticalGraphicAttributes
TacticalGraphicAttributes.setOutlineWidth(Double)
public java.lang.Double getScale()
TacticalGraphicAttributes.setScale(Double)
for a
description of how scale is used.
Scale directly affects the size of point graphics. Line and area graphics do not change size based on the scale,
but if a line or area graphic includes a tactical symbol as part of a composite shape, the scale may be applied
to the symbol.getScale
in interface TacticalGraphicAttributes
null
, indicating that the default scale is used.public java.awt.Font getTextModifierFont()
getTextModifierFont
in interface TacticalGraphicAttributes
public Material getTextModifierMaterial()
setTextModifierMaterial
for a description of how the material is used.getTextModifierMaterial
in interface TacticalGraphicAttributes
public void setInteriorMaterial(Material material)
setInteriorMaterial
in interface TacticalGraphicAttributes
material
- the material to apply to the graphic's interior.TacticalGraphicAttributes.getInteriorMaterial()
public void setInteriorOpacity(java.lang.Double opacity)
setInteriorOpacity
in interface TacticalGraphicAttributes
opacity
- the interior opacity as a floating-point value from 0.0 to 1.0.TacticalGraphicAttributes.getInteriorOpacity()
public void setOutlineMaterial(Material material)
setOutlineMaterial
in interface TacticalGraphicAttributes
material
- the material to apply to the graphic's outline.TacticalGraphicAttributes.getOutlineMaterial()
public void setOutlineOpacity(java.lang.Double opacity)
setOutlineOpacity
in interface TacticalGraphicAttributes
opacity
- the outline opacity as a floating-point value from 0.0 to 1.0.TacticalGraphicAttributes.getOutlineOpacity()
public void setOutlineWidth(java.lang.Double width)
width
must be zero or a positive floating-point value. Specifying a line width of zero disables the
graphic's outline. The width
may be limited by an implementation-defined maximum during rendering.
The maximum width is typically 10 pixels.setOutlineWidth
in interface TacticalGraphicAttributes
width
- the line width in pixels.TacticalGraphicAttributes.getOutlineWidth()
public void setScale(java.lang.Double scale)
null
or greater than or equal to 0.0.
Scale directly affects the size of point graphics. Line and area graphics do not change size based on the scale,
but if a line or area graphic includes a tactical symbol as part of a composite shape, the scale may be applied
to the symbol.setScale
in interface TacticalGraphicAttributes
scale
- the graphic's scale. May be null
, indicating that the default scale should be used.public void setTextModifierFont(java.awt.Font font)
setTextModifierFont
in interface TacticalGraphicAttributes
font
- New font.public void setTextModifierMaterial(Material material)
setTextModifierMaterial
in interface TacticalGraphicAttributes
material
- The new material.