Class TextGraphicsWriter

    • Constructor Detail

      • TextGraphicsWriter

        public TextGraphicsWriter​(TextGraphics backend)
    • Method Detail

      • linefeed

        private void linefeed​(int lenToFit)
      • putControlChar

        public void putControlChar​(char ch)
      • stash

        private void stash​(java.lang.StringBuilder word,
                           int wordlen)
      • flush

        private void flush​(java.lang.StringBuilder word,
                           int wordlen)
      • getCursorPosition

        public TerminalPosition getCursorPosition()
        Returns:
        the cursor position
      • setCursorPosition

        public void setCursorPosition​(TerminalPosition cursorPosition)
        Parameters:
        cursorPosition - the cursor position to set
      • enableModifiers

        public TextGraphicsWriter 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<TextGraphicsWriter>
        Parameters:
        modifiers - Modifiers to add to the set of currently active modifiers
        Returns:
        Itself
      • disableModifiers

        public TextGraphicsWriter 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<TextGraphicsWriter>
        Parameters:
        modifiers - Modifiers to remove from the set of currently active modifiers
        Returns:
        Itself
      • setModifiers

        public TextGraphicsWriter setModifiers​(java.util.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<TextGraphicsWriter>
        Parameters:
        modifiers - Modifiers to set as active
        Returns:
        Itself
      • getActiveModifiers

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

        public WrapBehaviour getWrapBehaviour()
        Returns:
        the wrapBehaviour
      • setWrapBehaviour

        public void setWrapBehaviour​(WrapBehaviour wrapBehaviour)
        Parameters:
        wrapBehaviour - the wrapBehaviour to set
      • isStyleable

        public boolean isStyleable()
        Returns:
        whether styles in strings are handled.
      • setStyleable

        public void setStyleable​(boolean styleable)
        Parameters:
        styleable - whether styles in strings should be handled.