- java.lang.Object
-
- javax.swing.border.AbstractBorder
-
- javax.swing.border.BevelBorder
-
- javax.swing.border.SoftBevelBorder
-
- All Implemented Interfaces:
-
Serializable,Border
public class SoftBevelBorder extends BevelBorder
实现具有软化拐角的凸起或降低的斜面的课程。警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,所有JavaBeans的长期存储支持已被添加到
java.beans包中。 请参阅XMLEncoder。- 另请参见:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.border.BevelBorder
bevelType, highlightInner, highlightOuter, LOWERED, RAISED, shadowInner, shadowOuter
-
-
构造方法摘要
构造方法 Constructor 描述 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 方法 描述 InsetsgetBorderInsets(Component c, Insets insets)使用此Border的当前Insets重新初始化insets参数。booleanisBorderOpaque()返回边框是否不透明。voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height)用指定的位置和大小绘制指定组件的边框。-
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
-
Methods inherited from class javax.swing.border.BevelBorder
getBevelType, getHighlightInnerColor, getHighlightInnerColor, getHighlightOuterColor, getHighlightOuterColor, getShadowInnerColor, getShadowInnerColor, getShadowOuterColor, getShadowOuterColor, paintLoweredBevel, paintRaisedBevel
-
-
-
-
构造方法详细信息
-
SoftBevelBorder
public SoftBevelBorder(int bevelType)
创建具有指定类型的斜角边框,其颜色将从传递到paintBorder方法的组件的背景颜色派生。- 参数
-
bevelType- 边框的斜面类型
-
SoftBevelBorder
public SoftBevelBorder(int bevelType, Color highlight, Color shadow)创建具有指定类型,高亮和阴影颜色的斜角边框。- 参数
-
bevelType- 边框的斜面类型 -
highlight- 用于斜面突出显示的颜色 -
shadow- 用于斜面阴影的颜色
-
SoftBevelBorder
@ConstructorProperties({"bevelType","highlightOuterColor","highlightInnerColor","shadowOuterColor","shadowInnerColor"}) public SoftBevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
创建具有指定类型的斜角边框,突出显示阴影颜色。- 参数
-
bevelType- 边框的斜面类型 -
highlightOuterColor- 用于斜面外部高光的颜色 -
highlightInnerColor- 用于斜面内部高光的颜色 -
shadowOuterColor- 用于斜面外阴影的颜色 -
shadowInnerColor- 用于斜角内影的颜色
-
-
方法详细信息
-
paintBorder
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的边框。- Specified by:
-
paintBorder在接口Border - 重写:
-
paintBorder在BevelBorder - 参数
-
c- 正在绘制此边框的组件 -
g- 油漆图形 -
x- 绘画边框的x位置 -
y- 绘画边框的y位置 -
width- 绘制边框的宽度 -
height- 绘画边框的高度
-
getBorderInsets
public Insets getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。- 重写:
-
getBorderInsets在BevelBorder - 参数
-
c- 此边框插入值适用的组件 -
insets- 要重新初始化的对象 - 结果
-
insets对象
-
isBorderOpaque
public boolean isBorderOpaque()
返回边框是否不透明。- Specified by:
-
isBorderOpaque在接口Border - 重写:
-
isBorderOpaque在BevelBorder - 结果
- 真正
-
-