📄 defaults.java
字号:
static Color ListSelTxtClr = Color.black;/** * List fly-over background color (item under mouse pointer) */ static Color ListFlyOverBgClr = new Color( 214, 214, 214);/** * List fly-over text color (item under mouse pointer) */ static Color ListFlyOverTxtClr = Color.black;/** * If set to 'true', fly-over items will be drawn with an inset border * (outset otherwise) */ static boolean ListFlyOverInset;/** * Default Label text color */ static Color LabelClr = Color.black;/** * Default Label font */ static Font LabelFont;/** * If set to 'true', Label text will be drawn carved (with right-down highlight) */ static boolean LabelTxtCarved = true;/** * Default background color for Buttons */ static Color BtnClr = new Color( 163, 163, 163);/** * Default text color for Buttons */ static Color BtnTxtClr = Color.black;/** * Button background color if button is under mouse pointer */ static Color BtnPointClr = new Color( 180, 180, 180);/** * Button text color if button is under mouse pointer */ static Color BtnPointTxtClr = FocusClr;/** * Default font for Buttons */ static Font BtnFont;/** * If set to 'true', Button text will be drawn carved (with right-down highlight) */ static boolean BtnTxtCarved = true;/** * Color for Component borders */ static Color BorderClr = new Color( 159, 159, 159);/** * Name of RootWindow (screen) class. Only used in standalone environments */ static String RootWindowClass = "java.awt.RootWindow";/** * Background color for RootWindow (stand-alone environments only) */ static Color RootWindowClr = Color.blue;/** * Image filename to be used to tile RootWindow background (only for standalone environments) */ static String RootWindowImg = "marble.jpg";/** * Name of KeyTable translation class (only used in standalone environments) */ static String KeyTabClass = "java.awt.KeyTabGr";/** * Color for active window borders (only used in standalone environments) */ static Color WndActiveClr = new Color( 191, 0, 0);/** * Color for active window titlebar background (only used in standalone environments) */ static Color WndActiveTitleClr = Color.yellow;/** * Color for inactive window borders (only for standalone environments) */ static Color WndInactiveClr = Color.lightGray;/** * Color for inactive window titlebar background (only used in standalone environments) */ static Color WndInactiveTitleClr = Color.black;/** * Name of class to be used to control desktop pages and controls (only for * standalone environments) */ static String ControlBoxClass = "java.awt.WinTaskBar";/** * Name of class to be used to display and control minimized windows (only for * standalone environments) */ static String MinBoxClass = "java.awt.WinTaskBar";/** * Maximum size of image files to be produced immediately (when the corrseponding * image is created). Images with files exceeding this size will be produced * asynchronously on demand */ static int FileImageThreshold = Integer.MAX_VALUE;/** * Maximum size of image data buffers to be produced immediately (when the corrseponding * image is created). Images with data buffers exceeding this size will be produced * asynchronously on demand */ static int DataImageThreshold = Integer.MAX_VALUE;/** * Maximum size of MemoryImageSource data to be produced immediately (when the * corrseponding image is created). Images with data buffers exceeding this * size will be produced asynchronously on demand (currently, everything != 0 * will cause async production) */ static int MemImageSrcThreshold = Integer.MAX_VALUE; static int RecycleEvents = 0; static String banner; static String beep; static String UserInitClass = setStringValue( "awt.UserInitClass", null);static { // these are the computed values Dimension sd = Toolkit.getDefaultToolkit().getScreenSize(); ScreenWidth = sd.width; ScreenHeight = sd.height; MenuBarHeight = Toolkit.getDefaultToolkit().tlkGetMenubarHeight(); // HACK HACK HACK XXX if (ScreenSize == 0) { ScreenSize = 130; } // we assume a 4:3 width/height ratio of the display XResolution = (int)((double) ScreenWidth * 10 / ( 0.8 * ScreenSize)); // dpi YResolution = (int)((double) ScreenHeight * 10 / ( 0.6 * ScreenSize)); // dpi String version = Toolkit.tlkVersion(); if ( version.startsWith( "grx") ) { FsDefault = "helv%d%s%s.fnt"; FsMonospaced = "xm7x13b.fnt"; FsSansSerif = "helv%d%s%s.fnt"; FsSerif = "tms%d%s%s.fnt"; FsDialog = "cour%d%s%s.fnt"; FsDialogInput = "cour%d%s%s.fnt"; FsZapfDingbats = "helv%d%s%s.fnt"; } else if ( version.startsWith( "X") ) { //FsDefault = "-b&h-lucida-%s-%s-*-*-%d-*-*-*-*-*-*-*"; FsDefault = "-adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*"; FsMonospaced = "-adobe-courier-%s-%s-*-*-%d-*-*-*-*-*-*-*"; FsSansSerif = "-adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*"; FsSerif = "-adobe-times-%s-%s-*-*-%d-*-*-*-*-*-*-*"; FsDialog = "-misc-fixed-%s-%s-*-*-%d-*-*-*-*-*-*-*"; FsDialogInput = "-b&h-lucidatypewriter-%s-%s-*-*-%d-*-*-*-*-*-*-*"; FsZapfDingbats = "-adobe-new century schoolbook-%s-%s-*-*-%d-*-*-*-*-*-*-*"; } else if ( version.startsWith( "Win32") ) { FsDefault = "Helvetica"; FsMonospaced = "Courier New"; FsSansSerif = "Arial"; FsSerif = "Times New Roman"; FsDialog = "Arial"; FsDialogInput = "Courier New"; FsZapfDingbats = "WingDings"; } else { // no idea, we have to leave it for the native layer FsDefault = "Default"; FsMonospaced = "Monospaced"; FsSansSerif = "SansSerif"; FsSerif = "Serif"; FsDialog = "Dialog"; FsDialogInput = "DialogInput"; FsZapfDingbats = "ZapfDingbats"; } WndFont = new Font( "Default", Font.BOLD, 12); MenuFont = new Font( "Default", Font.BOLD, 11); TextFont = new Font( "Default", Font.BOLD, 12); TextAreaFont = new Font( "Dialog", Font.BOLD, 12); TextFieldFont = new Font( "Default", Font.BOLD, 12); ListFont = new Font( "Default", Font.BOLD, 12); LabelFont = new Font( "Default", Font.BOLD, 11); BtnFont = new Font( "Default", Font.BOLD, 11); WndFontMetrics = Toolkit.getDefaultToolkit().getFontMetrics( WndFont); beep = System.getProperty("awt.beep", "beep.wav"); // Display startup banner, if any if ( (banner = System.getProperty("awt.banner", "banner.gif")) != null ){ Toolkit.tlkDisplayBanner(banner); } if ( UserInitClass != null ) { try { Class asc = Class.forName( UserInitClass); } catch ( Exception x ) { System.err.println( "UserInitClass not initialized: " + x); } }}static boolean setBooleanValue ( String propKey, boolean defValue ) { boolean val; String s = System.getProperty( propKey); if ( s != null ) { val = s.equalsIgnoreCase( "true"); } else { val = defValue; } return val;}static Color setColorValue ( String propKey, Color defValue ) { Color val = defValue; String s = System.getProperty( propKey); if ( s != null ) { try { val = new Color( Integer.parseInt( s, 16)); } catch ( NumberFormatException x ) { System.err.println( "malformed awt property: " + propKey); } s = null; } return val;}static int setIntValue ( String propKey, int defValue ) { int val = defValue; String s = System.getProperty( propKey); if ( s != null ) { try { val = Integer.parseInt( s); } catch ( NumberFormatException x ) { System.err.println( "malformed awt property: " + propKey); } s = null; } return val;}static String setStringValue ( String propKey, String defValue ) { // we could do this directly via System.getProperty(key,def), but just // for Strings, and we want more types String val = System.getProperty( propKey); if ( val == null ) val = defValue; return val;}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -