📄 oceantheme.java
字号:
}, "List.focusCellHighlightBorder", focusBorder, "MenuBarUI", "javax.swing.plaf.metal.MetalMenuBarUI", "OptionPane.errorIcon", getIconResource("icons/ocean/error.png"), "OptionPane.informationIcon", getIconResource("icons/ocean/info.png"), "OptionPane.questionIcon", getIconResource("icons/ocean/question.png"), "OptionPane.warningIcon", getIconResource("icons/ocean/warning.png"), "RadioButton.gradient", buttonGradient, "RadioButton.rollover", Boolean.TRUE, "RadioButtonMenuItem.gradient", buttonGradient, "ScrollBar.gradient", buttonGradient, "Slider.altTrackColor", new ColorUIResource(0xD2E2EF), "Slider.gradient", sliderGradient, "Slider.focusGradient", sliderGradient, "SplitPane.oneTouchButtonsOpaque", Boolean.FALSE, "SplitPane.dividerFocusColor", c8ddf2, "TabbedPane.borderHightlightColor", getPrimary1(), "TabbedPane.contentAreaColor", c8ddf2, "TabbedPane.contentBorderInsets", new Insets(4, 2, 3, 3), "TabbedPane.selected", c8ddf2, "TabbedPane.tabAreaBackground", dadada, "TabbedPane.tabAreaInsets", new Insets(2, 2, 0, 6), "TabbedPane.unselectedBackground", SECONDARY3, "Table.focusCellHighlightBorder", focusBorder, "Table.gridColor", SECONDARY1, "ToggleButton.gradient", buttonGradient, "ToolBar.borderColor", cccccc, "ToolBar.isRollover", Boolean.TRUE, "Tree.closedIcon", directoryIcon, "Tree.collapsedIcon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { return new COIcon(getHastenedIcon("icons/ocean/collapsed.gif", table), getHastenedIcon("icons/ocean/collapsed-rtl.gif", table)); } }, "Tree.expandedIcon", getIconResource("icons/ocean/expanded.gif"), "Tree.leafIcon", fileIcon, "Tree.openIcon", directoryIcon, "Tree.selectionBorderColor", getPrimary1() }; table.putDefaults(defaults); } /** * Overriden to enable picking up the system fonts, if applicable. */ boolean isSystemTheme() { return true; } /** * Return the name of this theme, "Ocean". * * @return "Ocean" */ public String getName() { return "Ocean"; } /** * Return the color that the Metal Look and Feel should use * as "Primary 1". The Look and Feel will use this color * in painting as it sees fit. * * @return the "Primary 1" color. */ protected ColorUIResource getPrimary1() { return PRIMARY1; } /** * Return the color that the Metal Look and Feel should use * as "Primary 2". The Look and Feel will use this color * in painting as it sees fit. * * @return the "Primary 2" color. */ protected ColorUIResource getPrimary2() { return PRIMARY2; } /** * Return the color that the Metal Look and Feel should use * as "Primary 3". The Look and Feel will use this color * in painting as it sees fit. * * @return the "Primary 3" color. */ protected ColorUIResource getPrimary3() { return PRIMARY3; } /** * Return the color that the Metal Look and Feel should use * as "Secondary 1". The Look and Feel will use this color * in painting as it sees fit. * * @return the "Secondary 1" color. */ protected ColorUIResource getSecondary1() { return SECONDARY1; } /** * Return the color that the Metal Look and Feel should use * as "Secondary 2". The Look and Feel will use this color * in painting as it sees fit. * * @return the "Secondary 2" color. */ protected ColorUIResource getSecondary2() { return SECONDARY2; } /** * Return the color that the Metal Look and Feel should use * as "Secondary 3". The Look and Feel will use this color * in painting as it sees fit. * * @return the "Secondary 3" color. */ protected ColorUIResource getSecondary3() { return SECONDARY3; } /** * Return the color that the Metal Look and Feel should use * as "Black". The Look and Feel will use this color * in painting as it sees fit. This color does not necessarily * synch up with the typical concept of black, nor is * it necessarily used for all black items. * * @return the "Black" color. */ protected ColorUIResource getBlack() { return OCEAN_BLACK; } /** * Return the color that the Metal Look and Feel should use * for the desktop background. The Look and Feel will use this color * in painting as it sees fit. * * @return the "Desktop" color. */ public ColorUIResource getDesktopColor() { return MetalTheme.white; } /** * Return the color that the Metal Look and Feel should use as the default * color for inactive controls. The Look and Feel will use this color * in painting as it sees fit. * * @return the "Inactive Control Text" color. */ public ColorUIResource getInactiveControlTextColor() { return INACTIVE_CONTROL_TEXT_COLOR; } /** * Return the color that the Metal Look and Feel should use as the default * color for controls. The Look and Feel will use this color * in painting as it sees fit. * * @return the "Control Text" color. */ public ColorUIResource getControlTextColor() { return CONTROL_TEXT_COLOR; } /** * Return the color that the Metal Look and Feel should use as the * foreground color for disabled menu items. The Look and Feel will use * this color in painting as it sees fit. * * @return the "Menu Disabled Foreground" color. */ public ColorUIResource getMenuDisabledForeground() { return MENU_DISABLED_FOREGROUND; } private Object getIconResource(String iconID) { return SwingUtilities2.makeIcon(getClass(), OceanTheme.class, iconID); } // makes use of getIconResource() to fetch an icon and then hastens it // - calls createValue() on it and returns the actual icon private Icon getHastenedIcon(String iconID, UIDefaults table) { Object res = getIconResource(iconID); return (Icon)((UIDefaults.LazyValue)res).createValue(table); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -