public class LabelInfo extends BaseInfo
Modifier and Type | Class and Description |
---|---|
static class |
LabelInfo.TextJustify
Justification values for text.
|
Modifier and Type | Field and Description |
---|---|
java.lang.String |
fontName |
static int |
LabelPriorityDefault
Default priority for labels.
|
static int |
LayoutAbove |
static int |
LayoutBelow |
static int |
LayoutCenter |
float |
layoutImportance |
static int |
LayoutLeft |
static int |
LayoutNone |
int |
layoutPlacement |
static int |
LayoutRight |
disposeAfterUse, nativeHandle
Constructor and Description |
---|
LabelInfo() |
Modifier and Type | Method and Description |
---|---|
void |
finalize() |
int |
getBackgroundColor()
Return the background text color in a form suitable for Android.
|
float |
getFontSize() |
int |
getOutlineColor()
Return the outline color in a form suitable for Android.
|
float |
getOutlineSize()
Return the outline size
|
int |
getTextColor()
Return the text color in a form suitable for Android.
|
android.graphics.Typeface |
getTypeface()
Return the typeface used for the labels.
|
void |
setBackgroundColor(float r,
float g,
float b,
float a)
Set the background color of text.
|
void |
setBackgroundColor(int color)
Set the background color from a standard Android Color value.
|
void |
setFontSize(float size)
Set the font size for the text.
|
void |
setLayoutImportance(float newImport)
The layout engine controls how text is displayed.
|
void |
setLayoutPlacement(int newPlacement)
The layout placement controls where we can put the label relative to
its point.
|
void |
setOutlineColor(float r,
float g,
float b,
float a)
Set the color of outline.
|
void |
setOutlineColor(int color)
Set the color of the outline.
|
void |
setOutlineSize(float size)
Set the outline size for the text.
|
void |
setShadowColor(float r,
float g,
float b,
float a)
Set the color of shadow.
|
void |
setShadowColor(int color)
Set the color of the shadow.
|
void |
setShadowSize(float size)
Set the shadow size for the text.
|
void |
setTextColor(float r,
float g,
float b,
float a)
Set the text color as float values from 0.0 to 1.0
|
void |
setTextColor(int color)
Set the text color from a standard Android Color value.
|
void |
setTextJustify(LabelInfo.TextJustify textJustify)
For multi-line labels, you can justify the text to the left, right or center.
|
void |
setTypeface(android.graphics.Typeface typeface)
Set the typeface used in the text.
|
getDrawOffset, getDrawPriority, getEnable, getFadeIn, getFadeOut, getFadeOutTime, getShaderID, getViewDistRangeMax, getViewDistRangeMin, getViewerCenter, getVisibleHeightMax, getVisibleHeightMin, setDrawOffset, setDrawPriority, setEnable, setEnableTimes, setFade, setFadeInOut, setFadeOutTime, setMaxVis, setMinVis, setRenderTarget, setShader, setShaderID, setViewDistRange, setViewerCenter, setVisibleHeightRange, setZBufferRead, setZBufferWrite
public static int LabelPriorityDefault
public java.lang.String fontName
public float layoutImportance
public static int LayoutNone
public static int LayoutCenter
public static int LayoutRight
public static int LayoutLeft
public static int LayoutAbove
public static int LayoutBelow
public int layoutPlacement
public void finalize()
finalize
in class java.lang.Object
public void setTextColor(int color)
color
- Color value, including alpha.public int getTextColor()
public void setTextColor(float r, float g, float b, float a)
r
- redg
- greenb
- bluea
- alphapublic void setBackgroundColor(int color)
color
- Color value, including alpha.public void setBackgroundColor(float r, float g, float b, float a)
r
- redg
- greenb
- bluea
- alphapublic int getBackgroundColor()
public void setTypeface(android.graphics.Typeface typeface)
public android.graphics.Typeface getTypeface()
public void setFontSize(float size)
public float getFontSize()
public void setOutlineColor(float r, float g, float b, float a)
r
- redg
- greenb
- bluea
- alphapublic int getOutlineColor()
public void setOutlineColor(int color)
public void setOutlineSize(float size)
public float getOutlineSize()
public void setShadowColor(float r, float g, float b, float a)
r
- redg
- greenb
- bluea
- alphapublic void setShadowColor(int color)
public void setShadowSize(float size)
public void setLayoutPlacement(int newPlacement)
public void setLayoutImportance(float newImport)
Defaults to MAXFLOAT, which is off. That means the layout engine does not control the associated labels.
public void setTextJustify(LabelInfo.TextJustify textJustify)