Class TextBuilder.TextBuilderRegion

java.lang.Object
org.eclipse.graphiti.util.TextBuilder.TextBuilderRegion
Enclosing class:
TextBuilder

public static class TextBuilder.TextBuilderRegion extends Object
Inner class for storing the partial region styles.
  • Constructor Details

  • Method Details

    • getStart

      public int getStart()
      Get start offset of the region in the text.
      Returns:
      The start offset of the region.
    • getStyle

      public TextStyle getStyle()
      Get the text style of the region in the text.
      Returns:
      The text style, or null for the default style.
    • setStyle

      public TextBuilder.TextBuilderRegion setStyle(TextStyle style)
      Assign a style to the region of text.
      Parameters:
      style - Style to assign.
      Returns:
      The updated partial region style.
    • setStart

      public TextBuilder.TextBuilderRegion setStart(int start)
      Assign a start to the partial region style.
      Parameters:
      start - New start offset of the region in the text.
      Returns:
      The updated partial region style.
    • setUnderline

      public TextBuilder.TextBuilderRegion setUnderline(UnderlineStyle uStyle, Color col)
      Set the underline style for the region.
      Parameters:
      uStyle - Underline style to assign. null means disable underline.
      col - Color of the underline, null means skip setting the color.
      Returns:
      The updated partial region style.
    • setUnderline

      public TextBuilder.TextBuilderRegion setUnderline(Color col)
      Set the underline color for the region.
      Parameters:
      col - Color of the underline, null means skip setting the color.
      Returns:
      The updated partial region style.
    • setStrikeOut

      public TextBuilder.TextBuilderRegion setStrikeOut(boolean value, Color col)
      Set strikeout for the region.
      Parameters:
      value - Enable or disable strikeout.
      col - Color of the strikeout, if enabled. null means skip setting of the color.
      Returns:
      The updated partial region style.
    • setForeground

      public TextBuilder.TextBuilderRegion setForeground(Color col)
      Set the foreground color of the text for the region.
      Parameters:
      col - Foreground color to set. null means skip setting of the color.
      Returns:
      The updated partial region style.
    • setBackground

      public TextBuilder.TextBuilderRegion setBackground(Color col)
      Set the background color of the text for the region.
      Parameters:
      col - Background color to set. null means skip setting of the color.
      Returns:
      The updated partial region style.
    • setFont

      public TextBuilder.TextBuilderRegion setFont(Font font)
      Set the font for the region.
      Parameters:
      font - Font to set.
      Returns:
      The updated partial region style.