public class LineBorder extends AbstractBorder
 警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,对于所有JavaBeans的长期存储的支持已被添加到java.beans包中。 请参阅XMLEncoder 。 
| Modifier and Type | Field and Description | 
|---|---|
| protected Color | lineColor | 
| protected boolean | roundedCorners | 
| protected int | thickness | 
| Constructor and Description | 
|---|
| LineBorder(Color color)
              创建具有指定颜色和厚度= 1的线边框。 
             | 
| LineBorder(Color color, int thickness)
              创建具有指定颜色和厚度的线条边框。 
             | 
| LineBorder(Color color, int thickness, boolean roundedCorners)
              创建具有指定颜色,粗细和拐角形状的线条边框。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| static Border | createBlackLineBorder()
              获取Color.black LineBorder厚度为1的便捷方法。 
             | 
| static Border | createGrayLineBorder()
              获得Color.gray LineBorder厚度为1的便捷方法。 
             | 
| Insets | getBorderInsets(Component c, Insets insets)
              使用此Border的当前Insets重新初始化insets参数。 
             | 
| Color | getLineColor()
              返回边框的颜色。 
             | 
| boolean | getRoundedCorners()
              返回此边框是否以圆角绘制。 
             | 
| int | getThickness()
              返回边框的厚度。 
             | 
| boolean | isBorderOpaque()
              返回边框是否不透明。 
             | 
| void | paintBorder(Component c, Graphics g, int x, int y, int width, int height)
              用指定的位置和大小绘制指定组件的边框。 
             | 
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangleprotected int thickness
protected Color lineColor
protected boolean roundedCorners
public LineBorder(Color color)
color - 边框的颜色 
           public LineBorder(Color color, int thickness)
color - 边框的颜色 
           thickness - 边框的厚度 
           @ConstructorProperties(value={"lineColor","thickness","roundedCorners"}) public LineBorder(Color color, int thickness, boolean roundedCorners)
color - 边框的颜色 
           thickness - 边框的厚度 
           roundedCorners - 边角是否应该是圆的 
           public static Border createBlackLineBorder()
public static Border createGrayLineBorder()
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 Color getLineColor()
public int getThickness()
public boolean getRoundedCorners()
public boolean isBorderOpaque()
isBorderOpaque在界面 
            Border 
           isBorderOpaque在类别 
            AbstractBorder 
            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.