public class Ilv3DLabel extends Object implements Ilv3DComponent
Constructor and Description |
---|
Ilv3DLabel(double centerLongitude,
double centerLatitude,
double centerElevation,
String text,
Font font)
Constructs an
Ilv3DLabel with the specified parameters. |
Modifier and Type | Method and Description |
---|---|
void |
display(GL2 gl,
Ilv3DCoordinateConverter converter)
Draws this component inside the specified OpenGL GL context object.
|
Color |
getBackgroundColor()
Returns the text color of this component.
|
double |
getCenterElevation()
Returns the elevation of the center of this component.
|
double |
getCenterLatitude()
Returns the latitude of the center of this component.
|
double |
getCenterLongitude()
Returns the longitude of the center of this component.
|
Font |
getFont()
Returns the font used to draw this label component.
|
int |
getHorizontalOffset()
Returns the horizontal offset between the anchor of the label and the text itself.
|
double |
getOutlineWidth()
Returns the width of the outline of the label (used only when this mode is activated).
|
String |
getText()
Returns the text of this label component.
|
Color |
getTextColor()
Returns the text color of this component.
|
int |
getVerticalOffset()
Returns the vertical offset between the anchor of the label and the text itself.
|
boolean |
isDrawLabelOutline()
Returns whether the outline of the label is drawn or not.
|
boolean |
isOpaqueLabelBackground()
Returns whether the rectangular background of the label should be opaque or not.
|
boolean |
isUseTextAntialiasing()
Returns whether the text is drawn using antialiasing or not.
|
void |
setBackgroundColor(Color color)
Sets the text color of this component.
|
void |
setDrawLabelOutline(boolean drawLabelOutline)
Sets whether the outline of the label is drawn or not.
|
void |
setFont(Font font)
Sets the font used to draw this label component.
|
void |
setHorizontalOffset(int horizontalOffset)
Sets the horizontal offset between the anchor of the label and the text itself.
|
void |
setOpaqueLabelBackground(boolean opaqueLabelBackground)
Sets whether the rectangular background of the label should be opaque or not.
|
void |
setOutlineWidth(double outlineWidth)
Sets the width of the outline of the label (used only when this mode is activated).
|
void |
setText(String text)
Sets the text of this label component.
|
void |
setTextColor(Color color)
Sets the text color of this component.
|
void |
setUseTextAntialiasing(boolean useTextAntialiasing)
Sets whether the text is drawn using antialiasing or not.
|
void |
setVerticalOffset(int verticalOffset)
Sets the vertical offset between the anchor of the label and the text itself.
|
public Ilv3DLabel(double centerLongitude, double centerLatitude, double centerElevation, String text, Font font)
Ilv3DLabel
with the specified parameters.centerLongitude
- The longitude of the anchor point of the label in radians.centerLatitude
- The latitude of the anchor point of the label in radians.centerElevation
- The altitude of the anchor point of hte label in meters.text
- The text to display.font
- The font used to draw the label.public double getCenterLongitude()
getCenterLongitude
in interface Ilv3DComponent
public double getCenterLatitude()
getCenterLatitude
in interface Ilv3DComponent
public double getCenterElevation()
getCenterElevation
in interface Ilv3DComponent
public Color getTextColor()
java.awt.Color
of this component.public void setTextColor(Color color)
color
- The java.awt.Color
to set.public Color getBackgroundColor()
java.awt.Color
of this component.public void setBackgroundColor(Color color)
color
- The java.awt.Color
to set.public Font getFont()
public void setFont(Font font)
font
- The font used to draw this label component.public String getText()
public void setText(String text)
text
- The text to used to draw this label component.public void display(GL2 gl, Ilv3DCoordinateConverter converter)
Ilv3DCoordinateConverter
provided.display
in interface Ilv3DComponent
gl
- The OpenGL context.converter
- The Ilv3DCoordinateConverter
from geographic coordinates to 3D coordinates.Ilv3DCoordinateConverter
public boolean isOpaqueLabelBackground()
true
, the background is filled.public void setOpaqueLabelBackground(boolean opaqueLabelBackground)
opaqueLabelBackground
- If true
, the background is filled.public boolean isUseTextAntialiasing()
true
, the text is drawn using antialiasing.public void setUseTextAntialiasing(boolean useTextAntialiasing)
useTextAntialiasing
- If true
, the text is drawn using antialiasing.public boolean isDrawLabelOutline()
true
, the outline of the label is drawn.public void setDrawLabelOutline(boolean drawLabelOutline)
drawLabelOutline
- If true
, the label's outline is drawn.public double getOutlineWidth()
public void setOutlineWidth(double outlineWidth)
outlineWidth
- The width of the outline of the label.public int getHorizontalOffset()
public void setHorizontalOffset(int horizontalOffset)
horizontalOffset
- The horizontal offset in pixels.public int getVerticalOffset()
public void setVerticalOffset(int verticalOffset)
verticalOffset
- The vertical offset in pixels.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.