public class GhostPaintingUtils extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static float |
DECAY_FACTOR |
Global decay factor.
|
static float |
MAX_ICON_GHOSTING_ALPHA |
Maximal starting opacity for icon ghosting.
|
static float |
MAX_PRESS_GHOSTING_ALPHA |
Maximal starting opacity for press ghosting.
|
static float |
MIN_ICON_GHOSTING_ALPHA |
Minimal starting opacity for icon ghosting.
|
static float |
MIN_PRESS_GHOSTING_ALPHA |
Minimal starting opacity for press ghosting.
|
| Constructor | Description |
|---|---|
GhostPaintingUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
protected static BufferedImage |
getComponentGhostImage(JComponent comp,
org.pushingpixels.trident.Timeline ghostPressTimeline,
double scaleFactor) |
Returns a scaled ghost image of the specified component.
|
protected static BufferedImage |
getIconGhostImage(JComponent comp,
org.pushingpixels.trident.Timeline ghostRolloverTimeline,
Icon icon,
double scaleFactor) |
Returns a scaled ghost image of the specified icon.
|
static void |
paintGhostIcon(Graphics2D graphics,
Component b,
Icon icon,
Rectangle iconRectangle) |
Paints the ghost icon inside the bounds of the specified button.
|
static void |
paintGhostIcon(Graphics2D graphics,
AbstractButton b,
Rectangle iconRectangle) |
Paints the ghost icon inside the bounds of the specified button.
|
static void |
paintGhostIcon(Graphics2D graphics,
AbstractButton b,
Icon icon) |
Paints the ghost icon inside the bounds of the specified button.
|
static void |
paintGhostImages(Component mainComponent,
Graphics g) |
Paints ghost images on the specified component.
|
public static float MIN_ICON_GHOSTING_ALPHA
public static float MAX_ICON_GHOSTING_ALPHA
public static float MIN_PRESS_GHOSTING_ALPHA
public static float MAX_PRESS_GHOSTING_ALPHA
public static float DECAY_FACTOR
protected static BufferedImage getComponentGhostImage(JComponent comp, org.pushingpixels.trident.Timeline ghostPressTimeline, double scaleFactor)
comp - Component.scaleFactor - Scale factor.protected static BufferedImage getIconGhostImage(JComponent comp, org.pushingpixels.trident.Timeline ghostRolloverTimeline, Icon icon, double scaleFactor)
comp - Component.icon - Icon.scaleFactor - Scale factor.public static void paintGhostImages(Component mainComponent, Graphics g)
mainComponent - Component.g - Graphics context.public static void paintGhostIcon(Graphics2D graphics, AbstractButton b, Icon icon)
graphics - Graphics context.b - Button.icon - Icon to paint.public static void paintGhostIcon(Graphics2D graphics, AbstractButton b, Rectangle iconRectangle)
graphics - Graphics context.b - Button.iconRectangle - Rectangle of the button icon.public static void paintGhostIcon(Graphics2D graphics, Component b, Icon icon, Rectangle iconRectangle)
graphics - Graphics context.b - Button.icon - Icon to paint.iconRectangle - Rectangle of the button icon.