📄 defaults.java
字号:
package java.awt;/** * Defaults - adaption parameters of package java.awt. This is our way to * parameterize various settings like colors and fonts. We prefer a simple * Java class (in favor of properties) because it doesn't need file system * access, is much faster, and more robust. * * Be very carefully to add additional java.awt types, since this might * introduce recursive class init problems. This is especially * true if static fields of such classes are involved (like Color), since * they might be still "null" (if they in turn refer to Toolkit/Defaults) * when referenced inside of this class. * * Copyright (c) 1998 * Transvirtual Technologies, Inc. All rights reserved. * * See the file "license.terms" for information on usage and redistribution * of this file. * * @author P.C.Mehlitz */class Defaults{/** * If ConsoleClass is set to the classname of a kaffe.util.log.LogClient, System.out, err * are redirected to a kaffe.util.log.LogStream, which notifies the provided LogClient * (usually a simple Window displaying scrolled text). If ConsoleClass is null, no * io redirection is performed */ static String ConsoleClass = /* "kaffe.util.log.SimpleLogViewer" */ null;/** * If set to 'true', the last Window that is closed will automatically * call a System.exit() */ static boolean AutoStop = true;/** * Upper bound (in ms) between mouse button press events which will be * considered as a 'click' (will increase the MouseEvent clickCount) */ static int ClickInterval = 250;/** * maximum x,y coordinate distance (in pixels) between successive MOUSE_PRESSED * events which are still considered to be a click (required for some devices * without exact mouse positioning). */ static int ClickDistance = 0;/** * Sleep time (in ms) between native getNextEvent calls (= event polling rate). * Just used in case the native layer does not support blocked IO. */ static int EventPollingRate = 30;/** * Delay (in ms) between background native flush calls (from the flush thread) in case * the native layer needs flushing (queued graphics systems like X). This is only * required for apps doing graphics output outside the event dispatch thread, and for * native layers doing blocked IO (in this case the background drawing wouldn't appear * until something is going on in the dispatcher thread) */ static int GraFlushRate = 250;/** * Physical screen size in 1/10 inches (used for scaling purposes, e.g. fr printing) */ static int ScreenSize = 130;/** * just a shadow from the Defaults screen width (computed by the native layer) */ static int ScreenWidth;/** * just a shadow from the Defaults screen height (computed by the native layer) */ static int ScreenHeight;/** * screen resolution (in dpi), to be used for printing */ static int XResolution;/** * screen resolution (in dpi), to be used for printing */ static int YResolution;/** * Pixel height of MenuBars */ static int MenuBarHeight; static int ScrollbarWidth = 14;/** * Frame decoration extends (titlebar, size-borders) in pixels. For native windowing * systems (like X) this is just a guess, to be used for the first Frame to be opened, * and later on corrected (Frame.frameDeco). For standalone envionments, this is * an order */ static Insets FrameInsets = new Insets( 24,4,4,4);/** * Dialog decoration extends (titlebar, size-borders) in pixels. For native windowing * systems (like X) this is just a guess, to be used for the first Dialog to be opened, * and later on corrected (Dialog.dialogDeco). For standalone envionments, this is * an order */ static Insets DialogInsets = new Insets( 24, 4, 4, 4);/** * Native font description string for Default font. This can be used to customize fonts */ static String FsDefault;/** * Native font description string for Monospaced font. This can be used to customize fonts */ static String FsMonospaced;/** * Native font description string for SansSerif font. This can be used to customize fonts */ static String FsSansSerif;/** * Native font description string for Serif font. This can be used to customize fonts */ static String FsSerif;/** * Native font description string for Dialog font. This can be used to customize fonts */ static String FsDialog;/** * Native font description string for DialogInput font. This can be used to customize fonts */ static String FsDialogInput;/** * Native font description string for ZapfDingbats font. This can be used to customize fonts */ static String FsZapfDingbats;/** * This is a (priority-based) array of Java ARGB values for colors that should * be matched exactly. It is only used in PseudoColor visuals (256 color modes), * where we have to approximate Java 8-8-8 RGB colors by scarce colorcells. */ static int[] RgbRequests = { // !!! this has to be initialized before any Color usage 195<<16 | 195<<8 | 195, // lightgray 230<<16 | 230<<8 | 230, // lighter lightGray 163<<16 | 163<<8 | 163, // darker lightGray 190<<16 // dark red};/** * Color used to mark the focus Component (border) */ static Color FocusClr = new Color( 191, 0, 0);/** * Default foreground color for Windows */ static Color WndForeground = Color.black;/** * Default background color for Windows */ static Color WndBackground = Color.lightGray;/** * Default font for Windows */ static Font WndFont;/** * metrics of the WndFont (computed) */ static FontMetrics WndFontMetrics;/** * Default font for menus */ static Font MenuFont;/** * Default text color for menus */ static Color MenuTxtClr = Color.black;/** * Text color of selected meu item */ static Color MenuSelTxtClr = FocusClr;/** * Default background color for menus */ static Color MenuBgClr = Color.lightGray; static Color MenuSelBgClr = new Color( 180, 180, 180);/** * If set to 'true', menu text will be drawn "carved" (with a down-right highlight) */ static boolean MenuTxtCarved = true;/** * Default text font */ static Font TextFont;/** * Default TextArea background color */ static Color TextAreaBgClr = Color.white;/** * Default TextArea text color */ static Color TextAreaTxtClr = Color.black; static Color TextAreaRoBgClr = Color.white;/** * text color of non-editable TextComponents */ static Color TextAreaRoTxtClr = Color.gray;/** * Default TextArea font */ static Font TextAreaFont;/** * Default TextArea selection background color */ static Color TextAreaSelBgClr = Color.lightGray;/** * Default TextArea selection text color */ static Color TextAreaSelTxtClr = Color.black;/** * TextArea focus cursor color */ static Color TextCursorClr = Color.blue;/** * TextArea inactive (non-focus) cursor color */ static Color TextCursorInactiveClr = Color.gray;/** * If set to 'true', non-focused TextAreas keep their cursor displayed (in inactive color) */ static boolean ShowInactiveCursor;/** * If set to 'true', ScrollBars can get focus */ static boolean FocusScrolls;/** * Default TextField background color */ static Color TextFieldBgClr = Color.white;/** * Default TextField text color */ static Color TextFieldTxtClr = Color.black;/** * Default TextField selection background color */ static Color TextFieldSelBgClr = Color.lightGray;/** * Default TextField text color */ static Color TextFieldSelTxtClr = Color.black;/** * Default TextField font */ static Font TextFieldFont;/** * Default List font */ static Font ListFont;/** * Default List background color */ static Color ListBgClr = new Color( 223, 223, 223);/** * Default Lis text color */ static Color ListTxtClr = Color.black;/** * List selection background color */ static Color ListSelBgClr = new Color( 163, 163, 163);/** * List selection text color */ static Color ListSelTxtClr = Color.black;/** * List fly-over background color (item under mouse pointer) */ static Color ListFlyOverBgClr = new Color( 214, 214, 214);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -