Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.gui
Class GUIConstants

    java.lang.Object
      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):

- define a unique name for your view (e.g. `map`)
- add a string for your view, as shown below
- add the string in the `LAYOUTOPEN` string below
- create your view implementation in a new sub package (e.g. `MapView`).
- add a new `ViewPanel` instance for your view 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 `GUIProp` class `GUIProp.SHOWMAP`)
- add strings for the menu text and command description in the `Text` class (e.g. `Text.GUISHOWMAP` an `Text.GUISHOWMAPTT`).
- optionally add localized translations in the .lang files (e.g. `c_showmap` and `c_showmaptt`)
- add a corresponding command in the `GUICommands` class (e.g. `GUICommands.SHOWMAP`)and add a reference in the `MENUITEMS` menu structure

Author:
  Workgroup DBIS, University of Konstanz 2005-09, ISC License, Christian Gruen

Nested Class Summary
`static class` | `GUIConstants.Fill` Background fill options.

Field Summary
`static java.awt.Color` | `back` Transparent background color.
`static java.awt.Font` | `bfont` Bold Font.
`static int[]` | `bwidth` Bold character widths.
`static java.awt.Color` | `color` GUI color.
`static java.awt.Color` | `color1` Bright GUI color.
`static java.awt.Color` | `color2` Second bright GUI color.
`static java.awt.Color` | `color3` Middle color.
`static java.awt.Color` | `color4` Middle color.
`static java.awt.Color` | `color6` Dark color.
`static java.awt.Color` | `COLORBUTTON` Button color.
`static java.awt.Color` | `COLORCELL` Cell color.
`static java.awt.Color` | `COLORDARK` Background color.
`static java.awt.Color` | `COLORERRHIGH` Error highlight color.
`static java.awt.Color` | `COLORERROR` Error color.
`static java.awt.Color[]` | `COLORFT` Colors of full-text hits.
`static java.awt.Color` | `colormark1` Mark color.
`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 java.awt.Color` | `colormarkA` Mark color, custom alpha value.
`static java.awt.Color[]` | `COLORS` Cached treemap colors.
`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.Font` | `dfont` Default monospace font.
`static int[]` | `dwidth` Default monospace font widths.
`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 java.lang.String[]` | `FONTALIAS` Anti-alias modes.
`static java.awt.Color` | `frame` Transparent frame color.
`static int[]` | `fwidth` Character widths.
`static java.lang.String` | `HELPVIEW` Internal name of the Help View.
`static java.lang.String` | `INFOVIEW` Internal name of the Info View.
`static java.lang.String` | `LAYOUTCLOSE` This layout is shown when no database is opened.
`static java.lang.String` | `LAYOUTOPEN` Default GUI Layout.
`static java.awt.Font` | `lfont` Large font.
`static int[]` | `lwidth` Character large character widths.
`static java.lang.String` | `MAPVIEW` Internal name of the Map View.
`static java.lang.String[]` | `MENUBAR` Top menu entries.
`static java.lang.Object[][]` | `MENUITEMS` Two-dimensional Menu entries, containing the menu item commands.
`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 GUICommand[]` | `POPUP` Context menu entries.
`static java.lang.String` | `TABLEVIEW` Internal name of the Table View.
`static java.lang.String` | `TEXTVIEW` Internal name of the Text View.
`static GUICommand[]` | `TOOLBAR` Toolbar entries, containing the button commands.
`static java.lang.String` | `TREEVIEW` Internal name of the Tree View.
`static java.lang.String` | `XQUERYVIEW` Internal name of the XQuery View.

Method Summary
`static int[]` | `fontWidths(java.awt.Font f)` Returns the character widths for the current font.
`static java.awt.Color` | `getFTColor(int p)` Returns a full-text color for the specified pointer.
`static void` | `init(GUIProp prop)` Initializes colors.
`static void` | `initFonts(GUIProp prop)` Initializes fonts.

Methods inherited from class java.lang.Object
`equals, 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

### HELPVIEW

    public static final java.lang.String HELPVIEW

  Internal name of the Help 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

### XQUERYVIEW

    public static final java.lang.String XQUERYVIEW

  Internal name of the XQuery View.

  See Also:
    Constant Field Values

### LAYOUTOPEN

    public static final java.lang.String LAYOUTOPEN

  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

### LAYOUTCLOSE

    public static final java.lang.String LAYOUTCLOSE

  This layout is shown when no database is opened.

  See Also:
    Constant Field Values

### TOOLBAR

    public static final GUICommand[] TOOLBAR

  Toolbar entries, containing the button commands.

### MENUBAR

    public static final java.lang.String[] MENUBAR

  Top menu entries.

### MENUITEMS

    public static final java.lang.Object[][] MENUITEMS

  Two-dimensional Menu entries, containing the menu item commands.

### POPUP

    public static final GUICommand[] 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.

### FONTALIAS

    public static final java.lang.String[] FONTALIAS

  Anti-alias modes.

### COLORERROR

    public static final java.awt.Color COLORERROR

  Error color.

### COLORERRHIGH

    public static final java.awt.Color COLORERRHIGH

  Error highlight color.

### COLORCELL

    public static final java.awt.Color COLORCELL

  Cell color.

### COLORBUTTON

    public static final java.awt.Color COLORBUTTON

  Button color.

### COLORDARK

    public static final java.awt.Color COLORDARK

  Background color.

### COLORFT

    public static final java.awt.Color[] COLORFT

  Colors of full-text hits.

### back

    public static java.awt.Color back

  Transparent background color.

### frame

    public static java.awt.Color frame

  Transparent frame color.

### color

    public static java.awt.Color color

  GUI color.

### color1

    public static java.awt.Color color1

  Bright GUI color.

### color2

    public static java.awt.Color color2

  Second bright GUI color.

### color3

    public static java.awt.Color color3

  Middle color.

### color4

    public static java.awt.Color color4

  Middle color.

### color6

    public static java.awt.Color color6

  Dark color.

### colormarkA

    public static java.awt.Color colormarkA

  Mark color, custom alpha value.

### colormark2A

    public static java.awt.Color colormark2A

  Second mark color, custom alpha value.

### 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.

### COLORS

    public static final java.awt.Color[] COLORS

  Cached treemap colors.

### dfont

    public static java.awt.Font dfont

  Default monospace font.

### dwidth

    public static int[] dwidth

  Default monospace font widths.

### lfont

    public static java.awt.Font lfont

  Large font.

### lwidth

    public static int[] lwidth

  Character large character widths.

### font

    public static java.awt.Font font

  Font.

### fwidth

    public static int[] fwidth

  Character widths.

### mfont

    public static java.awt.Font mfont

  Monospace font.

### mfwidth

    public static int[] mfwidth

  Monospace character widths.

### bfont

    public static java.awt.Font bfont

  Bold Font.

### bwidth

    public static int[] bwidth

  Bold character widths.

Method Detail

### init

    public static void init(GUIProp prop)

  Initializes colors.

  Parameters:
    `prop` - gui properties

### initFonts

    public static void initFonts(GUIProp prop)

  Initializes fonts.

  Parameters:
    `prop` - gui properties

### fontWidths

    public static int[] fontWidths(java.awt.Font f)

  Returns the character widths for the current font.

  Parameters:
    `f` - font reference
  Returns:
    character widths

### getFTColor

    public static java.awt.Color getFTColor(int p)

  Returns a full-text color for the specified pointer.

  Parameters:
    `p` - pointer on token in query.
  Returns:
    color

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD