|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.swing.util.GradientBorder
public class GradientBorder
A border implementation that draws a gradient in the background. The gradient is based on two background colors. Additionally a line will be drawn as a border. The gradient background will only be visible if the component that uses it is not opaque.
JComponent.setOpaque(boolean)
,
JComponent.setBorder(Border)
Constructor Summary | |
---|---|
GradientBorder()
|
Method Summary | |
---|---|
java.awt.Color |
getBackgroundColor1()
Returns the background color with which the gradient starts painting itself. |
java.awt.Color |
getBackgroundColor2()
Returns the background color with which the gradient stops painting itself. |
java.awt.Insets |
getBorderInsets(java.awt.Component c)
|
java.awt.Color |
getLineColor()
Returns the color used for drawing the border line. |
boolean |
isBorderOpaque()
|
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
void |
setBackgroundColor1(java.awt.Color color)
Sets the background color with which the gradient starts painting itself. |
void |
setBackgroundColor2(java.awt.Color color)
Returns the background color with which the gradient stops painting itself. |
void |
setLineColor(java.awt.Color color)
Sets the color used for drawing the border line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GradientBorder()
Method Detail |
---|
public boolean isBorderOpaque()
isBorderOpaque
in interface javax.swing.border.Border
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
paintBorder
in interface javax.swing.border.Border
public java.awt.Insets getBorderInsets(java.awt.Component c)
getBorderInsets
in interface javax.swing.border.Border
public java.awt.Color getBackgroundColor1()
public void setBackgroundColor1(java.awt.Color color)
color
- the background color with which the gradient starts painting
itselfpublic java.awt.Color getBackgroundColor2()
public void setBackgroundColor2(java.awt.Color color)
color
- the background color with which the gradient stops painting
itselfpublic java.awt.Color getLineColor()
public void setLineColor(java.awt.Color color)
color
- the color used for drawing the border line
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |