Class ThemePalette

java.lang.Object
com.codename1.ui.editor.ThemePalette

public final class ThemePalette extends Object
The color palette for the pure code editor, mirroring the light (GitHub style) and dark (VS Code style) themes used by the previous BrowserComponent backend so switching backends is visually consistent.
  • Field Details

    • LIGHT

      public static final ThemePalette LIGHT
      The GitHub style light palette.
    • DARK

      public static final ThemePalette DARK
      The VS Code style dark palette.
  • Method Details

    • forName

      public static ThemePalette forName(String theme)
      Returns the palette for the given theme id ("dark" returns the dark palette, anything else the light palette).
    • colorForKind

      public int colorForKind(int kind)
      Returns the color for the given Tokenizer token kind.
    • getBackground

      public int getBackground()
      The editor background color.
    • getForeground

      public int getForeground()
      The default text color.
    • getSelection

      public int getSelection()
      The selection highlight color.
    • getGutterBackground

      public int getGutterBackground()
      The gutter background color.
    • getGutterForeground

      public int getGutterForeground()
      The gutter text color.
    • getErrorColor

      public int getErrorColor()
      The error diagnostic color.
    • getWarningColor

      public int getWarningColor()
      The warning diagnostic color.
    • getInfoColor

      public int getInfoColor()
      The info diagnostic color.