E - component typeD - decoration typeI - background typepublic class GradientBackground<E extends javax.swing.JComponent,D extends IDecoration<E,D>,I extends GradientBackground<E,D,I>> extends AbstractBackground<E,D,I>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<GradientColor> |
colors
Gradient colors.
|
protected java.awt.geom.Point2D.Float |
from
Bounds width/height percentage representing gradient start point.
|
protected java.awt.geom.Point2D.Float |
to
Bounds width/height percentage representing gradient end point.
|
protected GradientType |
type
Gradient type.
|
id, opacity| Constructor and Description |
|---|
GradientBackground() |
| Modifier and Type | Method and Description |
|---|---|
java.awt.geom.Point2D.Float |
getFrom()
Returns bounds width/height percentage representing gradient start point.
|
java.awt.geom.Point2D.Float |
getTo()
Returns bounds width/height percentage representing gradient end point.
|
GradientType |
getType()
Returns gradient type.
|
I |
merge(I background) |
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
D d,
java.awt.Shape shape)
Fills the specified shape with this background.
|
clone, getDefaultId, getId, getOpacity@XStreamAsAttribute protected GradientType type
GradientType.linear is used if it is not specified.@XStreamAsAttribute protected java.awt.geom.Point2D.Float from
@XStreamAsAttribute protected java.awt.geom.Point2D.Float to
protected java.util.List<GradientColor> colors
public GradientType getType()
public java.awt.geom.Point2D.Float getFrom()
public java.awt.geom.Point2D.Float getTo()
public void paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
D d,
java.awt.Shape shape)
IBackgroundg2d - graphics contextbounds - painting boundsc - painted componentd - painted decoration stateshape - background shapepublic I merge(I background)
merge in interface com.alee.api.Mergeable<I extends GradientBackground<E,D,I>>merge in class AbstractBackground<E extends javax.swing.JComponent,D extends IDecoration<E,D>,I extends GradientBackground<E,D,I>>