public class BorderFactory extends Object
| Modifier and Type | Method and Description |
|---|---|
static Border |
createBevelBorder(int type)
创建一个斜面的指定类型的边界,使用明亮的颜色组件的当前背景色突出,和黑暗的阴影的阴影。
|
static Border |
createBevelBorder(int type, Color highlight, Color shadow)
创建一个斜面的指定类型的边界,使用指定的高亮和阴影。
|
static Border |
createBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
创建一个斜面的指定类型的边界,使用指定的颜色的内部和外部的亮点和阴影区。
|
static CompoundBorder |
createCompoundBorder()
创建一个
null内边缘和外边缘
null复合边界。
|
static CompoundBorder |
createCompoundBorder(Border outsideBorder, Border insideBorder)
创建一个复合边框,指定用于外部和内部边缘的边框对象。
|
static Border |
createDashedBorder(Paint paint)
创建一个虚线框的指定
paint。
|
static Border |
createDashedBorder(Paint paint, float length, float spacing)
创建一个虚线框的指定
paint,相对
length,和相对
spacing。
|
static Border |
createDashedBorder(Paint paint, float thickness, float length, float spacing, boolean rounded)
创建一个虚线框的指定
paint,
thickness,线的形状、相对
length,和相对
spacing。
|
static Border |
createEmptyBorder()
创建一个不占用空间的空白边框。
|
static Border |
createEmptyBorder(int top, int left, int bottom, int right)
创建一个占用空间但没有绘图的空白边框,指定顶部、左、底部和右侧的宽度。
|
static Border |
createEtchedBorder()
创建一个“蚀刻”的外观使用组件的当前背景颜色的高亮和阴影创建一个边框。
|
static Border |
createEtchedBorder(Color highlight, Color shadow)
创建一个与“蚀刻”外观使用指定的突出和阴影颜色的边框。
|
static Border |
createEtchedBorder(int type)
创建一个“蚀刻”的外观使用组件的当前背景颜色的高亮和阴影创建一个边框。
|
static Border |
createEtchedBorder(int type, Color highlight, Color shadow)
创建一个与“蚀刻”外观使用指定的突出和阴影颜色的边框。
|
static Border |
createLineBorder(Color color)
创建一个边界线与指定的颜色。
|
static Border |
createLineBorder(Color color, int thickness)
用指定的颜色和宽度创建一个行边界。
|
static Border |
createLineBorder(Color color, int thickness, boolean rounded)
创建指定颜色、厚度和角形状的线条边框。
|
static Border |
createLoweredBevelBorder()
创建一个具有降低斜面的边,用明亮色调的组件的当前背景色突出,和黑暗的阴影的阴影。
|
static Border |
createLoweredSoftBevelBorder()
创建一个斜面边框与降低边缘和软化的角落,用明亮色调的组件的当前背景色突出,和黑暗的阴影的阴影。
|
static MatteBorder |
createMatteBorder(int top, int left, int bottom, int right, Color color)
使用一个坚实的颜色创建一个磨砂外观边框。
|
static MatteBorder |
createMatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
创建一个磨砂外观边框,由一个指定的图标的多个瓷砖组成。
|
static Border |
createRaisedBevelBorder()
创建一个凸起的斜面的边,用明亮色调的组件的当前背景色突出,和黑暗的阴影的阴影。
|
static Border |
createRaisedSoftBevelBorder()
创建一个斜面边框有凸起的边缘和软化的角落,用亮色调的组件的当前背景色突出,和黑暗的阴影的阴影。
|
static Border |
createSoftBevelBorder(int type)
创建一个斜面的指定类型的边界与软化的角落,用明亮色调的组件的当前背景色突出,和黑暗的阴影的阴影。
|
static Border |
createSoftBevelBorder(int type, Color highlight, Color shadow)
创建一个斜面边框指定类型的软角,使用指定的高亮和阴影。
|
static Border |
createSoftBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
创建一个斜面的指定类型的边界与软化的角落,用指定的颜色为亮点的内、外边缘和阴影区。
|
static Border |
createStrokeBorder(BasicStroke stroke)
创建一个边境的指定
stroke。
|
static Border |
createStrokeBorder(BasicStroke stroke, Paint paint)
创建一个边境指定的
stroke和
paint。
|
static TitledBorder |
createTitledBorder(Border border)
创建一个新的标题为空白标题,指定的边框对象,默认文本位置(由当前的外观和感觉决定),默认的理由(引导),和默认的字体和文本颜色(由当前的外观和感觉决定)。
|
static TitledBorder |
createTitledBorder(Border border, String title)
添加一个标题到一个现有的边框,默认的定位(由当前的外观和感觉),默认的理由(领导)和默认的字体和文本颜色(由当前的外观和感觉决定)。
|
static TitledBorder |
createTitledBorder(Border border, String title, int titleJustification, int titlePosition)
添加一个标题到一个现有的边框,用指定的定位和使用默认的字体和文本颜色(由当前的外观和感觉决定)。
|
static TitledBorder |
createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
添加一个标题到一个现有的边框,用指定的定位和字体,并使用默认的文本颜色(由当前的外观和感觉决定)。
|
static TitledBorder |
createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
添加一个标题到一个现有的边框,用指定的定位,字体和颜色。
|
static TitledBorder |
createTitledBorder(String title)
创建一个新的标题为指定的标题边框,默认边框类型(由当前外观和感觉决定),默认文本位置(由当前的外观和感觉),默认的理由(引导),默认的字体和文本颜色(由当前的外观和感觉决定)。
|
public static Border createLineBorder(Color color)
color -
Color使用线
Border对象
public static Border createLineBorder(Color color, int thickness)
createMatteBorder(int,int,int,int,Color)。
color -
Color使用线
thickness -以像素为单位指定宽度的整数
Border对象
public static Border createLineBorder(Color color, int thickness, boolean rounded)
color -边框的颜色
thickness -边界的厚度
rounded是否边角应该是圆的
Border对象
LineBorder.LineBorder(Color, int, boolean)
public static Border createRaisedBevelBorder()
Border对象
public static Border createLoweredBevelBorder()
Border对象
public static Border createBevelBorder(int type)
type -指定
BevelBorder.LOWERED或
BevelBorder.RAISED整数
Border对象
public static Border createBevelBorder(int type, Color highlight, Color shadow)
type -指定
BevelBorder.LOWERED或
BevelBorder.RAISED整数
highlight -突出
Color对象
shadow -
Color对象阴影
Border对象
public static Border createBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
type -指定
BevelBorder.LOWERED或
BevelBorder.RAISED整数
highlightOuter为突出区外缘的
Color对象
highlightInner为突出区内沿
Color对象
shadowOuter -阴影区域的外边缘的一
Color对象
shadowInner -阴影区域的内侧边缘
Color对象
Border对象
public static Border createRaisedSoftBevelBorder()
Border对象
public static Border createLoweredSoftBevelBorder()
Border对象
public static Border createSoftBevelBorder(int type)
BevelBorder.RAISED或
BevelBorder.LOWERED。
type -一种锥
Border对象或
null如果指定的类型无效
BevelBorder.BevelBorder(int)
public static Border createSoftBevelBorder(int type, Color highlight, Color shadow)
BevelBorder.RAISED或
BevelBorder.LOWERED。突出区域的外边缘用淡颜色的
highlight。阴影区域的内边缘用淡颜色的
shadow。
type -一种锥
highlight -突出区的基本颜色
shadow -阴影区的基本颜色
Border对象
BevelBorder.BevelBorder(int, Color, Color)
public static Border createSoftBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
BevelBorder.RAISED或
BevelBorder.LOWERED。注意:阴影内部和外部颜色被切换为降低的斜角边框。
type -一种锥
highlightOuter -色彩的突出区域的外边缘
highlightInner -色彩的突出区域内边缘
shadowOuter -色彩的阴影区域的外边缘
shadowInner -色彩的阴影区内边缘
Border对象
BevelBorder.BevelBorder(int, Color, Color, Color, Color)
public static Border createEtchedBorder()
Border对象
public static Border createEtchedBorder(Color highlight, Color shadow)
highlight为边界的一个
Color目标亮点
shadow -边境
Color对象阴影
Border对象
public static Border createEtchedBorder(int type)
type -一个
EtchedBorder.RAISED,或
EtchedBorder.LOWERED
Border对象
IllegalArgumentException如果类型是不是
EtchedBorder.RAISED或
EtchedBorder.LOWERED
public static Border createEtchedBorder(int type, Color highlight, Color shadow)
type -一个
EtchedBorder.RAISED,或
EtchedBorder.LOWERED
highlight为边界的一个
Color目标亮点
shadow -边境
Color对象阴影
Border对象
public static TitledBorder createTitledBorder(String title)
title -
String包含标题文本
TitledBorder对象
public static TitledBorder createTitledBorder(Border border)
border -添加标题的
Border对象;如果
null的
Border是目前看确定的感觉。
TitledBorder对象
public static TitledBorder createTitledBorder(Border border, String title)
border -
Border对象添加标题
title -
String包含标题文本
TitledBorder对象
public static TitledBorder createTitledBorder(Border border, String title, int titleJustification, int titlePosition)
border -
Border对象添加标题
title -
String包含标题文本
titleJustification指定标题的对齐整数——下列之一:
TitledBorder.LEFTTitledBorder.CENTERTitledBorder.RIGHTTitledBorder.LEADINGTitledBorder.TRAILINGTitledBorder.DEFAULT_JUSTIFICATION(龙头)titlePosition指定垂直位置关系到边境的文本--下面的一个整数:
TitledBorder.ABOVE_TOPTitledBorder.TOP(坐在顶线)TitledBorder.BELOW_TOPTitledBorder.ABOVE_BOTTOMTitledBorder.BOTTOM(坐在底线)TitledBorder.BELOW_BOTTOMTitledBorder.DEFAULT_POSITION(标题位置由目前看确定的感觉)TitledBorder对象
public static TitledBorder createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
border -
Border对象添加标题
title -
String包含标题文本
titleJustification指定标题的对齐整数——下列之一:
TitledBorder.LEFTTitledBorder.CENTERTitledBorder.RIGHTTitledBorder.LEADINGTitledBorder.TRAILINGTitledBorder.DEFAULT_JUSTIFICATION(龙头)titlePosition指定垂直位置关系到边境的文本--下面的一个整数:
TitledBorder.ABOVE_TOPTitledBorder.TOP(坐在顶线)TitledBorder.BELOW_TOPTitledBorder.ABOVE_BOTTOMTitledBorder.BOTTOM(坐在底线)TitledBorder.BELOW_BOTTOMTitledBorder.DEFAULT_POSITION(标题位置由目前看确定的感觉)titleFont -字体对象指定标题字体
public static TitledBorder createTitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
border -
Border对象添加标题
title -
String包含标题文本
titleJustification指定标题的对齐整数——下列之一:
TitledBorder.LEFTTitledBorder.CENTERTitledBorder.RIGHTTitledBorder.LEADINGTitledBorder.TRAILINGTitledBorder.DEFAULT_JUSTIFICATION(龙头)titlePosition指定垂直位置关系到边境的文本--下面的一个整数:
TitledBorder.ABOVE_TOPTitledBorder.TOP(坐在顶线)TitledBorder.BELOW_TOPTitledBorder.ABOVE_BOTTOMTitledBorder.BOTTOM(坐在底线)TitledBorder.BELOW_BOTTOMTitledBorder.DEFAULT_POSITION(标题位置由目前看确定的感觉)titleFont -
Font指定标题字体
titleColor -
Color对象指定标题的颜色
TitledBorder对象
public static Border createEmptyBorder()
Border对象
public static Border createEmptyBorder(int top, int left, int bottom, int right)
top指定顶部宽度的整数像素
left指定左侧宽度的整数像素
bottom指定底宽度的整数像素
right指定右侧宽度整数像素
Border对象
public static CompoundBorder createCompoundBorder()
null内边缘和外边缘
null复合边界。
CompoundBorder对象
public static CompoundBorder createCompoundBorder(Border outsideBorder, Border insideBorder)
outsideBorder为复合边界外缘的
Border对象
insideBorder为复合边界的内侧边缘
Border对象
CompoundBorder对象
public static MatteBorder createMatteBorder(int top, int left, int bottom, int right, Color color)
top指定顶部宽度的整数像素
left指定左侧宽度的整数像素
bottom指定右侧宽度整数像素
right指定底宽度的整数像素
color -
Color使用边界
MatteBorder对象
public static MatteBorder createMatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
注:
如果图标没有负荷,边境地区是灰色的。
top指定顶部宽度的整数像素
left指定左侧宽度的整数像素
bottom指定右侧宽度整数像素
right指定底宽度的整数像素
tileIcon用于边境瓦
Icon对象
MatteBorder对象
public static Border createStrokeBorder(BasicStroke stroke)
stroke。组件的前景颜色将被用于渲染边框。
stroke用于中风的形状
BasicStroke对象
Border对象
NullPointerException -如果指定
stroke是
null
public static Border createStrokeBorder(BasicStroke stroke, Paint paint)
stroke和
paint。如果指定的
paint是
null,组件的前景颜色将用于渲染边界。
stroke用于中风的形状
BasicStroke对象
paint -用于生成一个颜色的
Paint对象
Border对象
NullPointerException -如果指定
stroke是
null
public static Border createDashedBorder(Paint paint)
paint。如果指定的
paint是
null,组件的前景颜色将用于渲染边界。一段线的宽度等于
1。一个虚线与虚线之间的相对间隔的相对长度等于
1。一条虚线不圆。
paint -用于生成一个颜色的
Paint对象
Border对象
public static Border createDashedBorder(Paint paint, float length, float spacing)
paint,相对
length,和相对
spacing。如果指定的
paint是
null,组件的前景颜色将用于渲染边界。一段线的宽度等于
1。一条虚线不圆。
paint -
Paint对象用于产生一个颜色
length -一个虚线的相对长度
spacing虚线之间的相对间隔
Border对象
IllegalArgumentException -如果指定
length小于
1,或者指定的
spacing小于
0
public static Border createDashedBorder(Paint paint, float thickness, float length, float spacing, boolean rounded)
paint,
thickness,线的形状、相对
length,和相对
spacing。如果指定的
paint是
null,组件的前景颜色将用于渲染边界。
paint -用于生成一个颜色的
Paint对象
thickness -一个虚线的宽度
length -一个虚线的相对长度
spacing虚线之间的相对间隔
rounded是否线端应圆
Border对象
IllegalArgumentException -如果指定
thickness小于
1,或者指定的
length小于
1,或者指定的
spacing小于
0
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.