public class EtchedBorder extends AbstractBorder
 警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4版本开始,所有JavaBeans的长期存储支持已被添加到java.beans包中。 请参阅XMLEncoder 。 
| Modifier and Type | Field and Description | 
|---|---|
| protected int | etchType | 
| protected Color | highlight | 
| static int | LOWERED
              降蚀刻型。 
             | 
| static int | RAISED
              凸版蚀刻型。 
             | 
| protected Color | shadow | 
| Constructor and Description | 
|---|
| EtchedBorder()
              创建一个下降的蚀刻边框,其颜色将从传递到paintBorder方法的组件的背景颜色派生。 
             | 
| EtchedBorder(Color highlight, Color shadow)
              使用指定的高光和阴影颜色创建一个降低的蚀刻边框。 
             | 
| EtchedBorder(int etchType)
              使用指定的蚀刻类型创建蚀刻边框,其颜色将从传递到paintBorder方法的组件的背景颜色派生。 
             | 
| EtchedBorder(int etchType, Color highlight, Color shadow)
              使用指定的蚀刻类型,高光和阴影颜色创建蚀刻边框。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| Insets | getBorderInsets(Component c, Insets insets)
              使用此Border的当前Insets重新初始化insets参数。 
             | 
| int | getEtchType()
              返回蚀刻边界上设置的蚀刻类型。 
             | 
| Color | getHighlightColor()
              返回蚀刻边框的突出显示颜色。 
             | 
| Color | getHighlightColor(Component c)
              在指定的组件上渲染时返回蚀刻边框的突出显示颜色。 
             | 
| Color | getShadowColor()
              返回蚀刻边框的阴影颜色。 
             | 
| Color | getShadowColor(Component c)
              在指定的组件上呈现时,返回蚀刻边框的阴影颜色。 
             | 
| boolean | isBorderOpaque()
              返回边框是否不透明。 
             | 
| void | paintBorder(Component c, Graphics g, int x, int y, int width, int height)
              用指定的位置和大小绘制指定组件的边框。 
             | 
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectanglepublic static final int RAISED
public static final int LOWERED
protected int etchType
protected Color highlight
protected Color shadow
public EtchedBorder()
public EtchedBorder(int etchType)
etchType - 由边框绘制的蚀刻类型 
           public EtchedBorder(Color highlight, Color shadow)
highlight - 用于蚀刻高光的颜色 
           shadow - 蚀刻阴影使用的颜色 
           @ConstructorProperties(value={"etchType","highlightColor","shadowColor"}) public EtchedBorder(int etchType, Color highlight, Color shadow)
etchType - 由边框绘制的蚀刻类型 
           highlight - 用于蚀刻高光的颜色 
           shadow - 蚀刻阴影使用的颜色 
           public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder在界面 
            Border 
           paintBorder在类别 
            AbstractBorder 
           c - 正在绘制边框的组件 
           g - 油漆图形 
           x - 绘画边框的x位置 
           y - 绘画边框的y位置 
           width - 绘制边框的宽度 
           height - 绘画边框的高度 
           public Insets getBorderInsets(Component c, Insets insets)
getBorderInsets在类别 
            AbstractBorder 
           c - 此边界插入值的组件适用 
           insets - 要重新初始化的对象 
           insets对象 
           public boolean isBorderOpaque()
isBorderOpaque在界面 
            Border 
           isBorderOpaque在类别 
            AbstractBorder 
           public int getEtchType()
public Color getHighlightColor(Component c)
c - 可以导出突出显示的组件 
           public Color getHighlightColor()
public Color getShadowColor(Component c)
c - 可以导出阴影的组件 
           public Color getShadowColor()
 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.