Class AnsiColorSource<T extends AnsiColorProvider>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean foreground  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getControlCode​(T attributeSource)
      Translates the attribute source into a control code that can be passed to an input/output stream
      java.lang.String getFullResetControlCode()
      Gets a reset code that can be used to reset any changes previously made by any attributes of the type supported by this source
      java.lang.String getResetControlCode​(T attributeSource)
      Gets a reset code that can be used to reset any changes previously made by the given attribute
      • Methods inherited from class java.lang.Object

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

      • foreground

        private final boolean foreground
    • Constructor Detail

      • AnsiColorSource

        public AnsiColorSource()
      • AnsiColorSource

        protected AnsiColorSource​(boolean foreground)
    • Method Detail

      • getControlCode

        public java.lang.String getControlCode​(T attributeSource)
        Description copied from interface: ControlCodeSource
        Translates the attribute source into a control code that can be passed to an input/output stream
        Specified by:
        getControlCode in interface ControlCodeSource<T extends AnsiColorProvider>
        Parameters:
        attributeSource - Attribute source
        Returns:
        Control code
      • getResetControlCode

        public java.lang.String getResetControlCode​(T attributeSource)
        Description copied from interface: ControlCodeSource
        Gets a reset code that can be used to reset any changes previously made by the given attribute
        Specified by:
        getResetControlCode in interface ControlCodeSource<T extends AnsiColorProvider>
        Parameters:
        attributeSource - Attribute source
        Returns:
        Control code
      • getFullResetControlCode

        public java.lang.String getFullResetControlCode()
        Description copied from interface: ControlCodeSource
        Gets a reset code that can be used to reset any changes previously made by any attributes of the type supported by this source
        Specified by:
        getFullResetControlCode in interface ControlCodeSource<T extends AnsiColorProvider>
        Returns:
        Control Code