Package gov.nasa.worldwind.render
Class UserFacingText
- java.lang.Object
-
- gov.nasa.worldwind.render.UserFacingText
-
- All Implemented Interfaces:
GeographicText
- Direct Known Subclasses:
OpenStreetMapShapefileLoader.Label
public class UserFacingText extends java.lang.Object implements GeographicText
-
-
Constructor Summary
Constructors Constructor Description UserFacingText(java.lang.CharSequence text, Position textPosition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.ColorgetBackgroundColor()Indicates the background color used to draw the text.java.awt.ColorgetColor()Indicates the color used to draw the text.java.awt.FontgetFont()Indicates the font used to draw the text.PositiongetPosition()Indicates the geographic position of the text.doublegetPriority()Indicates the text priority.java.lang.CharSequencegetText()Indicates the text contained in this object.booleanisVisible()Indicates whether or not the text is visible.voidsetBackgroundColor(java.awt.Color background)Specifies the background color used to draw the text.voidsetColor(java.awt.Color color)Specifies the color used to draw the text.voidsetFont(java.awt.Font font)Specifies the font used to draw the text.voidsetPosition(Position position)Specifies the geographic position of the text.voidsetPriority(double priority)Specifies the text priority.voidsetText(java.lang.CharSequence text)Specifies the text.voidsetVisible(boolean visible)Specifies whether or not the text is visible.
-
-
-
Constructor Detail
-
UserFacingText
public UserFacingText(java.lang.CharSequence text, Position textPosition)
-
-
Method Detail
-
getText
public java.lang.CharSequence getText()
Description copied from interface:GeographicTextIndicates the text contained in this object.- Specified by:
getTextin interfaceGeographicText- Returns:
- The current text.
-
setText
public void setText(java.lang.CharSequence text)
Description copied from interface:GeographicTextSpecifies the text.- Specified by:
setTextin interfaceGeographicText- Parameters:
text- New text.
-
getPriority
public double getPriority()
Description copied from interface:GeographicTextIndicates the text priority. The priority can be used to implement text culling.- Specified by:
getPriorityin interfaceGeographicText- Returns:
- The text priority.
-
setPriority
public void setPriority(double priority)
Description copied from interface:GeographicTextSpecifies the text priority. The priority can be used to implement text culling.- Specified by:
setPriorityin interfaceGeographicText- Parameters:
priority- New priority.
-
getPosition
public Position getPosition()
Description copied from interface:GeographicTextIndicates the geographic position of the text.- Specified by:
getPositionin interfaceGeographicText- Returns:
- The text position.
-
setPosition
public void setPosition(Position position)
Description copied from interface:GeographicTextSpecifies the geographic position of the text.- Specified by:
setPositionin interfaceGeographicText- Parameters:
position- New text position.
-
getFont
public java.awt.Font getFont()
Description copied from interface:GeographicTextIndicates the font used to draw the text.- Specified by:
getFontin interfaceGeographicText- Returns:
- Current font.
-
setFont
public void setFont(java.awt.Font font)
Description copied from interface:GeographicTextSpecifies the font used to draw the text.- Specified by:
setFontin interfaceGeographicText- Parameters:
font- New font.
-
getColor
public java.awt.Color getColor()
Description copied from interface:GeographicTextIndicates the color used to draw the text.- Specified by:
getColorin interfaceGeographicText- Returns:
- Current text color.
-
setColor
public void setColor(java.awt.Color color)
Description copied from interface:GeographicTextSpecifies the color used to draw the text.- Specified by:
setColorin interfaceGeographicText- Parameters:
color- New color.
-
getBackgroundColor
public java.awt.Color getBackgroundColor()
Description copied from interface:GeographicTextIndicates the background color used to draw the text.- Specified by:
getBackgroundColorin interfaceGeographicText- Returns:
- Current background color.
-
setBackgroundColor
public void setBackgroundColor(java.awt.Color background)
Description copied from interface:GeographicTextSpecifies the background color used to draw the text.- Specified by:
setBackgroundColorin interfaceGeographicText- Parameters:
background- New background color.
-
isVisible
public boolean isVisible()
Description copied from interface:GeographicTextIndicates whether or not the text is visible. The text will not be drawn when the visibility is set tofalse.- Specified by:
isVisiblein interfaceGeographicText- Returns:
trueif the text is visible, otherwisefalse.
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:GeographicTextSpecifies whether or not the text is visible. The text will not be drawn when the visibility is set tofalse.- Specified by:
setVisiblein interfaceGeographicText- Parameters:
visible-trueif the text should be visible.falseif not.
-
-