Class StyleSet.Set

java.lang.Object
com.googlecode.lanterna.graphics.StyleSet.Set
All Implemented Interfaces:
StyleSet<StyleSet.Set>
Direct Known Subclasses:
TextGraphicsWriter.WordPart
Enclosing interface:
StyleSet<T extends StyleSet<T>>

public static class StyleSet.Set extends Object implements StyleSet<StyleSet.Set>
  • Field Details

    • foregroundColor

      private TextColor foregroundColor
    • backgroundColor

      private TextColor backgroundColor
    • style

      private final EnumSet<SGR> style
  • Constructor Details

    • Set

      public Set()
    • Set

      public Set(StyleSet<?> source)
  • Method Details

    • getBackgroundColor

      public TextColor getBackgroundColor()
      Description copied from interface: StyleSet
      Returns the current background color
      Specified by:
      getBackgroundColor in interface StyleSet<StyleSet.Set>
      Returns:
      Current background color
    • setBackgroundColor

      public StyleSet.Set setBackgroundColor(TextColor backgroundColor)
      Description copied from interface: StyleSet
      Updates the current background color
      Specified by:
      setBackgroundColor in interface StyleSet<StyleSet.Set>
      Parameters:
      backgroundColor - New background color
      Returns:
      Itself
    • getForegroundColor

      public TextColor getForegroundColor()
      Description copied from interface: StyleSet
      Returns the current foreground color
      Specified by:
      getForegroundColor in interface StyleSet<StyleSet.Set>
      Returns:
      Current foreground color
    • setForegroundColor

      public StyleSet.Set setForegroundColor(TextColor foregroundColor)
      Description copied from interface: StyleSet
      Updates the current foreground color
      Specified by:
      setForegroundColor in interface StyleSet<StyleSet.Set>
      Parameters:
      foregroundColor - New foreground color
      Returns:
      Itself
    • enableModifiers

      public StyleSet.Set enableModifiers(SGR... modifiers)
      Description copied from interface: StyleSet
      Adds zero or more modifiers to the set of currently active modifiers
      Specified by:
      enableModifiers in interface StyleSet<StyleSet.Set>
      Parameters:
      modifiers - Modifiers to add to the set of currently active modifiers
      Returns:
      Itself
    • disableModifiers

      public StyleSet.Set disableModifiers(SGR... modifiers)
      Description copied from interface: StyleSet
      Removes zero or more modifiers from the set of currently active modifiers
      Specified by:
      disableModifiers in interface StyleSet<StyleSet.Set>
      Parameters:
      modifiers - Modifiers to remove from the set of currently active modifiers
      Returns:
      Itself
    • setModifiers

      public StyleSet.Set setModifiers(EnumSet<SGR> modifiers)
      Description copied from interface: StyleSet
      Sets the active modifiers to exactly the set passed in to this method. Any previous state of which modifiers are enabled doesn't matter.
      Specified by:
      setModifiers in interface StyleSet<StyleSet.Set>
      Parameters:
      modifiers - Modifiers to set as active
      Returns:
      Itself
    • clearModifiers

      public StyleSet.Set clearModifiers()
      Description copied from interface: StyleSet
      Removes all active modifiers
      Specified by:
      clearModifiers in interface StyleSet<StyleSet.Set>
      Returns:
      Itself
    • getActiveModifiers

      public EnumSet<SGR> getActiveModifiers()
      Description copied from interface: StyleSet
      Returns all the SGR codes that are currently active
      Specified by:
      getActiveModifiers in interface StyleSet<StyleSet.Set>
      Returns:
      Currently active SGR modifiers
    • setStyleFrom

      public StyleSet.Set setStyleFrom(StyleSet<?> source)
      Description copied from interface: StyleSet
      copy colors and set of SGR codes
      Specified by:
      setStyleFrom in interface StyleSet<StyleSet.Set>
      Parameters:
      source - Modifiers to set as active
      Returns:
      Itself