⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oceantheme.java

📁 Mobile 应用程序使用 Java Micro Edition (Java ME) 平台
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
                                               getHastenedIcon("icons/ocean/paletteClose-pressed.gif", table));                         }                     },            "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,            "TableHeader.focusCellBackground", c8ddf2,            "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(),            "Tree.dropLineColor", getPrimary1(),            "Table.dropLineColor", getPrimary1(),            "Table.dropLineShortColor", OCEAN_BLACK,                        "Table.dropCellBackground", OCEAN_DROP,            "Tree.dropCellBackground", OCEAN_DROP,            "List.dropCellBackground", OCEAN_DROP,            "List.dropLineColor", 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";    }    /**     * Returns the primary 1 color. This returns a color with an rgb hex value     * of {@code 0x6382BF}.     *     * @return the primary 1 color     * @see java.awt.Color#decode     */    protected ColorUIResource getPrimary1() {        return PRIMARY1;    }     /**     * Returns the primary 2 color. This returns a color with an rgb hex value     * of {@code 0xA3B8CC}.     *     * @return the primary 2 color     * @see java.awt.Color#decode     */    protected ColorUIResource getPrimary2() {        return PRIMARY2;    }    /**     * Returns the primary 3 color. This returns a color with an rgb hex value     * of {@code 0xB8CFE5}.     *     * @return the primary 3 color     * @see java.awt.Color#decode     */    protected ColorUIResource getPrimary3() {        return PRIMARY3;    }    /**     * Returns the secondary 1 color. This returns a color with an rgb hex     * value of {@code 0x7A8A99}.     *     * @return the secondary 1 color     * @see java.awt.Color#decode     */    protected ColorUIResource getSecondary1() {        return SECONDARY1;    }    /**     * Returns the secondary 2 color. This returns a color with an rgb hex     * value of {@code 0xB8CFE5}.     *     * @return the secondary 2 color     * @see java.awt.Color#decode     */    protected ColorUIResource getSecondary2() {        return SECONDARY2;    }    /**     * Returns the secondary 3 color. This returns a color with an rgb hex     * value of {@code 0xEEEEEE}.     *     * @return the secondary 3 color     * @see java.awt.Color#decode     */    protected ColorUIResource getSecondary3() {        return SECONDARY3;    }    /**     * Returns the black color. This returns a color with an rgb hex     * value of {@code 0x333333}.     *     * @return the black color     * @see java.awt.Color#decode     */    protected ColorUIResource getBlack() {        return OCEAN_BLACK;    }    /**     * Returns the desktop color. This returns a color with an rgb hex     * value of {@code 0xFFFFFF}.     *     * @return the desktop color     * @see java.awt.Color#decode     */    public ColorUIResource getDesktopColor() {        return MetalTheme.white;    }    /**     * Returns the inactive control text color. This returns a color with an     * rgb hex value of {@code 0x999999}.     *     * @return the inactive control text color     */    public ColorUIResource getInactiveControlTextColor() {        return INACTIVE_CONTROL_TEXT_COLOR;    }    /**     * Returns the control text color. This returns a color with an     * rgb hex value of {@code 0x333333}.     *     * @return the control text color     */    public ColorUIResource getControlTextColor() {        return CONTROL_TEXT_COLOR;    }    /**     * Returns the menu disabled foreground color. This returns a color with an     * rgb hex value of {@code 0x999999}.     *     * @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 + -