E - component typeD - decoration typeI - shadow typepublic class ExpandingShadow<E extends javax.swing.JComponent,D extends IDecoration<E,D>,I extends ExpandingShadow<E,D,I>> extends AbstractShadow<E,D,I>
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.Map<java.lang.String,java.lang.ref.WeakReference<NinePatchIcon>> |
shadowCache
Shadow images cache.
|
protected NinePatchIcon |
shadowImage
Currently used shadow image.
|
protected java.lang.String |
shadowKey
Last shadow image cache key.
|
color, opacity, type, width| Constructor and Description |
|---|
ExpandingShadow() |
| Modifier and Type | Method and Description |
|---|---|
protected static NinePatchIcon |
getShadeCache(java.awt.Rectangle b,
int width,
float opacity)
Returns cached shadow image.
|
protected NinePatchIcon |
getShadow(java.awt.Rectangle bounds,
int width,
float opacity)
Returns cached shadow image.
|
protected static java.lang.String |
getShadowKey(java.awt.Rectangle b,
int width,
float opacity)
Returns shadow image cache key.
|
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
D d,
java.awt.Shape shape)
Paints shadow for the specified shape.
|
clone, getColor, getId, getOpacity, getType, getWidth, mergeprotected static final java.util.Map<java.lang.String,java.lang.ref.WeakReference<NinePatchIcon>> shadowCache
protected transient java.lang.String shadowKey
protected transient NinePatchIcon shadowImage
public void paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
D d,
java.awt.Shape shape)
IShadowg2d - graphics contextbounds - painting boundsc - painted componentd - painted decoration stateshape - background shapeprotected NinePatchIcon getShadow(java.awt.Rectangle bounds, int width, float opacity)
bounds - shadow boundswidth - shadow widthopacity - shadow opacityprotected static java.lang.String getShadowKey(java.awt.Rectangle b,
int width,
float opacity)
b - shadow boundswidth - shadow widthopacity - shadow opacityprotected static NinePatchIcon getShadeCache(java.awt.Rectangle b, int width, float opacity)
b - shadow boundswidth - shadow widthopacity - shadow opacity