|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.explodingpixels.macwidgets.plaf.HudPaintingUtils
public class HudPaintingUtils
A collection of utilty method for painting Heads Up Style widgets. See the following for examples of HUD widgets:
| Nested Class Summary | |
|---|---|
static class |
HudPaintingUtils.Roundedness
An enumeration representing the roundness styles of HUD buttons. |
static interface |
HudPaintingUtils.ShapeProvider
|
| Field Summary | |
|---|---|
static Color |
BORDER_COLOR
|
static Color |
FONT_COLOR
|
static Color |
FONT_DISABLED_COLOR
|
static float |
FONT_SIZE
|
static Color |
PRESSED_MARK_COLOR
|
| Method Summary | |
|---|---|
static int |
getHudControlShadowSize(AbstractButton button)
Gets the number of pixels that a HUD style widget's shadow takes up. |
static Font |
getHudFont()
Gets the font used by HUD style widgets. |
static void |
initHudComponent(JComponent component)
Initializes the given JComponent as a HUD style widget. |
static void |
paintHudControlBackground(Graphics2D graphics,
AbstractButton button,
int width,
int height,
HudPaintingUtils.Roundedness roundedness)
Paints a HUD style button background onto the given Graphics2D context using the
given HudPaintingUtils.Roundedness. |
static void |
paintHudControlBackground(Graphics2D graphics,
Rectangle bounds,
HudPaintingUtils.ShapeProvider shapeProvider,
Paint paint)
Paints a HUD style background in the given shape. |
static void |
updateGraphicsToPaintDisabledControlIfNecessary(Graphics2D graphics,
Component component)
Installs an AlphaComposite on the given Graphics2D) if the given
{@link Component} is disabled. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float FONT_SIZE
public static final Color FONT_COLOR
public static final Color FONT_DISABLED_COLOR
public static final Color PRESSED_MARK_COLOR
public static final Color BORDER_COLOR
| Method Detail |
|---|
public static void initHudComponent(JComponent component)
JComponent as a HUD style widget. This includes setting the
font, foreground and opacity of the given component.
component - the component to initialize as a HUD component.public static Font getHudFont()
public static int getHudControlShadowSize(AbstractButton button)
button - the button that the shadow is drawn on.
public static void paintHudControlBackground(Graphics2D graphics,
AbstractButton button,
int width,
int height,
HudPaintingUtils.Roundedness roundedness)
Graphics2D context using the
given HudPaintingUtils.Roundedness. The background will be painted from 0,0 to width/height.
graphics - the graphics context to paint onto.button - the button being painted.width - the width of the area to paint.height - the height of the area to paint.roundedness - the roundedness to use when painting the background.
public static void paintHudControlBackground(Graphics2D graphics,
Rectangle bounds,
HudPaintingUtils.ShapeProvider shapeProvider,
Paint paint)
graphics - the Graphics2D context to draw in.bounds - the bounds to paint in.shapeProvider - the delegate to request the Shape from.paint - the Paint to use to fill the Shape.
public static void updateGraphicsToPaintDisabledControlIfNecessary(Graphics2D graphics,
Component component)
AlphaComposite on the given Graphics2D) if the given
{@link Component} is disabled.
graphics - the Graphics2D to adjust.component - the Component whos enablement state should be queried.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||