public abstract class AbstractBorder extends Object implements Border, Serializable
 警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,对于所有JavaBeans的长期存储的支持已经被添加到java.beans包中。 请参阅XMLEncoder 。 
| Constructor and Description | 
|---|
| AbstractBorder() | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getBaseline(Component c, int width, int height)
              返回基线。 
             | 
| Component.BaselineResizeBehavior | getBaselineResizeBehavior(Component c)
              返回一个枚举,指示组件的基线如何随着大小的变化而改变。 
             | 
| Insets | getBorderInsets(Component c) 
             此默认实现返回由 getBorderInsets(Component,Insets)方法初始化的新的Insets对象。 | 
| Insets | getBorderInsets(Component c, Insets insets)
              使用此Border的当前Insets重新初始化insets参数。 
             | 
| static Rectangle | getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)
              使用参数减去边框的插入返回一个矩形。 
             | 
| Rectangle | getInteriorRectangle(Component c, int x, int y, int width, int height)
              这种方便方法调用静态方法。 
             | 
| boolean | isBorderOpaque()
              此默认实现返回false。 
             | 
| void | paintBorder(Component c, Graphics g, int x, int y, int width, int height)
              此默认实现不绘画。 
             | 
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder在界面 
            Border 
           c - 正在绘制边框的组件 
           g - 油漆图形 
           x - 绘画边框的x位置 
           y - 绘画边框的y位置 
           width - 绘画边框的宽度 
           height - 绘画边框的高度 
           public Insets getBorderInsets(Component c)
getBorderInsets(Component,Insets)方法初始化的新的Insets对象。 
           默认情况下, top , left , bottom和right字段设置为0 。 
          getBorderInsets在界面 
            Border 
           c - 应用此边界插入值的组件 
           Insets对象 
           public Insets getBorderInsets(Component c, Insets insets)
c - 应用此边界插入值的组件 
           insets - 要重新初始化的对象 
           insets对象 
           public boolean isBorderOpaque()
isBorderOpaque在界面 
            Border 
           public Rectangle getInteriorRectangle(Component c, int x, int y, int width, int height)
c - 计算此边框的组件 
           x - 边框的x位置 
           y - 边框的y位置 
           width - 边框的宽度 
           height - 边框的高度 
           Rectangle内部坐标的Rectangle 
           public static Rectangle getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)
c - 计算此边框的组件 
           b - 
            Border对象 
           x - 边框的x位置 
           y - 边框的y位置 
           width - 边框的宽度 
           height - 边框的高度 
           Rectangle内部坐标的Rectangle 
           public int getBaseline(Component c, int width, int height)
 默认实现返回-1。 支持基准的子类应适当地覆盖。 如果返回值> = 0,则组件具有任何大小的有效基线> =最小大小,并且getBaselineResizeBehavior可用于确定基准如何随大小而变化。 
c - 
            Component正在请求基准 
           width - 获取基准的宽度 
           height - 获取基准的高度 
           IllegalArgumentException - 如果宽度或高度<0 
           Component.getBaseline(int,int) , 
            Component.getBaselineResizeBehavior() 
           public Component.BaselineResizeBehavior getBaselineResizeBehavior(Component c)
 默认实现返回BaselineResizeBehavior.OTHER ,支持基线的子类应适当覆盖。 子类不应该返回null ; 如果基线不能计算返回BaselineResizeBehavior.OTHER 。 呼叫者应首先使用getBaseline询问基线,如果返回值> = 0,则使用此方法。 它是可以接受的此方法以返回以外的值BaselineResizeBehavior.OTHER即使getBaseline返回的值小于0。 
c - 
            Component以返回基准调整大小行为 
           Component.getBaseline(int,int) , 
            Component.getBaselineResizeBehavior() 
            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.