java.lang.Object
org.rrd4j.graph.CommentText
All Implemented Interfaces:
RrdGraphConstants
Direct Known Subclasses:
LegendText, PrintText

class CommentTextextends Object implements RrdGraphConstants
Represents comment text elements in RRD graphs. Handles text resolution, marker processing, and positioning for graph comments and legends.
  • Field Details

    • text

      protected final String text
      Original text before resolution
    • resolvedText

      String resolvedText
      Text after variable substitution and marker processing
    • marker

      Markers marker
      End-of-text alignment marker
    • enabled

      boolean enabled
      Whether this comment is enabled for display
    • x

      int x
      Screen coordinates for positioning
    • y

      int y
      Screen coordinates for positioning
  • Constructor Details

    • CommentText

      CommentText(String text)
      Creates a new comment text element.
      Parameters:
      text - the original text content
  • Method Details

    • resolveText

      void resolveText(Locale l, DataProcessor dproc, ValueScaler valueScaler)
      Resolves the text with variable substitution and marker processing.
      Parameters:
      l - the locale for formatting
      dproc - the data processor for resolving data references
      valueScaler - the value scaler for number formatting
    • trimIfGlue

      void trimIfGlue()
      Trims trailing whitespace if the marker is GLUE_MARKER.
    • isPrint

      boolean isPrint()
      Returns whether this comment is a print item.
      Returns:
      true if this is a print comment
    • isValidGraphElement

      boolean isValidGraphElement()
      Returns whether this comment is a valid graph element.
      Returns:
      true if enabled and not a print item