|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartisynth.core.modelbase.ModelComponentBase
artisynth.core.modelbase.RenderableComponentBase
artisynth.core.renderables.TextComponentBase
public abstract class TextComponentBase
Base class for text components, setting font/alignment
Nested Class Summary | |
---|---|
static class |
TextComponentBase.FontStyle
|
static class |
TextComponentBase.HorizontalAlignment
|
static class |
TextComponentBase.VerticalAlignment
|
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent |
---|
ModelComponent.NavpanelVisibility |
Field Summary | |
---|---|
static java.lang.String |
defaultFontName
|
static int |
defaultFontSize
|
static TextComponentBase.HorizontalAlignment |
defaultHAlignment
|
static double |
defaultTextSize
|
static TextComponentBase.VerticalAlignment |
defaultVAlignment
|
static PropertyList |
myProps
|
Fields inherited from class artisynth.core.modelbase.ModelComponentBase |
---|
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames |
Fields inherited from interface maspack.render.GLRenderable |
---|
TRANSLUCENT, TWO_DIMENSIONAL |
Constructor Summary | |
---|---|
TextComponentBase()
|
Method Summary | |
---|---|
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 |
Methods inherited from class artisynth.core.modelbase.RenderableComponentBase |
---|
copy, getRenderHints, getRenderProps, getSelection, prerender, render, setRenderProps, updateBounds, updateRenderProps |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface artisynth.core.modelbase.ModelComponent |
---|
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences |
Methods inherited from interface maspack.properties.HasProperties |
---|
getProperty |
Methods inherited from interface maspack.properties.HierarchyNode |
---|
getChildren, hasChildren |
Methods inherited from interface maspack.util.Scannable |
---|
isWritable, write |
Field Detail |
---|
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
Constructor Detail |
---|
public TextComponentBase()
Method Detail |
---|
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |