public class ButtonBackgroundDelegate extends Object
Constructor | Description |
---|---|
ButtonBackgroundDelegate() |
Simple constructor.
|
Modifier and Type | Method | Description |
---|---|---|
static boolean |
contains(AbstractButton button,
int x,
int y) |
Returns
true if the specified x,y location is
contained within the look and feel's defined shape of the specified
component. |
static BufferedImage |
getFullAlphaBackground(AbstractButton button,
ButtonModel model,
SubstanceButtonShaper shaper,
SubstanceFillPainter fillPainter,
SubstanceBorderPainter borderPainter,
int width,
int height) |
Retrieves the background for the specified button.
|
static boolean |
isRoundButton(AbstractButton button) |
Checks whether the specified button has round corners.
|
void |
updateBackground(Graphics g,
AbstractButton button) |
Updates background of the specified button.
|
public static BufferedImage getFullAlphaBackground(AbstractButton button, ButtonModel model, SubstanceButtonShaper shaper, SubstanceFillPainter fillPainter, SubstanceBorderPainter borderPainter, int width, int height)
button
- Button.model
- Button model.shaper
- Button shaper.fillPainter
- Button fill painter.borderPainter
- Button border painter.width
- Button width.height
- Button height.public void updateBackground(Graphics g, AbstractButton button)
g
- Graphic context.button
- Button to update.public static boolean isRoundButton(AbstractButton button)
button
- Button to check.true
if the specified button has round corners,
false
otherwise.public static boolean contains(AbstractButton button, int x, int y)
true
if the specified x,y location is
contained within the look and feel's defined shape of the specified
component. x
and y
are defined to be relative
to the coordinate system of the specified component.button
- the component where the x,y location is being queried;x
- the x coordinate of the pointy
- the y coordinate of the pointtrue
if the specified x,y location is
contained within the look and feel's defined shape of the
specified component, false
otherwise.