Class TextElement

java.lang.Object
org.openscience.cdk.renderer.elements.TextElement
All Implemented Interfaces:
IRenderingElement
Direct Known Subclasses:
AtomSymbolElement, TextGroupElement

public class TextElement extends Object implements IRenderingElement
Text element as used in the chemical drawing. This can be a element symbol.
Source code:
main
Belongs to CDK module:
render
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final Color
    The color of the text.
    final String
    The text to be displayed.
    final double
    The x coordinate where the text should be displayed.
    final double
    The y coordinate where the text should be displayed.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TextElement(double xCoord, double yCoord, String text, Color color)
    Constructs a new TextElement with the content text to be drawn at position (x,y) in the color color.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Converts this TextElement into widget specific objects.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • xCoord

      public final double xCoord
      The x coordinate where the text should be displayed.
    • yCoord

      public final double yCoord
      The y coordinate where the text should be displayed.
    • text

      public final String text
      The text to be displayed.
    • color

      public final Color color
      The color of the text.
  • Constructor Details

    • TextElement

      public TextElement(double xCoord, double yCoord, String text, Color color)
      Constructs a new TextElement with the content text to be drawn at position (x,y) in the color color.
      Parameters:
      xCoord - x coordinate where the text should be displayed
      yCoord - y coordinate where the text should be displayed
      text - the text to be drawn
      color - the color of the text
  • Method Details