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:
java.lang.Cloneable
public class PbMiscTextAttr extends PbBase implements java.lang.Cloneable
Class to define a numeric display format. This class is used to define miscellaneous text attributes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PbMiscTextAttr.LineLength
static class
PbMiscTextAttr.LineLengths
-
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 Constructor Description PbMiscTextAttr()
PbMiscTextAttr(PbMiscTextAttr miscTextAttr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
void
enablePredefinedProfile(boolean flag)
void
enableProfile(boolean flag)
java.lang.String
getFontName()
Gets the font name for texts.PbMiscTextAttr.LineLength
getLineLength()
Gets line length attributes.boolean
isPredefinedProfileEnabled()
Enables/Disables the use of a predefined profile for 3D text if they are activated (cfenableProfile()
).boolean
isProfileEnabled()
Enables/Disables the appearance of a profile for 3D Text.void
setFontName(java.lang.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 Detail
-
PbMiscTextAttr
public PbMiscTextAttr(PbMiscTextAttr miscTextAttr)
-
PbMiscTextAttr
public PbMiscTextAttr()
-
-
Method Detail
-
clone
public java.lang.Object clone()
-
getLineLength
public PbMiscTextAttr.LineLength 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
public void setFontName(java.lang.String name)
Sets the font name for texts. The default font name is "defaultFont".
-
enablePredefinedProfile
public void enablePredefinedProfile(boolean flag)
-
getFontName
public java.lang.String 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.
-
-