所有类


javax.swing.border
类 BevelBorder

java.lang.Object
  继承者 javax.swing.border.AbstractBorder
      继承者 javax.swing.border.BevelBorder
所有已实现的接口:
Serializable, Border
直接已知子类:
BorderUIResource.BevelBorderUIResource, SoftBevelBorder

public class BevelBorder
   
   
   
   
   
extends AbstractBorder

该类实现简单的双线斜面边框。

警告:此类的已序列化对象与以后的 Swing 版本不兼容。当前序列化支持适用于短期存储,或适用于在运行相同 Swing 版本的应用程序之间进行 RMI(Remote Method Invocation,远程方法调用)。从 1.4 版本开始,已在 java.beans 包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder


字段摘要
protected  intbevelType
           
protected  ColorhighlightInner
           
protected  ColorhighlightOuter
           
static intLOWERED
          凹入斜面类型。
static intRAISED
          凸出斜面类型。
protected  ColorshadowInner
           
protected  ColorshadowOuter
           
 
构造方法摘要
BevelBorder(int bevelType)
          创建具有指定类型的斜面边框,其颜色将从传递给 paintBorder 方法的组件的背景色派生。
BevelBorder(int bevelType, Color highlight, Color shadow)
          创建具有指定类型、高亮和阴影颜色的斜面边框。
BevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
          创建具有指定类型、高亮和阴影颜色的斜面边框。
 
方法摘要
 intgetBevelType()
          返回斜面边框的类型。
 InsetsgetBorderInsets(Component c)
          返回边框的 insets。
 InsetsgetBorderInsets(Component c, Insets insets)
          用此边框的当前 Insets 重新初始化 insets 参数。
 ColorgetHighlightInnerColor()
          返回斜面边框内部的高亮显示颜色。
 ColorgetHighlightInnerColor(Component c)
          返回斜面边框在指定组件上呈现的内部高亮颜色。
 ColorgetHighlightOuterColor()
          返回斜面边框外部的高亮颜色。
 ColorgetHighlightOuterColor(Component c)
          返回斜面边框在指定组件上呈现的外部高亮颜色。
 ColorgetShadowInnerColor()
          返回斜面边框内部的阴影颜色。
 ColorgetShadowInnerColor(Component c)
          返回斜面边框在指定组件上呈现的内部阴影颜色。
 ColorgetShadowOuterColor()
          返回斜面边框的外部阴影颜色。
 ColorgetShadowOuterColor(Component c)
          返回斜面边框在指定组件上呈现的外部阴影颜色。
 booleanisBorderOpaque()
          返回边框是否透明。
 voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height)
          按指定的位置和尺寸绘制指定组件的边框。
protected  voidpaintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height)
           
protected  voidpaintRaisedBevel(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 - 边框斜面类型