Package org.basex.gui

Class GUIConstants

java.lang.Object
org.basex.gui.GUIConstants

public final class GUIConstants extends Object
GUI Constants used in different views. To add a new view, please proceed as follows: All views have unique names, which are defined below. The following steps are necessary to add a new view (the implementation of the existing views might help you):
  • define a unique name for your view (e.g. map)
  • add a string for your view, as shown below
  • add the string in the VIEWS string below
  • create your view implementation in a new sub package (e.g. MapView).
  • add a new View instance in the GUI constructor.
Add some more code to allow switching on/off your view:
  • add a boolean visibility flag with the view name included in the GUIOptions class GUIOptions.SHOWMAP)
  • add strings for the menu text.
  • optionally add localized translations in the .lang files (e.g. c_showmap and c_showmaptt)
  • add a corresponding command in the GUIMenuCmd class (e.g. GUIMenuCmd.C_SHOWMAP)and add a reference in the MENUITEMS menu structure
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Field Details

    • MAPVIEW

      public static final String MAPVIEW
      Internal name of the Map View.
      See Also:
    • FOLDERVIEW

      public static final String FOLDERVIEW
      Internal name of the Tree View.
      See Also:
    • TEXTVIEW

      public static final String TEXTVIEW
      Internal name of the Text View.
      See Also:
    • TABLEVIEW

      public static final String TABLEVIEW
      Internal name of the Table View.
      See Also:
    • INFOVIEW

      public static final String INFOVIEW
      Internal name of the Info View.
      See Also:
    • EXPLOREVIEW

      public static final String EXPLOREVIEW
      Internal name of the Explore View.
      See Also:
    • PLOTVIEW

      public static final String PLOTVIEW
      Internal name of the Plot View.
      See Also:
    • TREEVIEW

      public static final String TREEVIEW
      Internal name of the Tree View.
      See Also:
    • EDITORVIEW

      public static final String EDITORVIEW
      Internal name of the Editor View.
      See Also:
    • VIEWS

      public static final String VIEWS
      Default GUI Layout. The layout is formatted as follows: The character 'H' or 'V' adds a new horizontal or vertical level, and a level is closed again with the '-' character. All views are separated with spaces, and all views must be specified in this layout. This layout is displayed as soon as a database is opened.
      See Also:
    • CURSORARROW

      public static final Cursor CURSORARROW
      Arrow cursor.
    • CURSORHAND

      public static final Cursor CURSORHAND
      Hand cursor.
    • CURSORWAIT

      public static final Cursor CURSORWAIT
      Wait cursor.
    • CURSORMOVEH

      public static final Cursor CURSORMOVEH
      Left/Right arrow cursor.
    • CURSORMOVEV

      public static final Cursor CURSORMOVEV
      Move cursor.
    • CURSORTEXT

      public static final Cursor CURSORTEXT
      Text cursor.
    • CURSORMOVE

      public static final Cursor CURSORMOVE
      Move cursor.
    • BACK

      public static final Color BACK
      Background color.
    • TEXT

      public static final Color TEXT
      Text color.
    • PANEL

      public static final Color PANEL
      Panel color.
    • RED

      public static final Color RED
      Color: red.
    • LRED

      public static final Color LRED
      Color: light red.
    • GREEN

      public static final Color GREEN
      Color: green.
    • BLUE

      public static final Color BLUE
      Color: blue.
    • KEYWORD

      public static final Color KEYWORD
      Color: keywords.
    • COMMENT

      public static final Color COMMENT
      Color: comments.
    • DIGIT

      public static final Color DIGIT
      Color: digits.
    • VARIABLE

      public static final Color VARIABLE
      Color: variables.
    • VALUE

      public static final Color VALUE
      Color: names.
    • lgray

      public static Color lgray
      Cell color.
    • gray

      public static Color gray
      Button color.
    • mgray

      public static Color mgray
      Middle gray color.
    • dgray

      public static Color dgray
      Background color.
    • color1

      public static Color color1
      Second bright GUI color.
    • color2

      public static Color color2
      Middle color.
    • color3

      public static Color color3
      Middle color.
    • color4

      public static Color color4
      Dark color.
    • colormark1

      public static Color colormark1
      Mark color.
    • colormark2

      public static Color colormark2
      Second mark color.
    • colormark3

      public static Color colormark3
      Third mark color.
    • colormark4

      public static Color colormark4
      Fourth mark color.
    • color1A

      public static Color color1A
      Alpha color.
    • color2A

      public static Color color2A
      Transparent background color.
    • color3A

      public static Color color3A
      Cursor background color.
    • colormark1A

      public static Color colormark1A
      Mark color, custom alpha value.
    • colormark2A

      public static Color colormark2A
      Second mark color, custom alpha value.
    • font

      public static Font font
      Font.
    • bfont

      public static Font bfont
      Bold Font.
    • mfont

      public static Font mfont
      Monospace font.
    • dmfont

      public static Font dmfont
      Default monospace font.
    • fontSize

      public static int fontSize
      Current font size.
    • NO_MOD

      public static final int NO_MOD
      No modifier.
      See Also:
    • SHIFT

      public static final int SHIFT
      Shift key.
      See Also:
    • ALT

      public static final int ALT
      Alt key.
      See Also:
    • CTRL

      public static final int CTRL
      Control key.
      See Also:
    • META

      public static final int META
      Shortcut key (CTRL/META).
  • Method Details

    • init

      public static void init(GUIOptions opts)
      Initializes UI settings.
      Parameters:
      opts - gui options
    • color

      public static Color color(int i)
      Returns the specified color from the color gradient.
      Parameters:
      i - color index
      Returns:
      color
    • fontSize

      public static int fontSize()
      Returns the standard font size.
      Returns:
      font size