APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.border

public Class SoftBevelBorder

extends BevelBorder
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.awt.Graphics, .Insets, .Rectangle, .Color, .Component, java.beans.ConstructorProperties

A class which implements a raised or lowered bevel with softened corners.

Warning

Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see java.beans.XMLEncoder.

Authors
Amy Fowler, Chester Rose

Field Summary

Inherited from javax.swing.border.BevelBorder:
bevelTypehighlightInnerhighlightOuterLOWEREDRAISEDshadowInnershadowOuter

Constructor Summary

AccessConstructor and Description
public
SoftBevelBorder(int
the type of bevel for the border
bevelType
)

Creates a bevel border with the specified type and whose colors will be derived from the background color of the component passed into the paintBorder method.

public
SoftBevelBorder(int
the type of bevel for the border
bevelType
,
Color
the color to use for the bevel highlight
highlight
,
Color
the color to use for the bevel shadow
shadow
)

Creates a bevel border with the specified type, highlight and shadow colors.

public
SoftBevelBorder(int
the type of bevel for the border
bevelType
,
Color
the color to use for the bevel outer highlight
highlightOuterColor
,
Color
the color to use for the bevel inner highlight
highlightInnerColor
,
Color
the color to use for the bevel outer shadow
shadowOuterColor
,
Color
the color to use for the bevel inner shadow
shadowInnerColor
)

Creates a bevel border with the specified type, highlight shadow colors.

Method Summary

Modifier and TypeMethod and Description
public Insets
getBorderInsets(Component
the component for which this border insets value applies
c
,
Insets
the object to be reinitialized
insets
)

Overrides javax.swing.border.BevelBorder.getBorderInsets.

Reinitialize the insets parameter with this Border's current Insets.

public boolean
isBorderOpaque()

Overrides javax.swing.border.BevelBorder.isBorderOpaque.

Implements javax.swing.border.Border.isBorderOpaque.

Returns whether or not the border is opaque.

public void
paintBorder(Component
the component for which this border is being painted
c
,
Graphics
the paint graphics
g
,
int
the x position of the painted border
x
,
int
the y position of the painted border
y
,
int
the width of the painted border
width
,
int
the height of the painted border
height
)

Overrides javax.swing.border.BevelBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

Paints the border for the specified component with the specified position and size.

Inherited from javax.swing.border.BevelBorder:
getBevelTypegetHighlightInnerColorgetHighlightInnerColorgetHighlightOuterColorgetHighlightOuterColorgetShadowInnerColorgetShadowInnerColorgetShadowOuterColorgetShadowOuterColorpaintLoweredBevelpaintRaisedBevel

Constructor Detail

SoftBevelBorderback to summary
public SoftBevelBorder(int bevelType)

Creates a bevel border with the specified type and whose colors will be derived from the background color of the component passed into the paintBorder method.

Parameters
bevelType:int

the type of bevel for the border

SoftBevelBorderback to summary
public SoftBevelBorder(int bevelType, Color highlight, Color shadow)

Creates a bevel border with the specified type, highlight and shadow colors.

Parameters
bevelType:int

the type of bevel for the border

highlight:Color

the color to use for the bevel highlight

shadow:Color

the color to use for the bevel shadow

SoftBevelBorderback to summary
public SoftBevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor)

Creates a bevel border with the specified type, highlight shadow colors.

Parameters
bevelType:int

the type of bevel for the border

highlightOuterColor:Color

the color to use for the bevel outer highlight

highlightInnerColor:Color

the color to use for the bevel inner highlight

shadowOuterColor:Color

the color to use for the bevel outer shadow

shadowInnerColor:Color

the color to use for the bevel inner shadow

Annotations
@ConstructorProperties:bevelType, highlightOuterColor, highlightInnerColor, shadowOuterColor, shadowInnerColor

Method Detail

getBorderInsetsback to summary
public Insets getBorderInsets(Component c, Insets insets)

Overrides javax.swing.border.BevelBorder.getBorderInsets.

Reinitialize the insets parameter with this Border's current Insets.

Parameters
c:Component

the component for which this border insets value applies

insets:Insets

the object to be reinitialized

Exceptions
NullPointerException:
if the specified insets is null
isBorderOpaqueback to summary
public boolean isBorderOpaque()

Overrides javax.swing.border.BevelBorder.isBorderOpaque.

Implements javax.swing.border.Border.isBorderOpaque.

Returns whether or not the border is opaque.

paintBorderback to summary
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)

Overrides javax.swing.border.BevelBorder.paintBorder.

Implements javax.swing.border.Border.paintBorder.

Paints the border for the specified component with the specified position and size.

Parameters
c:Component

the component for which this border is being painted

g:Graphics

the paint graphics

x:int

the x position of the painted border

y:int

the y position of the painted border

width:int

the width of the painted border

height:int

the height of the painted border