本文整理汇总了Java中org.jdesktop.swingx.border.IconBorder类的典型用法代码示例。如果您正苦于以下问题:Java IconBorder类的具体用法?Java IconBorder怎么用?Java IconBorder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IconBorder类属于org.jdesktop.swingx.border包,在下文中一共展示了IconBorder类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTitleBorder
import org.jdesktop.swingx.border.IconBorder; //导入依赖的package包/类
/**
* @return
*/
private Border getTitleBorder() {
if (getComponent().isTraversable()) {
Icon downIcon = UIManager.getIcon("JXMonthView.monthDownFileName");
Icon upIcon = UIManager.getIcon("JXMonthView.monthUpFileName");
// fix for #1028-swingx: title border whacky for boxpadding 0
// in fact there had been a deeper issue - without using the arrowPadding here
// the hit-detection of the buttons is slightly off target
IconBorder up = new IconBorder(upIcon, SwingConstants.EAST, arrowPaddingX);
IconBorder down = new IconBorder(downIcon, SwingConstants.WEST, arrowPaddingX);
Border compound = BorderFactory.createCompoundBorder(up, down);
Border empty = BorderFactory.createEmptyBorder(2* arrowPaddingY, 0, 2*arrowPaddingY, 0);
return BorderFactory.createCompoundBorder(compound, empty);
}
return BorderFactory.createEmptyBorder(getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX(), getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX());
}