Interface ValidatableLine

All Known Subinterfaces:
PlaceHolderLine
All Known Implementing Classes:
DataTypeLine, EmptyDataTypeLine, EmptyTextLine, EmptyVariableTextLine, TextLine, VariableTextLine

public interface ValidatableLine
A loose concept that represents a line of text, potentially with multiple parts, that can be validated against other instances and can change the color of the text.

Validation is performed against another ValidatableLine, which will be set by calling setValidationLine(ValidatableLine).

  • Field Details

    • INVALID_COLOR

      static final Color INVALID_COLOR
  • Method Details

    • updateColor

      void updateColor(ValidatableLine otherLine, Color invalidColor)
    • isDiffColored

      boolean isDiffColored()
    • matches

      boolean matches(ValidatableLine otherLine)
    • copy

    • getText

      String getText()
    • setTextColor

      void setTextColor(Color color)
      Set color for all text.
      Parameters:
      color - text color
    • setValidationLine

      void setValidationLine(ValidatableLine line)
      Sets the other line that this line is validated against. The other line may be a full, partial, or no match at all.
      Parameters:
      line - the line against which this line is validated
    • isValidated

      boolean isValidated()
      True means that this line has been matched against another line, regardless of whether the two lines are the same or not.
      Returns:
      true if this line has been matched against another line