public class TextOverlay extends EarthDataOverlay
TextOverlay
class may be used to render a list of
text annotation elements.alpha, lastTrans, prepared
Constructor and Description |
---|
TextOverlay(java.awt.Color color)
Creates a new text overlay with the specified color.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(TextElement element)
Adds a new text element to the list.
|
protected void |
draw(java.awt.Graphics2D g,
EarthDataView view)
Draws the overlay graphics.
|
java.util.Iterator |
getElementIterator()
Gets an iterator over the list of text elements.
|
java.awt.Font |
getFont()
Gets the text font.
|
boolean |
getTextDropShadow()
Gets the text drop shadow flag.
|
protected boolean |
needsPrepare()
Returns false as this class needs no preparation.
|
protected void |
prepare(java.awt.Graphics2D g,
EarthDataView view)
Prepares the overlay graphics prior to drawing.
|
void |
removeElement(TextElement element)
Removes an element from the list.
|
void |
setFont(java.awt.Font font)
Sets the text font.
|
void |
setTextDropShadow(boolean flag)
Sets the text drop shadow flag.
|
clone, compareTo, getAlphaVersion, getColor, getColors, getColorWithAlpha, getLayer, getMetadataAtPoint, getName, getTransparency, getVisible, hasMetadata, invalidate, isPrepared, render, setColor, setLayer, setName, setTransparency, setVisible
public TextOverlay(java.awt.Color color)
public boolean getTextDropShadow()
public void setTextDropShadow(boolean flag)
public void setFont(java.awt.Font font)
public java.awt.Font getFont()
public void addElement(TextElement element)
element
- the new text element to add to the list.public java.util.Iterator getElementIterator()
public void removeElement(TextElement element)
element
- the element to remove from the list.protected boolean needsPrepare()
needsPrepare
in class EarthDataOverlay
protected void prepare(java.awt.Graphics2D g, EarthDataView view)
EarthDataOverlay
prepare
in class EarthDataOverlay
g
- the graphics object for drawing.view
- the earth data view.protected void draw(java.awt.Graphics2D g, EarthDataView view)
EarthDataOverlay
draw
in class EarthDataOverlay
g
- the graphics object for drawing.view
- the earth data view.