Package org.basex.gui
Class GUIConstants
java.lang.Object
org.basex.gui.GUIConstants
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
VIEWSstring below - create your view implementation in a new sub package
(e.g.
MapView). - add a new
Viewinstance in theGUIconstructor.
- add a boolean visibility flag with the view name included
in the
GUIOptionsclassGUIOptions.SHOWMAP) - add strings for the menu text.
- optionally add localized translations in the .lang files
(e.g.
c_showmapandc_showmaptt) - add a corresponding command in the
GUIMenuCmdclass (e.g.GUIMenuCmd.C_SHOWMAP)and add a reference in theMENUITEMSmenu structure
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAlt key.static final ColorBackground color.static FontBold Font.static final ColorColor: blue.static ColorSecond bright GUI color.static ColorAlpha color.static ColorMiddle color.static ColorTransparent background color.static ColorMiddle color.static ColorCursor background color.static ColorDark color.static ColorMark color.static ColorMark color, custom alpha value.static ColorSecond mark color.static ColorSecond mark color, custom alpha value.static ColorThird mark color.static ColorFourth mark color.static final ColorColor: comments.static final intControl key.static final CursorArrow cursor.static final CursorHand cursor.static final CursorMove cursor.static final CursorLeft/Right arrow cursor.static final CursorMove cursor.static final CursorText cursor.static final CursorWait cursor.static ColorBackground color.static final ColorColor: digits.static FontDefault monospace font.static final StringInternal name of the Editor View.static final StringInternal name of the Explore View.static final StringInternal name of the Tree View.static FontFont.static intCurrent font size.static ColorButton color.static final ColorColor: green.static final StringInternal name of the Info View.static final ColorColor: keywords.static ColorCell color.static final ColorColor: light red.static final StringInternal name of the Map View.static final intShortcut key (CTRL/META).static FontMonospace font.static ColorMiddle gray color.static final intNo modifier.static final ColorPanel color.static final StringInternal name of the Plot View.static final GUIMenuCmd[]Context menu entries.static final ColorColor: red.static final intShift key.static final StringInternal name of the Table View.static final ColorText color.static final StringInternal name of the Text View.static final StringInternal name of the Tree View.static final ColorColor: names.static final ColorColor: variables.static final StringDefault GUI Layout. -
Method Summary
Modifier and TypeMethodDescriptionstatic Colorcolor(int i) Returns the specified color from the color gradient.static intfontSize()Returns the standard font size.static voidinit(GUIOptions opts) Initializes UI settings.
-
Field Details
-
MAPVIEW
Internal name of the Map View.- See Also:
-
FOLDERVIEW
Internal name of the Tree View.- See Also:
-
TEXTVIEW
Internal name of the Text View.- See Also:
-
TABLEVIEW
Internal name of the Table View.- See Also:
-
INFOVIEW
Internal name of the Info View.- See Also:
-
EXPLOREVIEW
Internal name of the Explore View.- See Also:
-
PLOTVIEW
Internal name of the Plot View.- See Also:
-
TREEVIEW
Internal name of the Tree View.- See Also:
-
EDITORVIEW
Internal name of the Editor View.- See Also:
-
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:
-
POPUP
Context menu entries. -
CURSORARROW
Arrow cursor. -
CURSORHAND
Hand cursor. -
CURSORWAIT
Wait cursor. -
CURSORMOVEH
Left/Right arrow cursor. -
CURSORMOVEV
Move cursor. -
CURSORTEXT
Text cursor. -
CURSORMOVE
Move cursor. -
BACK
Background color. -
TEXT
Text color. -
PANEL
Panel color. -
RED
Color: red. -
LRED
Color: light red. -
GREEN
Color: green. -
BLUE
Color: blue. -
KEYWORD
Color: keywords. -
COMMENT
Color: comments. -
DIGIT
Color: digits. -
VARIABLE
Color: variables. -
VALUE
Color: names. -
lgray
Cell color. -
gray
Button color. -
mgray
Middle gray color. -
dgray
Background color. -
color1
Second bright GUI color. -
color2
Middle color. -
color3
Middle color. -
color4
Dark color. -
colormark1
Mark color. -
colormark2
Second mark color. -
colormark3
Third mark color. -
colormark4
Fourth mark color. -
color1A
Alpha color. -
color2A
Transparent background color. -
color3A
Cursor background color. -
colormark1A
Mark color, custom alpha value. -
colormark2A
Second mark color, custom alpha value. -
font
Font. -
bfont
Bold Font. -
mfont
Monospace font. -
dmfont
Default monospace font. -
fontSize
public static int fontSizeCurrent font size. -
NO_MOD
public static final int NO_MODNo modifier.- See Also:
-
SHIFT
public static final int SHIFTShift key.- See Also:
-
ALT
public static final int ALTAlt key.- See Also:
-
CTRL
public static final int CTRLControl key.- See Also:
-
META
public static final int METAShortcut key (CTRL/META).
-
-
Method Details
-
init
Initializes UI settings.- Parameters:
opts- gui options
-
color
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
-