|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.substance.utils.ButtonBackgroundDelegate
public class ButtonBackgroundDelegate
Delegate class for painting backgrounds of buttons in Substance look and feel. This class is for internal use only.
Nested Class Summary | |
---|---|
static class |
ButtonBackgroundDelegate.ButtonBackground
Contains information on a button background. |
Constructor Summary | |
---|---|
ButtonBackgroundDelegate()
Simple constructor. |
Method Summary | |
---|---|
static boolean |
contains(javax.swing.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 ButtonBackgroundDelegate.ButtonBackground |
getBackground(javax.swing.AbstractButton button,
SubstanceButtonShaper shaper,
SubstanceGradientPainter painter,
SubstanceBorderPainter borderPainter,
int width,
int height)
Retrieves the background for the specified button. |
static boolean |
isRoundButton(javax.swing.AbstractButton button)
Checks whether the specified button has round corners. |
static void |
reset()
Resets image maps (used when setting new theme). |
void |
updateBackground(java.awt.Graphics g,
javax.swing.AbstractButton button)
Updates background of the specified button. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ButtonBackgroundDelegate()
Method Detail |
---|
public static void reset()
SubstanceLookAndFeel.setCurrentTheme(String)
,
SubstanceLookAndFeel.setCurrentTheme(SubstanceTheme)
public static ButtonBackgroundDelegate.ButtonBackground getBackground(javax.swing.AbstractButton button, SubstanceButtonShaper shaper, SubstanceGradientPainter painter, SubstanceBorderPainter borderPainter, int width, int height)
button
- Button.shaper
- Button shaper.painter
- Button gradient painter.borderPainter
- Button border painter.width
- Button width.height
- Button height.
public void updateBackground(java.awt.Graphics g, javax.swing.AbstractButton button)
g
- Graphic context.button
- Button to update.public static boolean isRoundButton(javax.swing.AbstractButton button)
button
- Button to check.
true
if the specified button has round corners,
false
otherwise.public static boolean contains(javax.swing.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 point
true
if the specified x,y location is
contained within the look and feel's defined shape of the
specified component, false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |