public class StrokeBorder extends AbstractBorder
 警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,对于所有JavaBeans的长期存储的支持已经被添加到java.beans包中。 请参见XMLEncoder 。 
| Constructor and Description | 
|---|
| StrokeBorder(BasicStroke stroke)
              创建指定的边框 
              stroke。 | 
| StrokeBorder(BasicStroke stroke, Paint paint)
              创建指定的 
              stroke和paint。 | 
| Modifier and Type | Method and Description | 
|---|---|
| Insets | getBorderInsets(Component c, Insets insets)
              使用此边框的当前插图 
              insets参数。 | 
| Paint | getPaint() 
             返回在边框呈现期间生成颜色的 Paint对象。 | 
| BasicStroke | getStroke() 
             返回在边框渲染期间用于笔触形状的 BasicStroke对象。 | 
| void | paintBorder(Component c, Graphics g, int x, int y, int width, int height)
              用指定的位置和大小绘制指定组件的边框。 
             | 
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaquepublic StrokeBorder(BasicStroke stroke)
stroke 。 
           组件的前景颜色将用于渲染边框。 
          stroke - 用于描边形状的BasicStroke对象 
           NullPointerException - 如果指定的 
            stroke是 
            null 
           @ConstructorProperties(value={"stroke","paint"}) public StrokeBorder(BasicStroke stroke, Paint paint)
stroke和paint 。 
           如果指定的paint为null ,组件的前景颜色将用于渲染边框。 
          stroke - 用于描边形状的BasicStroke对象 
           paint - 用于生成颜色的Paint对象 
           NullPointerException - 如果指定的 
            stroke是 
            null 
           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 - 绘画边框的高度 
           NullPointerException - 如果指定的 
            g是 
            null 
           public Insets getBorderInsets(Component c, Insets insets)
insets参数。 
           每个插入是最大(最接近负无穷大)的整数值,大于或等于用于绘制边框的笔画线宽。 
          getBorderInsets在类别 
            AbstractBorder 
           c - 此边框插入值适用的组件 
           insets - 要重新初始化的 
            Insets对象 
           insets参数 
           NullPointerException - 如果指定的 
            insets是 
            null 
           Math.ceil(double) 
           public BasicStroke getStroke()
BasicStroke对象。 
          BasicStroke对象 
            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.