Java Doc for Text3D.java in  » 6.0-JDK-Modules » java-3d » javax » media » j3d » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » javax.media.j3d 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.j3d.SceneGraphObject
      javax.media.j3d.NodeComponent
         javax.media.j3d.Geometry
            javax.media.j3d.Text3D

Text3D
public class Text3D extends Geometry (Code)
A Text3D object is a text string that has been converted to 3D geometry. The Font3D object determines the appearance of the Text3D NodeComponent object. Each Text3D object has the following parameters:

  • Font3D object - describes the font style of the text string, such as the font family (Helvetica, Courier, etc.), style (Italic, bold, etc.), and point size. The size of the resulting characters will be equal to the point size. For example, a 12 point font will result in a Font3D with characters 12 meters tall.
  • Text string - the text string to be written.
  • Position - determines the initial placement of the Text3D string in three-space.
  • Alignment - specifies how glyphs in the string are placed in relation to the position parameter. Valid values are:
    • ALIGN_CENTER - the center of the string is placed on the position point.
    • ALIGN_FIRST - the first character of the string is placed on the position point.
    • ALIGN_LAST - the last character of the string is placed on the position point.

  • Path - specifies how succeeding glyphs in the string are placed in relation to the previous glyph. Valid values are:
    • PATH_LEFT - succeeding glyphs are placed to the left of the current glyph.
    • PATH_RIGHT - succeeding glyphs are placed to the right of the current glyph.
    • PATH_UP - succeeding glyphs are placed above the current glyph.
    • PATH_DOWN - succeeding glyphs are placed below the current glyph.

  • Character spacing - the space between characters. This spacing is in addition to the regular spacing between glyphs as defined in the Font object.


See Also:   Font3D



Field Summary
final public static  intALIGN_CENTER
     alignment: the center of the string is placed on the position point.
final public static  intALIGN_FIRST
     alignment: the first character of the string is placed on the position point.
final public static  intALIGN_LAST
     alignment: the last character of the string is placed on the position point.
final public static  intALLOW_ALIGNMENT_READ
     Specifies that this Text3D object allows reading the text alignment value.
final public static  intALLOW_ALIGNMENT_WRITE
     Specifies that this Text3D object allows writing the text alignment value.
final public static  intALLOW_BOUNDING_BOX_READ
    
final public static  intALLOW_CHARACTER_SPACING_READ
     Specifies that this Text3D object allows reading the text character spacing value.
final public static  intALLOW_CHARACTER_SPACING_WRITE
     Specifies that this Text3D object allows writing the text character spacing value.
final public static  intALLOW_FONT3D_READ
     Specifies that this Text3D object allows reading the Font3D component information.
final public static  intALLOW_FONT3D_WRITE
     Specifies that this Text3D object allows writing the Font3D component information.
final public static  intALLOW_PATH_READ
     Specifies that this Text3D object allows reading the text path value.
final public static  intALLOW_PATH_WRITE
     Specifies that this Text3D object allows writing the text path value.
final public static  intALLOW_POSITION_READ
     Specifies that this Text3D object allows reading the text position value.
final public static  intALLOW_POSITION_WRITE
     Specifies that this Text3D object allows writing the text position value.
final public static  intALLOW_STRING_READ
     Specifies that this Text3D object allows reading the String object.
final public static  intALLOW_STRING_WRITE
     Specifies that this Text3D object allows writing the String object.
final public static  intPATH_DOWN
     path: succeeding glyphs are placed below the current glyph.
final public static  intPATH_LEFT
     path: succeeding glyphs are placed to the left of the current glyph.
final public static  intPATH_RIGHT
     path: succeeding glyphs are placed to the left of the current glyph.
final public static  intPATH_UP
     path: succeeding glyphs are placed above the current glyph.

Constructor Summary
public  Text3D()
     Constructs a Text3D object with default parameters.
public  Text3D(Font3D font3D)
     Creates a Text3D object with the given Font3D object.
public  Text3D(Font3D font3D, String string)
     Creates a Text3D object given a Font3D object and a string.
public  Text3D(Font3D font3D, String string, Point3f position)
     Creates a Text3D object given a Font3D, a string and position.
public  Text3D(Font3D font3D, String string, Point3f position, int alignment, int path)
     Creates a Text3D object given a Font3D, string, position, alignment and path along which string is to be placed.

Method Summary
public  NodeComponentcloneNodeComponent()
    
 voidcreateRetained()
     Creates the retained mode Text3DRetained object that this Text3D component object will point to.
 voidduplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)
     Copies all node information from originalNodeComponent into the current node.
public  intgetAlignment()
     Retrieves the text alignment policy for this Text3D NodeComponent object.
public  voidgetBoundingBox(BoundingBox bounds)
     Retrieves the 3D bounding box that encloses this Text3D object.
public  floatgetCharacterSpacing()
     Retrieves the character spacing used to construct the Text3D string. This spacing is in addition to the regular spacing between glyphs as defined in the Font object.
public  Font3DgetFont3D()
     Returns the Font3D objects used by this Text3D NodeComponent object.
public  intgetPath()
     Retrieves the node's path field.
public  voidgetPosition(Point3f position)
     Copies the node's position field into the supplied parameter.
public  StringgetString()
     Copies the character string used in the construction of the Text3D node into the supplied parameter.
public  voidsetAlignment(int alignment)
     Sets the text alignment policy for this Text3D NodeComponent object.
public  voidsetCharacterSpacing(float characterSpacing)
     Sets the character spacing used when constructing the Text3D string. This spacing is in addition to the regular spacing between glyphs as defined in the Font object.
public  voidsetFont3D(Font3D font3d)
     Sets the Font3D object used by this Text3D NodeComponent object.
public  voidsetPath(int path)
     Sets the node's path field.
public  voidsetPosition(Point3f position)
     Sets the node's position field to the supplied parameter.
public  voidsetString(String string)
     Copies the character string from the supplied parameter into the Text3D node.

Field Detail
ALIGN_CENTER
final public static int ALIGN_CENTER(Code)
alignment: the center of the string is placed on the position point.
See Also:   Text3D.getAlignment



ALIGN_FIRST
final public static int ALIGN_FIRST(Code)
alignment: the first character of the string is placed on the position point.
See Also:   Text3D.getAlignment



ALIGN_LAST
final public static int ALIGN_LAST(Code)
alignment: the last character of the string is placed on the position point.
See Also:   Text3D.getAlignment



ALLOW_ALIGNMENT_READ
final public static int ALLOW_ALIGNMENT_READ(Code)
Specifies that this Text3D object allows reading the text alignment value.



ALLOW_ALIGNMENT_WRITE
final public static int ALLOW_ALIGNMENT_WRITE(Code)
Specifies that this Text3D object allows writing the text alignment value.



ALLOW_BOUNDING_BOX_READ
final public static int ALLOW_BOUNDING_BOX_READ(Code)
Specifies that this Text3D object allows reading the text string bounding box value



ALLOW_CHARACTER_SPACING_READ
final public static int ALLOW_CHARACTER_SPACING_READ(Code)
Specifies that this Text3D object allows reading the text character spacing value.



ALLOW_CHARACTER_SPACING_WRITE
final public static int ALLOW_CHARACTER_SPACING_WRITE(Code)
Specifies that this Text3D object allows writing the text character spacing value.



ALLOW_FONT3D_READ
final public static int ALLOW_FONT3D_READ(Code)
Specifies that this Text3D object allows reading the Font3D component information.
See Also:   Font3D



ALLOW_FONT3D_WRITE
final public static int ALLOW_FONT3D_WRITE(Code)
Specifies that this Text3D object allows writing the Font3D component information.
See Also:   Font3D



ALLOW_PATH_READ
final public static int ALLOW_PATH_READ(Code)
Specifies that this Text3D object allows reading the text path value.



ALLOW_PATH_WRITE
final public static int ALLOW_PATH_WRITE(Code)
Specifies that this Text3D object allows writing the text path value.



ALLOW_POSITION_READ
final public static int ALLOW_POSITION_READ(Code)
Specifies that this Text3D object allows reading the text position value.



ALLOW_POSITION_WRITE
final public static int ALLOW_POSITION_WRITE(Code)
Specifies that this Text3D object allows writing the text position value.



ALLOW_STRING_READ
final public static int ALLOW_STRING_READ(Code)
Specifies that this Text3D object allows reading the String object.



ALLOW_STRING_WRITE
final public static int ALLOW_STRING_WRITE(Code)
Specifies that this Text3D object allows writing the String object.



PATH_DOWN
final public static int PATH_DOWN(Code)
path: succeeding glyphs are placed below the current glyph.
See Also:   Text3D.getPath



PATH_LEFT
final public static int PATH_LEFT(Code)
path: succeeding glyphs are placed to the left of the current glyph.
See Also:   Text3D.getPath



PATH_RIGHT
final public static int PATH_RIGHT(Code)
path: succeeding glyphs are placed to the left of the current glyph.
See Also:   Text3D.getPath



PATH_UP
final public static int PATH_UP(Code)
path: succeeding glyphs are placed above the current glyph.
See Also:   Text3D.getPath




Constructor Detail
Text3D
public Text3D()(Code)
Constructs a Text3D object with default parameters. The default values are as follows:
    font 3D : null
    string : null
    position : (0,0,0)
    alignment : ALIGN_FIRST
    path : PATH_RIGHT
    character spacing : 0.0



Text3D
public Text3D(Font3D font3D)(Code)
Creates a Text3D object with the given Font3D object.
See Also:   Font3D



Text3D
public Text3D(Font3D font3D, String string)(Code)
Creates a Text3D object given a Font3D object and a string. The string is converted into 3D glyphs. The first glyph from the string is placed at (0.0, 0.0, 0.0) and succeeding glyphs are placed to the right of the initial glyph.
See Also:   Font3D



Text3D
public Text3D(Font3D font3D, String string, Point3f position)(Code)
Creates a Text3D object given a Font3D, a string and position. The string is converted into 3D glyphs. The first glyph from the string is placed at position position and succeeding glyphs are placed to the right of the initial glyph.
See Also:   Font3D



Text3D
public Text3D(Font3D font3D, String string, Point3f position, int alignment, int path)(Code)
Creates a Text3D object given a Font3D, string, position, alignment and path along which string is to be placed. The string is converted into 3D glyphs. The placement of the glyphs with respect to the position position depends on the alignment parameter and the path parameter.
See Also:   Font3D




Method Detail
cloneNodeComponent
public NodeComponent cloneNodeComponent()(Code)



createRetained
void createRetained()(Code)
Creates the retained mode Text3DRetained object that this Text3D component object will point to.



duplicateAttributes
void duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)(Code)
Copies all node information from originalNodeComponent into the current node. This method is called from the duplicateNode method. This routine does the actual duplication of all "local data" (any data defined in this object).
Parameters:
  originalNodeComponent - the original node to duplicate.
Parameters:
  forceDuplicate - when set to true, causes theduplicateOnCloneTree flag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied.
See Also:   Node.cloneTree
See Also:   NodeComponent.setDuplicateOnCloneTree



getAlignment
public int getAlignment()(Code)
Retrieves the text alignment policy for this Text3D NodeComponent object. The alignment is used to specify how glyphs in the string are placed in relation to the position field. Valid values for this field are:
  • ALIGN_CENTER - the center of the string is placed on the position point.
  • ALIGN_FIRST - the first character of the string is placed on the position point.
  • ALIGN_LAST - the last character of the string is placed on the position point.
The default value of this field is ALIGN_FIRST. the current alingment policy for this node.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
See Also:   Text3D.getPosition



getBoundingBox
public void getBoundingBox(BoundingBox bounds)(Code)
Retrieves the 3D bounding box that encloses this Text3D object.
Parameters:
  bounds - the object to copy the bounding information to.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
See Also:   BoundingBox



getCharacterSpacing
public float getCharacterSpacing()(Code)
Retrieves the character spacing used to construct the Text3D string. This spacing is in addition to the regular spacing between glyphs as defined in the Font object. 1.0 in this space is measured as the width of the largest glyph in the 2D Font. The default value is 0.0. the current character spacing value
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getFont3D
public Font3D getFont3D()(Code)
Returns the Font3D objects used by this Text3D NodeComponent object. the Font3D object of this Text3D node - null if no Font3Dhas been associated with this node.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getPath
public int getPath()(Code)
Retrieves the node's path field. This field is used to specify how succeeding glyphs in the string are placed in relation to the previous glyph. Valid values for this field are:
  • PATH_LEFT: - succeeding glyphs are placed to the left of the current glyph.
  • PATH_RIGHT: - succeeding glyphs are placed to the right of the current glyph.
  • PATH_UP: - succeeding glyphs are placed above the current glyph.
  • PATH_DOWN: - succeeding glyphs are placed below the current glyph.
The default value of this field is PATH_RIGHT. the current alingment policy for this node.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getPosition
public void getPosition(Point3f position)(Code)
Copies the node's position field into the supplied parameter. The position is used to determine the initial placement of the Text3D string. The position, combined with the path and alignment control how the text is displayed.
Parameters:
  position - the point to position the text.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
See Also:   Text3D.getAlignment
See Also:   Text3D.getPath



getString
public String getString()(Code)
Copies the character string used in the construction of the Text3D node into the supplied parameter. a copy of the String object in this Text3D node.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setAlignment
public void setAlignment(int alignment)(Code)
Sets the text alignment policy for this Text3D NodeComponent object. The alignment is used to specify how glyphs in the string are placed in relation to the position field. Valid values for this field are:
  • ALIGN_CENTER - the center of the string is placed on the position point.
  • ALIGN_FIRST - the first character of the string is placed on the position point.
  • ALIGN_LAST - the last character of the string is placed on the position point.
The default value of this field is ALIGN_FIRST.
Parameters:
  alignment - specifies how glyphs in the string are placedin relation to the position field
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
See Also:   Text3D.getPosition



setCharacterSpacing
public void setCharacterSpacing(float characterSpacing)(Code)
Sets the character spacing used when constructing the Text3D string. This spacing is in addition to the regular spacing between glyphs as defined in the Font object. 1.0 in this space is measured as the width of the largest glyph in the 2D Font. The default value is 0.0.
Parameters:
  characterSpacing - the new character spacing value
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setFont3D
public void setFont3D(Font3D font3d)(Code)
Sets the Font3D object used by this Text3D NodeComponent object.
Parameters:
  font3d - the Font3D object to associate with this Text3D node.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setPath
public void setPath(int path)(Code)
Sets the node's path field. This field is used to specify how succeeding glyphs in the string are placed in relation to the previous glyph. Valid values for this field are:
  • PATH_LEFT - succeeding glyphs are placed to the left of the current glyph.
  • PATH_RIGHT - succeeding glyphs are placed to the right of the current glyph.
  • PATH_UP - succeeding glyphs are placed above the current glyph.
  • PATH_DOWN - succeeding glyphs are placed below the current glyph.
The default value of this field is PATH_RIGHT.
Parameters:
  path - the value to set the path to
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setPosition
public void setPosition(Point3f position)(Code)
Sets the node's position field to the supplied parameter. The position is used to determine the initial placement of the Text3D string. The position, combined with the path and alignment control how the text is displayed.
Parameters:
  position - the point to position the text.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
See Also:   Text3D.getAlignment
See Also:   Text3D.getPath



setString
public void setString(String string)(Code)
Copies the character string from the supplied parameter into the Text3D node.
Parameters:
  string - the String object to recieve the Text3D node's string.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



Fields inherited from javax.media.j3d.Geometry
final public static int ALLOW_INTERSECT(Code)(Java Doc)


Fields inherited from javax.media.j3d.NodeComponent
boolean forceDuplicate(Code)(Java Doc)

Methods inherited from javax.media.j3d.NodeComponent
final void checkDuplicateNodeComponent(NodeComponent originalNodeComponent)(Code)(Java Doc)
public NodeComponent cloneNodeComponent()(Code)(Java Doc)
public NodeComponent cloneNodeComponent(boolean forceDuplicate)(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
void duplicateAttributes(NodeComponent originalNode, boolean forceDuplicate)(Code)(Java Doc)
boolean duplicateChild()(Code)(Java Doc)
public void duplicateNodeComponent(NodeComponent originalNodeComponent)(Code)(Java Doc)
public void duplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate)(Code)(Java Doc)
public boolean getDuplicateOnCloneTree()(Code)(Java Doc)
public void setDuplicateOnCloneTree(boolean duplicate)(Code)(Java Doc)
void validateImageIllegalSharing(ImageComponent image)(Code)(Java Doc)

Fields inherited from javax.media.j3d.SceneGraphObject
Hashtable nodeHashtable(Code)(Java Doc)
SceneGraphObjectRetained retained(Code)(Java Doc)

Methods inherited from javax.media.j3d.SceneGraphObject
final boolean capabilityBitsEmpty()(Code)(Java Doc)
final void checkForLiveOrCompiled()(Code)(Java Doc)
final public void clearCapability(int bit)(Code)(Java Doc)
final public void clearCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void clearLive()(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
protected void duplicateSceneGraphObject(SceneGraphObject originalNode)(Code)(Java Doc)
final public boolean getCapability(int bit)(Code)(Java Doc)
final public boolean getCapabilityIsFrequent(int bit)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
String getNamePrefix()(Code)(Java Doc)
NodeComponent getNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate, Hashtable hashtable)(Code)(Java Doc)
public Object getUserData()(Code)(Java Doc)
final public boolean isCompiled()(Code)(Java Doc)
final public boolean isLive()(Code)(Java Doc)
final boolean isLiveOrCompiled()(Code)(Java Doc)
final public void setCapability(int bit)(Code)(Java Doc)
final public void setCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void setCompiled()(Code)(Java Doc)
void setDefaultReadCapabilities(int[] bits)(Code)(Java Doc)
final void setLive()(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public void setUserData(Object userData)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void updateNodeReferences(NodeReferenceTable referenceTable)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.