public class TextLabeller3d extends TextComponentBase
TextComponentBase.HorizontalAlignment, TextComponentBase.VerticalAlignment
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static boolean |
defaultByReference |
static Point2d |
defaultTextOffset |
static double |
defaultTextSize |
static PropertyList |
myProps |
defaultFont, defaultFontName, defaultFontSize, defaultHAlignment, defaultVAlignment
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
TextLabeller3d() |
TextLabeller3d(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
int |
addItem(java.lang.String text,
Point3d pos,
AffineTransform3dBase trans,
boolean byRef)
Adds a label to draw
|
int |
addItem(java.lang.String text,
Point3d pos,
boolean byRef)
Adds a label to draw
|
void |
clearItems()
Clears all text items
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
int |
getRenderHints()
Returns a bit code giving rendering hints about this renderable.
|
Point2d |
getTextOffset()
Sets space to add to the left/bottom
|
double |
getTextSize()
Returns the text scaling
|
boolean |
isSelectable()
Returns true if this object is in fact selectable.
|
void |
labelPoints(java.util.List<? extends Point> pnts) |
void |
labelPoints(PointList<? extends Point> pnts) |
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. |
boolean |
removeItem(int id)
Removes a label based on its ID number
|
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
void |
setTextOffset(double xOffset,
double yOffset) |
void |
setTextOffset(Point2d offset)
Sets space to add to the left/bottom
|
createRenderProps, getFont, getHorizontalAlignment, getVerticalAlignment, setFont, setHorizontalAlignment, setTextColor, setTextSize, setVerticalAlignment
copy, defaultRenderPropsAreNull, getRenderProps, getSelection, isVisible, prerender, setRenderProps, setVisible, 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, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
postscan
isWritable, write
public static double defaultTextSize
public static Point2d defaultTextOffset
public static boolean defaultByReference
public static PropertyList myProps
public TextLabeller3d()
public TextLabeller3d(java.lang.String name)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class TextComponentBase
public void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
render
in class RenderableComponentBase
renderer
- provides the functionality used to perform the rendering.flags
- flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT
and
Renderer.SORT_FACES
.public int getRenderHints()
IsRenderable
TRANSPARENT
and
TWO_DIMENSIONAL
.getRenderHints
in interface IsRenderable
getRenderHints
in class RenderableComponentBase
public double getTextSize()
getTextSize
in class TextComponentBase
public void setTextOffset(Point2d offset)
public void setTextOffset(double xOffset, double yOffset)
public Point2d getTextOffset()
public int addItem(java.lang.String text, Point3d pos, boolean byRef)
text
- text to displaypos
- position of text in 3D worldbyRef
- if true, sets the point by referencepublic int addItem(java.lang.String text, Point3d pos, AffineTransform3dBase trans, boolean byRef)
text
- text to displaypos
- position of text in 3D worldtrans
- transform to apply to position when renderingbyRef
- if true, sets the point/transform by referencepublic boolean removeItem(int id)
public void clearItems()
public void labelPoints(java.util.List<? extends Point> pnts)
public boolean isSelectable()
RenderableComponentBase
isSelectable
in interface IsSelectable
isSelectable
in class TextComponentBase
public int numSelectionQueriesNeeded()
IsSelectable
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 IsSelectable
numSelectionQueriesNeeded
in class TextComponentBase