org.basex.gui
Class GUIConstants

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

public final class GUIConstants
extends java.lang.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):

Add some more code to allow switching on/off your view:

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Nested Class Summary
static class GUIConstants.Fill
          Background fill options.
static class GUIConstants.Msg
          Icon type.
 
Field Summary
static int ALT
          Alt key.
static java.awt.Font bfont
          Bold Font.
static java.awt.Color BLUE
          Color for highlighting quotes.
static java.awt.Color color1
          Second bright GUI color.
static java.awt.Color color1A
          Alpha color.
static java.awt.Color color2
          Middle color.
static java.awt.Color color2A
          Transparent background color.
static java.awt.Color color3
          Middle color.
static java.awt.Color color3A
          Transparent frame color.
static java.awt.Color color4
          Dark color.
static java.awt.Color colormark1
          Mark color.
static java.awt.Color colormark1A
          Mark color, custom alpha value.
static java.awt.Color colormark2
          Second mark color.
static java.awt.Color colormark2A
          Second mark color, custom alpha value.
static java.awt.Color colormark3
          Third mark color.
static java.awt.Color colormark4
          Fourth mark color.
static int CTRL
          Control key.
static java.awt.Cursor CURSORARROW
          Arrow cursor.
static java.awt.Cursor CURSORHAND
          Hand cursor.
static java.awt.Cursor CURSORMOVE
          Move cursor.
static java.awt.Cursor CURSORMOVEH
          Left/Right arrow cursor.
static java.awt.Cursor CURSORMOVEV
          Move cursor.
static java.awt.Cursor CURSORTEXT
          Text cursor.
static java.awt.Cursor CURSORWAIT
          Wait cursor.
static java.awt.Color DGRAY
          Background color.
static java.awt.Font dmfont
          Default monospace font.
static java.lang.String EDITORVIEW
          Internal name of the Editor View.
static java.lang.String EXPLOREVIEW
          Internal name of the Explore View.
static java.lang.String FOLDERVIEW
          Internal name of the Tree View.
static java.awt.Font font
          Font.
static int fontSize
          Current font size.
static java.awt.Color GRAY
          Button color.
static java.awt.Color GREEN
          Color for highlighting full-text hits.
static java.lang.String INFOVIEW
          Internal name of the Info View.
static java.awt.Font lfont
          Large font.
static java.awt.Color LGRAY
          Cell color.
static java.awt.Color LRED
          Color for highlighting errors.
static java.lang.String MAPVIEW
          Internal name of the Map View.
static java.awt.Font mfont
          Monospace font.
static int[] mfwidth
          Monospace character widths.
static java.lang.String PLOTVIEW
          Internal name of the Plot View.
static GUICommands[] POPUP
          Context menu entries.
static java.awt.Color RED
          Color for control characters.
static int SC
          Shortcut key (CTRL/META).
static int SHF
          Shift key.
static java.lang.String TABLEVIEW
          Internal name of the Table View.
static java.lang.String TEXTVIEW
          Internal name of the Text View.
static java.awt.Font TFONT
          Font of text area.
static java.lang.String TREEVIEW
          Internal name of the Tree View.
static java.lang.String VIEWS
          Default GUI Layout.
static java.awt.Color WHITE
          Bright GUI color.
 
Method Summary
static java.awt.Color color(int i)
          Returns the specified color from the color gradient.
static int[] fontWidths(java.awt.Font f)
          Returns the character widths for the current font.
static void init(GUIProp prop)
          Initializes colors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAPVIEW

public static final java.lang.String MAPVIEW
Internal name of the Map View.

See Also:
Constant Field Values

FOLDERVIEW

public static final java.lang.String FOLDERVIEW
Internal name of the Tree View.

See Also:
Constant Field Values

TEXTVIEW

public static final java.lang.String TEXTVIEW
Internal name of the Text View.

See Also:
Constant Field Values

TABLEVIEW

public static final java.lang.String TABLEVIEW
Internal name of the Table View.

See Also:
Constant Field Values

INFOVIEW

public static final java.lang.String INFOVIEW
Internal name of the Info View.

See Also:
Constant Field Values

EXPLOREVIEW

public static final java.lang.String EXPLOREVIEW
Internal name of the Explore View.

See Also:
Constant Field Values

PLOTVIEW

public static final java.lang.String PLOTVIEW
Internal name of the Plot View.

See Also:
Constant Field Values

TREEVIEW

public static final java.lang.String TREEVIEW
Internal name of the Tree View.

See Also:
Constant Field Values

EDITORVIEW

public static final java.lang.String EDITORVIEW
Internal name of the Editor View.

See Also:
Constant Field Values

VIEWS

public static final java.lang.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:
Constant Field Values

POPUP

public static final GUICommands[] POPUP
Context menu entries.


CURSORARROW

public static final java.awt.Cursor CURSORARROW
Arrow cursor.


CURSORHAND

public static final java.awt.Cursor CURSORHAND
Hand cursor.


CURSORWAIT

public static final java.awt.Cursor CURSORWAIT
Wait cursor.


CURSORMOVEH

public static final java.awt.Cursor CURSORMOVEH
Left/Right arrow cursor.


CURSORMOVEV

public static final java.awt.Cursor CURSORMOVEV
Move cursor.


CURSORTEXT

public static final java.awt.Cursor CURSORTEXT
Text cursor.


CURSORMOVE

public static final java.awt.Cursor CURSORMOVE
Move cursor.


LGRAY

public static final java.awt.Color LGRAY
Cell color.


GRAY

public static final java.awt.Color GRAY
Button color.


DGRAY

public static final java.awt.Color DGRAY
Background color.


WHITE

public static final java.awt.Color WHITE
Bright GUI color.


RED

public static final java.awt.Color RED
Color for control characters.


LRED

public static final java.awt.Color LRED
Color for highlighting errors.


GREEN

public static final java.awt.Color GREEN
Color for highlighting full-text hits.


BLUE

public static final java.awt.Color BLUE
Color for highlighting quotes.


color1

public static java.awt.Color color1
Second bright GUI color.


color2

public static java.awt.Color color2
Middle color.


color3

public static java.awt.Color color3
Middle color.


color4

public static java.awt.Color color4
Dark color.


colormark1

public static java.awt.Color colormark1
Mark color.


colormark2

public static java.awt.Color colormark2
Second mark color.


colormark3

public static java.awt.Color colormark3
Third mark color.


colormark4

public static java.awt.Color colormark4
Fourth mark color.


color1A

public static java.awt.Color color1A
Alpha color.


color2A

public static java.awt.Color color2A
Transparent background color.


color3A

public static java.awt.Color color3A
Transparent frame color.


colormark1A

public static java.awt.Color colormark1A
Mark color, custom alpha value.


colormark2A

public static java.awt.Color colormark2A
Second mark color, custom alpha value.


TFONT

public static final java.awt.Font TFONT
Font of text area.


lfont

public static java.awt.Font lfont
Large font.


font

public static java.awt.Font font
Font.


bfont

public static java.awt.Font bfont
Bold Font.


mfont

public static java.awt.Font mfont
Monospace font.


dmfont

public static java.awt.Font dmfont
Default monospace font.


fontSize

public static int fontSize
Current font size.


mfwidth

public static int[] mfwidth
Monospace character widths.


SHF

public static final int SHF
Shift key.

See Also:
Constant Field Values

ALT

public static final int ALT
Alt key.

See Also:
Constant Field Values

CTRL

public static final int CTRL
Control key.

See Also:
Constant Field Values

SC

public static final int SC
Shortcut key (CTRL/META).

Method Detail

init

public static void init(GUIProp prop)
Initializes colors.

Parameters:
prop - gui properties

color

public static java.awt.Color color(int i)
Returns the specified color from the color gradient.

Parameters:
i - color index
Returns:
color

fontWidths

public static int[] fontWidths(java.awt.Font f)
Returns the character widths for the current font.

Parameters:
f - font reference
Returns:
character widths