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

freeseawind.lf.basic.list.LuckListUIBundle Maven / Gradle / Ivy

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

import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.UIDefaults;
import javax.swing.border.Border;

import freeseawind.lf.cfg.LuckResourceBundle;

/**
 * 

ListUI 资源绑定类。

* *

A ListUI resource bundle class.

* * @author freeseawind@github * @version 1.0 * */ public class LuckListUIBundle extends LuckResourceBundle { /** *

List单元格边框属性key

* *

List border properties.

*/ public static final String CELL_BORDER = "List.focusSelectedCellHighlightBorder"; /** *

List单元格无焦点边框属性key

* *

List cell no focus border properties.

*/ public static final String CELL_NOFOCUSBORDER = "List.cellNoFocusBorder"; /** *

List选中背景颜色key

* *

List background color properties when selected.

*/ public static final String SELECTIONBACKGROUND = "List.selectionBackground"; /** *

List选中字体颜色key

* *

List font color properties when selected.

*/ public static final String SELECTIONFOREGROUND = "List.selectionForeground"; /** *

List背景颜色key

* *

List background color properties.

*/ public static final String BACKGROUND = "List.background"; @Override protected void installBorder(UIDefaults table) { Border cellBorder = BorderFactory.createEmptyBorder(5, 5, 5, 0); table.put(CELL_BORDER, getBorderRes(cellBorder)); Border nofocusBorder = BorderFactory.createEmptyBorder(5, 5, 5, 0); table.put(CELL_NOFOCUSBORDER, getBorderRes(nofocusBorder)); } @Override protected void installColor(UIDefaults table) { table.put(SELECTIONBACKGROUND, getColorRes(60, 175, 210)); table.put(SELECTIONFOREGROUND, getColorRes(Color.WHITE)); table.put(BACKGROUND, getColorRes(Color.white)); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy