public class BevelBorder extends AbstractBorder
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans
包。请看XMLEncoder
。
Modifier and Type | Field and Description |
---|---|
protected int |
bevelType |
protected Color |
highlightInner |
protected Color |
highlightOuter |
static int |
LOWERED
降低锥型。
|
static int |
RAISED
凸起斜角式。
|
protected Color |
shadowInner |
protected Color |
shadowOuter |
Constructor and Description |
---|
BevelBorder(int bevelType)
创建一个具有指定类型的颜色将从组件传递到paintborder方法背景色锥边界。
|
BevelBorder(int bevelType, Color highlight, Color shadow)
创建指定类型的斜面边框,突出显示颜色和阴影颜色。
|
BevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
创建指定类型的斜面边框,突出显示颜色和阴影颜色。
|
Modifier and Type | Method and Description |
---|---|
int |
getBevelType()
返回斜角边框的类型。
|
Insets |
getBorderInsets(Component c, Insets insets)
初始化参数和边界的插图插图。
|
Color |
getHighlightInnerColor()
返回斜角边框的内部突出显示颜色。
|
Color |
getHighlightInnerColor(Component c)
当渲染到指定的组件时,返回斜角边框的内部突出显示颜色。
|
Color |
getHighlightOuterColor()
返回斜角边框的外部突出显示颜色。
|
Color |
getHighlightOuterColor(Component c)
当渲染到指定的组件时,返回斜角边框的外部突出显示颜色。
|
Color |
getShadowInnerColor()
返回斜角边框的内部阴影颜色。
|
Color |
getShadowInnerColor(Component c)
当渲染到指定的组件时,返回斜角边框的内部阴影颜色。
|
Color |
getShadowOuterColor()
返回斜角边框的外部阴影颜色。
|
Color |
getShadowOuterColor(Component c)
当渲染到指定的组件时返回斜角边框的外部阴影颜色。
|
boolean |
isBorderOpaque()
返回是否边框是不透明的。
|
void |
paintBorder(Component c, Graphics g, int x, int y, int width, int height)
用指定的位置和大小绘制指定组件的边框。
|
protected void |
paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height) |
protected void |
paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height) |
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
public static final int RAISED
public static final int LOWERED
protected int bevelType
protected Color highlightOuter
protected Color highlightInner
protected Color shadowInner
protected Color shadowOuter
public BevelBorder(int bevelType)
bevelType
-锥型边界
public BevelBorder(int bevelType, Color highlight, Color shadow)
bevelType
-锥型边界
highlight
-使用的颜色为锥突出
shadow
-颜色使用的斜影
@ConstructorProperties(value={"bevelType","highlightOuterColor","highlightInnerColor","shadowOuterColor","shadowInnerColor"}) public BevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)
bevelType
-锥型边界
highlightOuterColor
-使用的颜色为锥外突出
highlightInnerColor
-使用的颜色为锥内突出
shadowOuterColor
-使用的颜色为锥外的影子
shadowInnerColor
-使用的颜色为锥内阴影
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder
接口
Border
paintBorder
方法重写,继承类
AbstractBorder
c
的组件,这个边界是被涂
g
-绘制的图形
x
-画边框的位置
y
-画边框的位置
width
-画的边框宽度
height
-画边框的高度
public Insets getBorderInsets(Component c, Insets insets)
getBorderInsets
方法重写,继承类
AbstractBorder
c
的组件,这个边界值运用插图
insets
-重新初始化对象
insets
对象
public Color getHighlightOuterColor(Component c)
c
的成分,突出的可能来源
public Color getHighlightInnerColor(Component c)
c
的成分,突出的可能来源
public Color getShadowInnerColor(Component c)
c
-组件的阴影可能来源
public Color getShadowOuterColor(Component c)
c
-组件的阴影可能来源
public Color getHighlightOuterColor()
public Color getHighlightInnerColor()
public Color getShadowInnerColor()
public Color getShadowOuterColor()
public int getBevelType()
public boolean isBorderOpaque()
isBorderOpaque
接口
Border
isBorderOpaque
方法重写,继承类
AbstractBorder
protected void paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height)
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.