Package jexer.teditor

Class Highlighter


  • public class Highlighter
    extends java.lang.Object
    Highlighter provides color choices for certain text strings.
    • Constructor Summary

      Constructors 
      Constructor Description
      Highlighter()
      Public constructor sets the theme to the default.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CellAttributes getColor​(java.lang.String name)
      Retrieve the CellAttributes for a named theme color.
      void setEnabled​(boolean enabled)
      Set keyword highlighting.
      void setJavaColors()
      Sets to defaults that resemble the Borland IDE colors.
      void setTo​(Highlighter rhs)
      Set my field values to that's field.
      boolean shouldSplit​(int ch)
      See if this is a character that should split a word.
      • Methods inherited from class java.lang.Object

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

      • Highlighter

        public Highlighter()
        Public constructor sets the theme to the default.
    • Method Detail

      • setEnabled

        public void setEnabled​(boolean enabled)
        Set keyword highlighting.
        Parameters:
        enabled - if true, enable keyword highlighting
      • setTo

        public void setTo​(Highlighter rhs)
        Set my field values to that's field.
        Parameters:
        rhs - an instance of Highlighter
      • shouldSplit

        public boolean shouldSplit​(int ch)
        See if this is a character that should split a word.
        Parameters:
        ch - the character
        Returns:
        true if the word should be split
      • getColor

        public CellAttributes getColor​(java.lang.String name)
        Retrieve the CellAttributes for a named theme color.
        Parameters:
        name - theme color name, e.g. "twindow.border"
        Returns:
        color associated with name, e.g. bold yellow on blue
      • setJavaColors

        public void setJavaColors()
        Sets to defaults that resemble the Borland IDE colors.