Interface Text

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

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

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) https://en.wikipedia.org/wiki/String_(computer_science)
  • Hint: full internationalization (i18n) and localization (l10n) features are available for any written language.
  • Hint: relates to Internationalization (i18n) http://www.w3.org/standards/webdesign/i18n
  • 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.

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

    Modifier and Type Method Description
    X3DFontStyleNode getFontStyle()
    Provide X3DFontStyleNode instance (using a properly typed node) from inputOutput SFNode field fontStyle.
    float[] getLength()
    Provide array of float results within allowed range of [0,infinity) from inputOutput MFFloat field named length.
    float[] getLineBounds()
    Provide array of 2-tuple float results from outputOnly MFVec2f field named lineBounds.
    float getMaxExtent()
    Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named maxExtent.
    X3DMetadataObject getMetadata()
    Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    float[] getOrigin()
    Provide array of 3-tuple float results from outputOnly SFVec3f field named origin.
    boolean getSolid()
    Provide boolean value from initializeOnly SFBool field named solid.
    java.lang.String[] getString()
    Provide array of String results from inputOutput MFString field named string.
    float[] getTextBounds()
    Provide array of 2-tuple float results from outputOnly SFVec2f field named textBounds.
    Text setFontStyle​(X3DFontStyleNode newValue)
    Accessor method to assign X3DFontStyleNode instance (using a properly typed node) to inputOutput SFNode field fontStyle.
    Text setLength​(float[] newValue)
    Accessor method to assign float array to inputOutput MFFloat field named length.
    Text setMaxExtent​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named maxExtent.
    Text setMetadata​(X3DMetadataObject newValue)
    Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    Text setSolid​(boolean newValue)
    Accessor method to assign boolean value to initializeOnly SFBool field named solid.
    Text setString​(java.lang.String[] newValue)
    Accessor method to assign String array to inputOutput MFString field named string.
  • Method Details

    • getFontStyle

      X3DFontStyleNode getFontStyle()
      Provide X3DFontStyleNode instance (using a properly typed node) from inputOutput SFNode field fontStyle.
      Returns:
      value of fontStyle field
    • setFontStyle

      Text setFontStyle​(X3DFontStyleNode newValue)
      Accessor method to assign X3DFontStyleNode instance (using a properly typed node) to inputOutput SFNode field fontStyle.
      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 X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
      Specified by:
      getMetadata in interface X3DGeometryNode
      Specified by:
      getMetadata in interface X3DNode
      Returns:
      value of metadata field
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • setMetadata

      Text setMetadata​(X3DMetadataObject newValue)
      Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
      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:
      X3D Scene Authoring Hints: Metadata Nodes
    • 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).
      • 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.
      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).
      • 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.
      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

      java.lang.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.
      Returns:
      value of string field
    • setString

      Text setString​(java.lang.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.
      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