public class GradientBorder extends Object implements Border
JComponent.setOpaque(boolean)
,
JComponent.setBorder(Border)
Constructor and Description |
---|
GradientBorder() |
Modifier and Type | Method and Description |
---|---|
Color |
getBackgroundColor1()
Returns the background color with which the gradient starts painting
itself.
|
Color |
getBackgroundColor2()
Returns the background color with which the gradient stops painting
itself.
|
Insets |
getBorderInsets(Component c) |
Color |
getLineColor()
Returns the color used for drawing the border line.
|
boolean |
isBorderOpaque() |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height) |
void |
setBackgroundColor1(Color color)
Sets the background color with which the gradient starts painting itself.
|
void |
setBackgroundColor2(Color color)
Returns the background color with which the gradient stops painting
itself.
|
void |
setLineColor(Color color)
Sets the color used for drawing the border line.
|
public boolean isBorderOpaque()
isBorderOpaque
in interface Border
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder
in interface Border
public Insets getBorderInsets(Component c)
getBorderInsets
in interface Border
public Color getBackgroundColor1()
public void setBackgroundColor1(Color color)
color
- the background color with which the gradient starts painting
itselfpublic Color getBackgroundColor2()
public void setBackgroundColor2(Color color)
color
- the background color with which the gradient stops painting
itselfpublic Color getLineColor()
public void setLineColor(Color color)
color
- the color used for drawing the border lineCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.