Class ButtonBackgroundDelegate
java.lang.Object
org.pushingpixels.substance.internal.utils.ButtonBackgroundDelegate
Delegate class for painting backgrounds of buttons in Substance look
and feel. This class is for internal use only.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontains(AbstractButton button, int x, int y) Returnstrueif the specified x,y location is contained within the look and feel's defined shape of the specified component.static BufferedImagegetFullAlphaBackground(AbstractButton button, ButtonModel model, SubstanceButtonShaper shaper, SubstanceFillPainter fillPainter, SubstanceBorderPainter borderPainter, int width, int height) Retrieves the background for the specified button.static booleanisRoundButton(AbstractButton button) Checks whether the specified button has round corners.voidupdateBackground(Graphics g, AbstractButton button) Updates background of the specified button.
-
Constructor Details
-
ButtonBackgroundDelegate
public ButtonBackgroundDelegate()Simple constructor.
-
-
Method Details
-
getFullAlphaBackground
public static BufferedImage getFullAlphaBackground(AbstractButton button, ButtonModel model, SubstanceButtonShaper shaper, SubstanceFillPainter fillPainter, SubstanceBorderPainter borderPainter, int width, int height) Retrieves the background for the specified button.- Parameters:
button- Button.model- Button model.shaper- Button shaper.fillPainter- Button fill painter.borderPainter- Button border painter.width- Button width.height- Button height.- Returns:
- Button background.
-
updateBackground
Updates background of the specified button.- Parameters:
g- Graphic context.button- Button to update.
-
isRoundButton
Checks whether the specified button has round corners.- Parameters:
button- Button to check.- Returns:
trueif the specified button has round corners,falseotherwise.
-
contains
Returnstrueif the specified x,y location is contained within the look and feel's defined shape of the specified component.xandyare defined to be relative to the coordinate system of the specified component.- Parameters:
button- the component where the x,y location is being queried;x- the x coordinate of the pointy- the y coordinate of the point- Returns:
trueif the specified x,y location is contained within the look and feel's defined shape of the specified component,falseotherwise.
-