本文整理汇总了Java中javax.swing.BorderFactory.createBevelBorder方法的典型用法代码示例。如果您正苦于以下问题:Java BorderFactory.createBevelBorder方法的具体用法?Java BorderFactory.createBevelBorder怎么用?Java BorderFactory.createBevelBorder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.BorderFactory
的用法示例。
在下文中一共展示了BorderFactory.createBevelBorder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: delegatedPaint
import javax.swing.BorderFactory; //导入方法依赖的package包/类
private void delegatedPaint(Graphics g) {
Color c = g.getColor();
try {
g.setColor(getBackground());
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(getForeground());
if (!tableUI) {
//in the panel, give self-painting editors a lowered
//border so they look like something
Border b = BorderFactory.createBevelBorder(BevelBorder.LOWERED);
b.paintBorder(this, g, 0, 0, getWidth(), getHeight());
}
Rectangle r = getBounds();
//XXX May be the source of Rochelle's multiple rows of error
//marking misalignment problem...(I do not jest)
r.x = (getWidth() > 16) ? ((editor instanceof Boolean3WayEditor) ? 0 : 3) : 0; //align text with other renderers
r.width -= ((getWidth() > 16) ? ((editor instanceof Boolean3WayEditor) ? 0 : 3) : 0); //align text with other renderers
r.y = 0;
editor.paintValue(g, r);
} finally {
g.setColor(c);
}
}
示例2: createInstanceImpl
import javax.swing.BorderFactory; //导入方法依赖的package包/类
protected Border createInstanceImpl() {
if (highlightOuter == null && shadowInner == null) {
if (highlightInner == null && shadowOuter == null) {
return BorderFactory.createBevelBorder(bevelType);
} else {
return BorderFactory.createBevelBorder(bevelType,
highlightInner.createInstance(), shadowOuter.createInstance());
}
} else {
return BorderFactory.createBevelBorder(bevelType,
highlightOuter.createInstance(), highlightInner.createInstance(),
shadowOuter.createInstance(), shadowInner.createInstance());
}
}