| java.lang.Object org.jvnet.substance.utils.ButtonBackgroundDelegate
ButtonBackgroundDelegate | public class ButtonBackgroundDelegate (Code) | | Delegate class for painting backgrounds of buttons in Substance look
and feel. This class is for internal use only.
author: Kirill Grouchnikov |
Inner Class :public static class ButtonBackground | |
Method Summary | |
public 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. | public static synchronized ButtonBackground | getBackground(AbstractButton button, SubstanceButtonShaper shaper, SubstanceGradientPainter painter, SubstanceBorderPainter borderPainter, int width, int height) Retrieves the background for the specified button.
Parameters: button - Button. Parameters: shaper - Button shaper. Parameters: painter - Button gradient painter. Parameters: borderPainter - Button border painter. Parameters: width - Button width. Parameters: height - Button height. | static String | getMemoryUsage() Returns the memory usage string. | public static boolean | isRoundButton(AbstractButton button) Checks whether the specified button has round corners.
Parameters: button - Button to check. | public static synchronized void | reset() Resets image maps (used when setting new theme). | public void | updateBackground(Graphics g, AbstractButton button) Updates background of the specified button. |
ButtonBackgroundDelegate | public ButtonBackgroundDelegate()(Code) | | Simple constructor.
|
contains | public static boolean contains(AbstractButton button, int x, int y)(Code) | | Returns 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.
Parameters: button - the component where the x,y location is being queried; Parameters: x - the x coordinate of the point Parameters: y - the y coordinate of the point true if the specified x,y location iscontained within the look and feel's defined shape of thespecified component, false otherwise. |
getBackground | public static synchronized ButtonBackground getBackground(AbstractButton button, SubstanceButtonShaper shaper, SubstanceGradientPainter painter, SubstanceBorderPainter borderPainter, int width, int height)(Code) | | Retrieves the background for the specified button.
Parameters: button - Button. Parameters: shaper - Button shaper. Parameters: painter - Button gradient painter. Parameters: borderPainter - Button border painter. Parameters: width - Button width. Parameters: height - Button height. Button background. |
getMemoryUsage | static String getMemoryUsage()(Code) | | Returns the memory usage string.
Memory usage string. |
isRoundButton | public static boolean isRoundButton(AbstractButton button)(Code) | | Checks whether the specified button has round corners.
Parameters: button - Button to check. true if the specified button has round corners,false otherwise. |
updateBackground | public void updateBackground(Graphics g, AbstractButton button)(Code) | | Updates background of the specified button.
Parameters: g - Graphic context. Parameters: button - Button to update. |
|
|