Interface Text

All Superinterfaces:
X3DGeometryNode, X3DNode
All Known Implementing Classes:
Text

public interface Text extends X3DGeometryNode
Text is a 2D (flat) geometry node that can contain multiple lines of string values.

Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the org.web3d.x3d.jsail classes. X3D node tooltip: [X3DGeometryNode] Text is a 2D (flat) geometry node that can contain multiple lines of string values. Layout and styling is controlled by a contained FontStyle node. Hint: String (computer science) <a href="https://en.wikipedia.org/wiki/String_(computer_science)" target="_blank">https://en.wikipedia.org/wiki/String_(computer_science)</a> Hint: full internationalization (i18n) and localization (l10n) features are available for any written language. Hint: relates to Internationalization (i18n) <a href="http://www.w3.org/standards/webdesign/i18n" target="_blank">http://www.w3.org/standards/webdesign/i18n</a> Hint: insert a Shape node before adding geometry or Appearance. Hint: for advanced extensibility, authors can substitute a type-matched ProtoInstance node (with correct containerField value) for contained node content. Warning: Text node requires X3D profile='Immersive' or &lt;component name='Text' level='1'/&gt; *


Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Provide org.web3d.x3d.sai.Text.X3DFontStyleNode instance (using a properly typed node) from inputOutput SFNode field fontStyle.
    float[]
    Provide array of float results within allowed range of [0,infinity) from inputOutput MFFloat field named length.
    float[]
    Provide array of 2-tuple float results from outputOnly MFVec2f field named lineBounds.
    float
    Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named maxExtent.
    Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    float[]
    Provide array of 3-tuple float results from outputOnly SFVec3f field named origin.
    boolean
    Provide boolean value from initializeOnly SFBool field named solid.
    Provide array of String results from inputOutput MFString field named string.
    float[]
    Provide array of 2-tuple float results from outputOnly SFVec2f field named textBounds.
    Accessor method to assign org.web3d.x3d.sai.Text.X3DFontStyleNode instance (using a properly typed node) to inputOutput SFNode field fontStyle.
    setLength(float[] newValue)
    Accessor method to assign float array to inputOutput MFFloat field named length.
    setMaxExtent(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named maxExtent.
    Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    setSolid(boolean newValue)
    Accessor method to assign boolean value to initializeOnly SFBool field named solid.
    setString(String[] newValue)
    Accessor method to assign String array to inputOutput MFString field named string.
  • Method Details

    • getFontStyle

      X3DFontStyleNode getFontStyle()
      Provide org.web3d.x3d.sai.Text.X3DFontStyleNode instance (using a properly typed node) from inputOutput SFNode field fontStyle.

      Tooltip: [X3DFontStyleNode] The fontStyle field can contain a FontStyle or ScreenFontStyle node defining size, family, and style for presented text. Hint: Wikipedia <a href="https://en.wikipedia.org/wiki/Font" target="_blank">https://en.wikipedia.org/wiki/Font</a> *
      Returns:
      value of fontStyle field
    • setFontStyle

      Text setFontStyle(X3DFontStyleNode newValue)
      Accessor method to assign org.web3d.x3d.sai.Text.X3DFontStyleNode instance (using a properly typed node) to inputOutput SFNode field fontStyle.

      Tooltip: [X3DFontStyleNode] The fontStyle field can contain a FontStyle or ScreenFontStyle node defining size, family, and style for presented text. Hint: Wikipedia <a href="https://en.wikipedia.org/wiki/Font" target="_blank">https://en.wikipedia.org/wiki/Font</a> *
      Parameters:
      newValue - is new value for the fontStyle field.
      Returns:
      Text - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getLength

      float[] getLength()
      Provide array of float results within allowed range of [0,infinity) from inputOutput MFFloat field named length.

      Tooltip: Array of length values for each text string in the local coordinate system. Each string is stretched or compressed to fit. *
      Returns:
      value of length field
    • setLength

      Text setLength(float[] newValue)
      Accessor method to assign float array to inputOutput MFFloat field named length.

      Tooltip: Array of length values for each text string in the local coordinate system. Each string is stretched or compressed to fit. *
      Parameters:
      newValue - is new value for the length field.
      Returns:
      Text - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getLineBounds

      float[] getLineBounds()
      Provide array of 2-tuple float results from outputOnly MFVec2f field named lineBounds.

      Tooltip: Array of 2D bounding box values for each line of text in the local coordinate system. Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. *
      Returns:
      value of lineBounds field
    • getMaxExtent

      float getMaxExtent()
      Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named maxExtent.

      Tooltip: Limits/compresses all text strings if max string length is longer than maxExtent, as measured in local coordinate system. *
      Returns:
      value of maxExtent field
    • setMaxExtent

      Text setMaxExtent(float newValue)
      Accessor method to assign float value to inputOutput SFFloat field named maxExtent.

      Tooltip: Limits/compresses all text strings if max string length is longer than maxExtent, as measured in local coordinate system. *
      Parameters:
      newValue - is new value for the maxExtent field.
      Returns:
      Text - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getMetadata

      X3DMetadataObject getMetadata()
      Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.

      Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node. Hint: X3D Architecture 7.2.4 Metadata <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata</a> *
      Specified by:
      getMetadata in interface X3DGeometryNode
      Specified by:
      getMetadata in interface X3DNode
      Returns:
      value of metadata field
      See Also:
    • setMetadata

      Text setMetadata(X3DMetadataObject newValue)
      Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.

      Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node. Hint: X3D Architecture 7.2.4 Metadata <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata</a> *
      Specified by:
      setMetadata in interface X3DGeometryNode
      Specified by:
      setMetadata in interface X3DNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      Text - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      See Also:
    • getOrigin

      float[] getOrigin()
      Provide array of 3-tuple float results from outputOnly SFVec3f field named origin.

      Tooltip: origin of the text local coordinate system, in units of the coordinate system in which the Text node is embedded. The value of the origin field represents the upper left corner of the textBounds. Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. *
      Returns:
      value of origin field
    • getSolid

      boolean getSolid()
      Provide boolean value from initializeOnly SFBool field named solid.

      Tooltip: Setting solid true means draw only one side of polygons (backface culling on), setting solid false means draw both sides of polygons (backface culling off). Hint: mnemonic "this geometry is solid like a brick" (you don't render the inside of a brick). Warning: default value true can completely hide geometry if viewed from wrong side! Hint: if in doubt, use solid='false' for maximum visibility. Warning: solid false not supported in VRML97. Hint: (X3D version 4.0 draft) accessType relaxed to inputOutput in order to support animation and visualization. *
      Returns:
      value of solid field
    • setSolid

      Text setSolid(boolean newValue)
      Accessor method to assign boolean value to initializeOnly SFBool field named solid.

      Tooltip: Setting solid true means draw only one side of polygons (backface culling on), setting solid false means draw both sides of polygons (backface culling off). Hint: mnemonic "this geometry is solid like a brick" (you don't render the inside of a brick). Warning: default value true can completely hide geometry if viewed from wrong side! Hint: if in doubt, use solid='false' for maximum visibility. Warning: solid false not supported in VRML97. Hint: (X3D version 4.0 draft) accessType relaxed to inputOutput in order to support animation and visualization. *
      Parameters:
      newValue - is new value for the solid field.
      Returns:
      Text - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getString

      String[] getString()
      Provide array of String results from inputOutput MFString field named string.

      Tooltip: Single or multiple string values to present as Text. Each value in the string array (including empty strings) gets displayed on a separate line. Hint: MFString arrays can have multiple values, so separate each individual string by quote marks. Hint: Strings can contain quote marks by first escaping them with a backslash example: "say \"hello\" please" Hint: many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as &#38; for & ampersand character, or &#34; for " quotation-mark character). Hint: relates to Internationalization (i18n) <a href="http://www.w3.org/standards/webdesign/i18n" target="_blank">http://www.w3.org/standards/webdesign/i18n</a> Example: <a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02-GeometryPrimitives/TextIndex.html" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02-GeometryPrimitives/TextIndex.html</a> Example: <a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02-GeometryPrimitives/TextSpecialCharactersIndex.html" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02-GeometryPrimitives/TextSpecialCharactersIndex.html</a> *
      Returns:
      value of string field
    • setString

      Text setString(String[] newValue)
      Accessor method to assign String array to inputOutput MFString field named string.

      Tooltip: Single or multiple string values to present as Text. Each value in the string array (including empty strings) gets displayed on a separate line. Hint: MFString arrays can have multiple values, so separate each individual string by quote marks. Hint: Strings can contain quote marks by first escaping them with a backslash example: "say \"hello\" please" Hint: many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as &#38; for & ampersand character, or &#34; for " quotation-mark character). Hint: relates to Internationalization (i18n) <a href="http://www.w3.org/standards/webdesign/i18n" target="_blank">http://www.w3.org/standards/webdesign/i18n</a> Example: <a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02-GeometryPrimitives/TextIndex.html" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02-GeometryPrimitives/TextIndex.html</a> Example: <a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02-GeometryPrimitives/TextSpecialCharactersIndex.html" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02-GeometryPrimitives/TextSpecialCharactersIndex.html</a> *
      Parameters:
      newValue - is new value for the string field.
      Returns:
      Text - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getTextBounds

      float[] getTextBounds()
      Provide array of 2-tuple float results from outputOnly SFVec2f field named textBounds.

      Tooltip: 2D bounding box value for all lines of text in the local coordinate system. Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. *
      Returns:
      value of textBounds field