public abstract class TextComponentBase extends RenderableComponentBase implements Disposable
Modifier and Type | Class and Description |
---|---|
static class |
TextComponentBase.FontStyle |
static class |
TextComponentBase.HorizontalAlignment |
static class |
TextComponentBase.VerticalAlignment |
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
defaultFontName |
static int |
defaultFontSize |
static TextComponentBase.HorizontalAlignment |
defaultHAlignment |
static double |
defaultTextSize |
static TextComponentBase.VerticalAlignment |
defaultVAlignment |
static PropertyList |
myProps |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSLUCENT, TWO_DIMENSIONAL
Constructor and Description |
---|
TextComponentBase() |
Modifier and Type | Method and Description |
---|---|
static RenderProps |
createDefaultRenderProps() |
RenderProps |
createRenderProps()
Factory method to create render properties appropriate to this object.
|
void |
dispose()
Clears the text renderer object
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
java.lang.String |
getFontFamily()
Returns the font family
|
int |
getFontSize()
Returns the base font size
|
TextComponentBase.FontStyle |
getFontStyle()
Gets font style, BOLD, ITALIC, BOLD_ITALIC, or PLAIN
|
TextComponentBase.HorizontalAlignment |
getHorizontalAlignment()
Gets the horizontal alignment
|
double |
getTextSize()
Gets the size of the text
|
TextComponentBase.VerticalAlignment |
getVerticalAlignment()
Gets the vertical alignment
|
boolean |
isSelectable()
Returns true if this object is in fact selectable.
|
int |
numSelectionQueriesNeeded()
If this selectable manages its own selection (by issuing selection
queries within its
render method), then this method should
return the maximum number of selection queries that will be
required. |
void |
setFont(java.awt.Font font)
Explicitly set the font for this text component
|
void |
setFontFamily(java.lang.String family)
Sets the font family for the displayed text
|
void |
setFontSize(int size)
Sets the font size.
|
void |
setFontStyle(TextComponentBase.FontStyle style)
Sets the font style to be one of
PLAIN, BOLD, ITALIC, BOLD_ITALIC . |
void |
setHorizontalAlignment(TextComponentBase.HorizontalAlignment hAlignment)
Sets the horizontal alignment, one of
LEFT, CENTRE, RIGHT |
void |
setTextColor(java.awt.Color c) |
void |
setTextRenderer(com.jogamp.opengl.util.awt.TextRenderer trenderer)
Explicitly set the text renderer, for advanced
uses only.
|
void |
setTextSize(double size)
Sets the size of the text
|
void |
setVerticalAlignment(TextComponentBase.VerticalAlignment vAlignment)
Sets the vertical alignment, one of
TOP, CENTRE, BOTTOM |
copy, getRenderHints, getRenderProps, getSelection, prerender, render, setRenderProps, updateBounds, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
public static int defaultFontSize
public static double defaultTextSize
public static java.lang.String defaultFontName
public static TextComponentBase.HorizontalAlignment defaultHAlignment
public static TextComponentBase.VerticalAlignment defaultVAlignment
public static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class ModelComponentBase
public static RenderProps createDefaultRenderProps()
public RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
in class RenderableComponentBase
public void setFont(java.awt.Font font)
public void setTextRenderer(com.jogamp.opengl.util.awt.TextRenderer trenderer)
public int getFontSize()
public void setFontSize(int size)
setTextSize(double)
public void setTextSize(double size)
public double getTextSize()
public java.lang.String getFontFamily()
public void setFontFamily(java.lang.String family)
public void setFontStyle(TextComponentBase.FontStyle style)
PLAIN, BOLD, ITALIC, BOLD_ITALIC
.public TextComponentBase.FontStyle getFontStyle()
public TextComponentBase.HorizontalAlignment getHorizontalAlignment()
public void setHorizontalAlignment(TextComponentBase.HorizontalAlignment hAlignment)
LEFT, CENTRE, RIGHT
public TextComponentBase.VerticalAlignment getVerticalAlignment()
public void setVerticalAlignment(TextComponentBase.VerticalAlignment vAlignment)
TOP, CENTRE, BOTTOM
public void dispose()
dispose
in interface Disposable
public boolean isSelectable()
RenderableComponentBase
isSelectable
in interface GLSelectable
isSelectable
in class RenderableComponentBase
public int numSelectionQueriesNeeded()
GLSelectable
render
method), then this method should
return the maximum number of selection queries that will be
required. Otherwise, this method should return -1.numSelectionQueriesNeeded
in interface GLSelectable
numSelectionQueriesNeeded
in class RenderableComponentBase
public void setTextColor(java.awt.Color c)