All Downloads are FREE. Search and download functionalities are using the official Maven repository.

freeseawind.lf.basic.checkboxmenuitem.LuckCheckboxMenuItemUIBundle Maven / Gradle / Ivy

The newest version!
package freeseawind.lf.basic.checkboxmenuitem;

import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.UIDefaults;
import javax.swing.UIManager;

import freeseawind.lf.cfg.LuckResourceBundle;
import freeseawind.lf.img.LuckIcon;
import freeseawind.lf.utils.LuckRes;

/**
 * 
 * LuckCheckBoxMenuItemUI资源绑定类。
 *
 * LuckCheckBoxMenuItemUI resource bundle class.
 * 
* * @author freeseawind@github * @version 1.0 */ public class LuckCheckboxMenuItemUIBundle extends LuckResourceBundle { /** *

* CheckBoxMenuItem选中时背景颜色属性key *

* *

* CheckBoxMenuItem background color properties when selected. *

*/ public static final String SELECTIONBG = "CheckBoxMenuItem.selectionBackground"; /** *

* CheckBoxMenuItem选中时字体颜色属性key *

* *

* CheckBoxMenuItem font color properties when selected. *

*/ public static final String SELECTIONFG = "CheckBoxMenuItem.selectionForeground"; /** *

* CheckBoxMenuItem选中时背景颜色属性key *

* *

* CheckBoxMenuItem background color properties when selected. *

*/ public static final String BACKGROUND = "CheckBoxMenuItem.background"; /** *

* CheckBoxMenuItem边框属性key> *

* *

* CheckBoxMenuItem border properties. *

*/ public static final String BORDER = "CheckBoxMenuItem.border"; /** *

* CheckBoxMenuItem复选框图标属性key *

* *

* CheckBoxMenuItem check Icon properties. *

*/ public static final String CHECK_ICON = "CheckBoxMenuItem.checkIcon"; /** *

* CheckBoxMenuItem箭头图标 *

* *

* CheckBoxMenuItem arrow icon properties. *

*/ public static final String ARROW_ICON = "CheckBoxMenuItem.arrowIcon"; /** *

* [LittleLuck属性] JCheckBoxMenuItem选中时图片属性key *

* *

* [LittleLuck Attributes] JCheckBoxMenuItem image properties when is selected. *

*/ public static final String NORMAL_IMG = "CheckBoxMenuItem.checkNormlIcon"; /** *

* [LittleLuck属性] JCheckBoxMenuItem选中时鼠标经过图片属性key *

* *

* [LittleLuck Attributes] JCheckBoxMenuItem image properties when the mouse passes and is selected. *

*/ public static final String ROLLVER_IMG = "CheckBoxMenuItem.checkRollverIcon"; /** *

* CheckBoxMenuItem文本和复选框图标间距属性key, 默认值4。 *

* *

* CheckBoxMenuItem after check icon gap properties, the default value is 4. *

*/ public static final String AFTERCHECKICONGAP = "CheckBoxMenuItem.afterCheckIconGap"; /** *

* CheckBoxMenuItem最小文本偏移宽度属性key, 默认值0。 *

* *

* CheckBoxMenuItem minimum text offset properties, the default value is 0. *

*/ public static final String MINIMUMTEXTOFFSET = "CheckBoxMenuItem.minimumTextOffset"; /** *

* CheckBoxMenuItem复选框图标偏移x轴距离属性key, 默认值4。 *

* *

* CheckBoxMenuItem check icon offset properties, the default value is 4. *

*/ public static final String CHECKICONOFFSET = "CheckBoxMenuItem.checkIconOffset"; public void uninitialize() { UIManager.put(NORMAL_IMG, null); UIManager.put(ROLLVER_IMG, null); } @Override protected void installColor(UIDefaults table) { table.put(SELECTIONBG, getColorRes(60, 175, 210)); table.put(SELECTIONFG, getColorRes(Color.WHITE)); table.put(BACKGROUND, getColorRes(Color.WHITE)); } @Override protected void installBorder(UIDefaults table) { table.put(BORDER, getBorderRes(BorderFactory.createEmptyBorder())); } @Override protected void loadImages(UIDefaults table) { table.put(CHECK_ICON, getIconRes(new LuckCheckboxIcon())); table.put(ARROW_ICON, getIconRes(new LuckIcon(0, 0))); table.put(NORMAL_IMG, LuckRes.getImage("menu/checkbox_normal.png")); table.put(ROLLVER_IMG, LuckRes.getImage("menu/checkbox_rollver.png")); } @Override protected void installOther(UIDefaults table) { table.put(AFTERCHECKICONGAP, 4); table.put(MINIMUMTEXTOFFSET, 0); table.put(CHECKICONOFFSET, 4); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy