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

freeseawind.lf.basic.button.LuckButtonUIBundle Maven / Gradle / Ivy

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

import java.awt.Color;

import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;

import freeseawind.lf.cfg.LuckResourceBundle;

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

* Button边框属性key,边框默认间距(3, 14, 3, 15) *

* *

* Button border properties key, the default border spacing(3, 14, 3, 15) *

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

* [LittleLuck属性] 按钮颜色配置信息属性key,默认蓝色按钮 *

* *

* [LittLeLuck Attributes] Button color configuration information attribute * key, the default blue button. * *

*/ public static final String COLOR_INFO = "Button.colorInfo"; /** *

* Button背景颜色属性key, 默认白色 *

* *

* Button Background color property, Default white. *

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

* Button字体颜色属性key, 默认白色 *

* *

* Button font color property, Default white. *

*/ public static final String FOREGROUND = "Button.foreground"; /** *

* [LittleLuck属性] 如需要在有图标的时候仍绘制背景, 使用如下代码: * button.putClientProperty(IS_PAINTBG, ""); *

* *

* [LittLeLuck Attributes] If you need to draw the background when there is * an icon, use the following code: * button.putClientProperty(IS_PAINTBG, ""); *

*/ public static final String IS_PAINTBG = "Button.isPaintBG"; public void uninitialize() { UIManager.put(COLOR_INFO, null); UIManager.put(IS_PAINTBG, null); } @Override protected void installBorder(UIDefaults table) { table.put(BORDER, getBorderRes(new EmptyBorder(3, 14, 3, 15))); } @Override protected void installColor(UIDefaults table) { table.put(COLOR_INFO, LuckButtonColorFactory.getBlueBtnInfo()); table.put(BACKGROUND, getColorRes(Color.WHITE)); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy