| |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
javax.swing.border
类 BevelBorder
java.lang.Object javax.swing.border.AbstractBorder javax.swing.border.BevelBorder
- 所有已实现的接口:
- Serializable, Border
public class BevelBorder
- extends AbstractBorder
该类实现简单的双线斜面边框。
警告:此类的已序列化对象与以后的 Swing 版本不兼容。当前序列化支持适用于短期存储,或适用于在运行相同 Swing 版本的应用程序之间进行 RMI(Remote Method Invocation,远程方法调用)。从 1.4 版本开始,已在 java.beans
包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder
。
字段摘要 | |
---|---|
protected int | bevelType |
protected Color | highlightInner |
protected Color | highlightOuter |
static int | LOWERED 凹入斜面类型。 |
static int | RAISED 凸出斜面类型。 |
protected Color | shadowInner |
protected Color | shadowOuter |
构造方法摘要 | |
---|---|
BevelBorder(int bevelType) 创建具有指定类型的斜面边框,其颜色将从传递给 paintBorder 方法的组件的背景色派生。 | |
BevelBorder(int bevelType, Color highlight, Color shadow) 创建具有指定类型、高亮和阴影颜色的斜面边框。 | |
BevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor) 创建具有指定类型、高亮和阴影颜色的斜面边框。 |
方法摘要 | |
---|---|
int | getBevelType() 返回斜面边框的类型。 |
Insets | getBorderInsets(Component c) 返回边框的 insets。 |
Insets | getBorderInsets(Component c, Insets insets) 用此边框的当前 Insets 重新初始化 insets 参数。 |
Color | getHighlightInnerColor() 返回斜面边框内部的高亮显示颜色。 |
Color | getHighlightInnerColor(Component c) 返回斜面边框在指定组件上呈现的内部高亮颜色。 |
Color | getHighlightOuterColor() 返回斜面边框外部的高亮颜色。 |
Color | getHighlightOuterColor(Component c) 返回斜面边框在指定组件上呈现的外部高亮颜色。 |
Color | getShadowInnerColor() 返回斜面边框内部的阴影颜色。 |
Color | getShadowInnerColor(Component c) 返回斜面边框在指定组件上呈现的内部阴影颜色。 |
Color | getShadowOuterColor() 返回斜面边框的外部阴影颜色。 |
Color | getShadowOuterColor(Component c) 返回斜面边框在指定组件上呈现的外部阴影颜色。 |
boolean | isBorderOpaque() 返回边框是否透明。 |
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height) 按指定的位置和尺寸绘制指定组件的边框。 |
protected void | paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height) |
protected void | paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height) |
从类 javax.swing.border.AbstractBorder 继承的方法 |
---|
getInteriorRectangle, getInteriorRectangle |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
RAISED
public static final int RAISED
- 凸出斜面类型。
- 另请参见:
- 常量字段值
LOWERED
public static final int LOWERED
- 凹入斜面类型。
- 另请参见:
- 常量字段值
bevelType
protected int bevelType
highlightOuter
protected Color highlightOuter
highlightInner
protected Color highlightInner
shadowInner
protected Color shadowInner
shadowOuter
protected Color shadowOuter
构造方法详细信息 |
---|
BevelBorder
public BevelBorder(int bevelType)
- 创建具有指定类型的斜面边框,其颜色将从传递给 paintBorder 方法的组件的背景色派生。
- 参数:
bevelType
- 边框斜面类型