public class PaintUtils extends Object
Modifier and Type | Field and Description |
---|---|
static GradientPaint |
AERITH |
static GradientPaint |
BLUE_EXPERIENCE |
static GradientPaint |
GRAY |
static GradientPaint |
MAC_OSX |
static GradientPaint |
MAC_OSX_SELECTED |
static GradientPaint |
NIGHT_GRAY |
static GradientPaint |
NIGHT_GRAY_LIGHT |
static GradientPaint |
RED_XP |
Modifier and Type | Method and Description |
---|---|
static Rectangle |
getTextBounds(Graphics g,
JLabel label)
Returns the bounds that the text of a label will be drawn into.
|
static void |
paintGradient(Graphics g,
JComponent comp,
Color color1,
Color color2)
Paints a top to bottom gradient fill over the component bounds
from color1 to color2.
|
static Paint |
resizeGradient(Paint p,
int width,
int height)
Resizes a gradient to fill the width and height available.
|
public static final GradientPaint BLUE_EXPERIENCE
public static final GradientPaint MAC_OSX_SELECTED
public static final GradientPaint MAC_OSX
public static final GradientPaint AERITH
public static final GradientPaint GRAY
public static final GradientPaint RED_XP
public static final GradientPaint NIGHT_GRAY
public static final GradientPaint NIGHT_GRAY_LIGHT
public static Rectangle getTextBounds(Graphics g, JLabel label)
public static void paintGradient(Graphics g, JComponent comp, Color color1, Color color2)
public static Paint resizeGradient(Paint p, int width, int height)
Copyright © 2019. All rights reserved.