![JAR search and dependency download from the Maven repository](/logo.png)
freeseawind.lf.basic.scroll.LuckScrollUIBundle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of littleluck Show documentation
Show all versions of littleluck Show documentation
Java Swing cross platform LookAndFeel
The newest version!
package freeseawind.lf.basic.scroll;
import java.awt.Color;
import javax.swing.BorderFactory;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.border.LineBorder;
import javax.swing.plaf.DimensionUIResource;
import freeseawind.lf.cfg.LuckResourceBundle;
import freeseawind.lf.utils.LuckRes;
/**
* ScrollPaneUI and ScrollBarUI and ViewportUI 资源绑定类。
*
* ScrollPaneUI and ScrollBarUI and ViewportUI resource bundle class.
*
* @author freeseawind@github
* @version 1.0
*
*/
public class LuckScrollUIBundle extends LuckResourceBundle
{
/**
* [LittleLuck属性]滚动条点九图属性key。
*
* [LittLeLuck Attributes] Scroll bar thumb image properties.
*/
public static final String SCROLLBAR_THUMBIMG = "Scrollbar.thumbIcon";
/**
* 滚动条边框属性key。
*
* Scroll bar border properties.
*/
public static final String SCROLLBAR_BORDER = "ScrollBar.border";
/**
* 滚动面板边框属性key。
*
* Scroll pane border properties.
*/
public static final String SCROLLPANE_BORDER = "ScrollPane.border";
/**
* 滚动条背景颜色属性key。
*
* Scroll bar background color properties.
*/
public static final String SCROLLBAR_BACKGROUND = "ScrollBar.background";
/**
* 滚动条宽度属性key, 默认值为9。
*
* Scroll bar width properties, default value 9.
*/
public static final String SCROLLBAR_WIDTH = "ScrollBar.width";
/**
*
* 滑块最小大小属性key, 默认值为Dimension(48,48)。
*
*
*
* Scroll bar minimum thumb size properties, default value
* Dimension(48, 48)
.
*
*/
public static final String MINIMUMTHUMBSIZE = "ScrollBar.minimumThumbSize";
public void uninitialize()
{
UIManager.put(SCROLLBAR_THUMBIMG, null);
}
@Override
protected void installBorder(UIDefaults table)
{
table.put(SCROLLBAR_BORDER, getBorderRes(BorderFactory.createEmptyBorder()));
table.put(SCROLLPANE_BORDER, getBorderRes(new LineBorder(new Color(200, 200, 200))));
}
@Override
protected void loadImages(UIDefaults table)
{
table.put(SCROLLBAR_THUMBIMG, LuckRes.getImage("scroll/thumb.png"));
}
@Override
protected void installOther(UIDefaults table)
{
table.put(SCROLLBAR_WIDTH, 9);
table.put(SCROLLBAR_BACKGROUND, getColorRes(Color.WHITE));
table.put(MINIMUMTHUMBSIZE, new DimensionUIResource(48, 48));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy