Package com.openinventor.meshviz.graph
Class PbMiscTextAttr
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.meshviz.graph.PbBase
com.openinventor.meshviz.graph.PbMiscTextAttr
- All Implemented Interfaces:
Cloneable
Class to define a numeric display format.
This class is used to define miscellaneous text attributes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
void
enablePredefinedProfile
(boolean flag) void
enableProfile
(boolean flag) Gets the font name for texts.Gets line length attributes.boolean
Enables/Disables the use of a predefined profile for 3D text if they are activated (cfenableProfile()
).boolean
Enables/Disables the appearance of a profile for 3D Text.void
setFontName
(String name) Sets the font name for texts.void
setLineLength
(byte endLineChar, int lineLength) Sets line length attributes.Methods inherited from class com.openinventor.meshviz.graph.PbBase
enableConnection, isConnectionEnabled, touch
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
PbMiscTextAttr
-
PbMiscTextAttr
public PbMiscTextAttr()
-
-
Method Details
-
clone
-
getLineLength
Gets line length attributes. -
isPredefinedProfileEnabled
public boolean isPredefinedProfileEnabled()Enables/Disables the use of a predefined profile for 3D text if they are activated (cfenableProfile()
). If this option is disabled, the current profile in the state is used (cfSoLinearProfile
,...) This option is enabled by default. -
setFontName
Sets the font name for texts. The default font name is "defaultFont". -
enablePredefinedProfile
public void enablePredefinedProfile(boolean flag) -
getFontName
Gets the font name for texts. -
enableProfile
public void enableProfile(boolean flag) -
isProfileEnabled
public boolean isProfileEnabled()Enables/Disables the appearance of a profile for 3D Text. OnlySoText3
text takes into account of this option (cfPoBase.setTextType()
) to to select the type of text used). This option is disabled by default. -
setLineLength
public void setLineLength(byte endLineChar, int lineLength) Sets line length attributes. lineLength is the max number of characters per line. If several endLineChar appear before the lineLength character, only the last endLineChar is taken into account. if lineLength = LINE_LENGTH_MAX, the lines length is not limited, and if lineLength = LINE_LENGTH_MIN, the lines are limited to one word. By default endLineChar is ' ' and lineLength is LINE_LENGTH_MAX.Example of use with the string "United States of America" (24 characters) :
- with endLineChar = ' ' and lineLength = 15, the string is cut into two lines: "United States" and "of America".
- with endLineChar = ' ' and lineLength = 18, the string is cut into two lines: "United States of" and "America".
Be careful, words (consecutive characters delimited by endLineChar characters) are never truncated, so lines could exceed lineLength characters if the first word of the line contains more than lineLength characters.
-