public class SoftBevelBorder extends BevelBorder
警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4版本开始,所有JavaBeans的长期存储支持已被添加到java.beans软件包中。 请参阅XMLEncoder 。
bevelType, highlightInner, highlightOuter, LOWERED, RAISED, shadowInner, shadowOuter| Constructor and Description |
|---|
SoftBevelBorder(int bevelType)
创建具有指定类型的斜角边框,其颜色将从传递到paintBorder方法的组件的背景颜色派生。
|
SoftBevelBorder(int bevelType, Color highlight, Color shadow)
创建具有指定类型,高亮和阴影颜色的斜角边框。
|
SoftBevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
创建具有指定类型的斜角边框,突出显示阴影颜色。
|
| Modifier and Type | Method and Description |
|---|---|
Insets |
getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。
|
boolean |
isBorderOpaque()
返回边框是否不透明。
|
void |
paintBorder(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的边框。
|
getBevelType, getHighlightInnerColor, getHighlightInnerColor, getHighlightOuterColor, getHighlightOuterColor, getShadowInnerColor, getShadowInnerColor, getShadowOuterColor, getShadowOuterColor, paintLoweredBevel, paintRaisedBevelgetBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectanglepublic SoftBevelBorder(int bevelType)
bevelType - 边框的斜面类型
public SoftBevelBorder(int bevelType,
Color highlight,
Color shadow)
bevelType - 边框的斜角类型
highlight - 用于斜面突出显示的颜色
shadow - 用于斜面阴影的颜色
@ConstructorProperties(value={"bevelType","highlightOuterColor","highlightInnerColor","shadowOuterColor","shadowInnerColor"}) public SoftBevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
bevelType - 边框的斜面类型
highlightOuterColor - 用于斜面外部高光的颜色
highlightInnerColor - 用于斜面内部高光的颜色
shadowOuterColor - 用于斜面外阴影的颜色
shadowInnerColor - 用于斜角内影的颜色
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder在界面
Border
paintBorder在类别
BevelBorder
c - 正在绘制此边框的组件
g - 油漆图形
x - 绘画边框的x位置
y - 绘画边框的y位置
width - 绘制边框的宽度
height - 绘画边框的高度
public Insets getBorderInsets(Component c, Insets insets)
getBorderInsets在类别
BevelBorder
c - 应用此边界插入值的组件
insets - 要重新初始化的对象
insets对象
public boolean isBorderOpaque()
isBorderOpaque在界面
Border
isBorderOpaque在类别
BevelBorder
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.