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.Color
getBackgroundColor()
Indicates the background color used to draw the text.java.awt.Color
getColor()
Indicates the color used to draw the text.java.awt.Font
getFont()
Indicates the font used to draw the text.Position
getPosition()
Indicates the geographic position of the text.double
getPriority()
Indicates the text priority.java.lang.CharSequence
getText()
Indicates the text contained in this object.boolean
isVisible()
Indicates whether or not the text is visible.void
setBackgroundColor(java.awt.Color background)
Specifies the background color used to draw the text.void
setColor(java.awt.Color color)
Specifies the color used to draw the text.void
setFont(java.awt.Font font)
Specifies the font used to draw the text.void
setPosition(Position position)
Specifies the geographic position of the text.void
setPriority(double priority)
Specifies the text priority.void
setText(java.lang.CharSequence text)
Specifies the text.void
setVisible(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:GeographicText
Indicates the text contained in this object.- Specified by:
getText
in interfaceGeographicText
- Returns:
- The current text.
-
setText
public void setText(java.lang.CharSequence text)
Description copied from interface:GeographicText
Specifies the text.- Specified by:
setText
in interfaceGeographicText
- Parameters:
text
- New text.
-
getPriority
public double getPriority()
Description copied from interface:GeographicText
Indicates the text priority. The priority can be used to implement text culling.- Specified by:
getPriority
in interfaceGeographicText
- Returns:
- The text priority.
-
setPriority
public void setPriority(double priority)
Description copied from interface:GeographicText
Specifies the text priority. The priority can be used to implement text culling.- Specified by:
setPriority
in interfaceGeographicText
- Parameters:
priority
- New priority.
-
getPosition
public Position getPosition()
Description copied from interface:GeographicText
Indicates the geographic position of the text.- Specified by:
getPosition
in interfaceGeographicText
- Returns:
- The text position.
-
setPosition
public void setPosition(Position position)
Description copied from interface:GeographicText
Specifies the geographic position of the text.- Specified by:
setPosition
in interfaceGeographicText
- Parameters:
position
- New text position.
-
getFont
public java.awt.Font getFont()
Description copied from interface:GeographicText
Indicates the font used to draw the text.- Specified by:
getFont
in interfaceGeographicText
- Returns:
- Current font.
-
setFont
public void setFont(java.awt.Font font)
Description copied from interface:GeographicText
Specifies the font used to draw the text.- Specified by:
setFont
in interfaceGeographicText
- Parameters:
font
- New font.
-
getColor
public java.awt.Color getColor()
Description copied from interface:GeographicText
Indicates the color used to draw the text.- Specified by:
getColor
in interfaceGeographicText
- Returns:
- Current text color.
-
setColor
public void setColor(java.awt.Color color)
Description copied from interface:GeographicText
Specifies the color used to draw the text.- Specified by:
setColor
in interfaceGeographicText
- Parameters:
color
- New color.
-
getBackgroundColor
public java.awt.Color getBackgroundColor()
Description copied from interface:GeographicText
Indicates the background color used to draw the text.- Specified by:
getBackgroundColor
in interfaceGeographicText
- Returns:
- Current background color.
-
setBackgroundColor
public void setBackgroundColor(java.awt.Color background)
Description copied from interface:GeographicText
Specifies the background color used to draw the text.- Specified by:
setBackgroundColor
in interfaceGeographicText
- Parameters:
background
- New background color.
-
isVisible
public boolean isVisible()
Description copied from interface:GeographicText
Indicates whether or not the text is visible. The text will not be drawn when the visibility is set tofalse
.- Specified by:
isVisible
in interfaceGeographicText
- Returns:
true
if the text is visible, otherwisefalse
.
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:GeographicText
Specifies whether or not the text is visible. The text will not be drawn when the visibility is set tofalse
.- Specified by:
setVisible
in interfaceGeographicText
- Parameters:
visible
-true
if the text should be visible.false
if not.
-
-