Package snap.view
Class ButtonPainter
java.lang.Object
snap.view.ButtonPainter
- Direct Known Subclasses:
ButtonPainter.Classic
,ButtonPainter.Flat
This class has methods to paint a button.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A ButtonPainter subclass to paint classic buttons.static class
A ButtonPainter subclass to paint classic buttons. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RoundRect
getButtonRect
(ButtonBase aButton) Returns the button rect.void
paintButton
(Painter aPntr, ButtonBase aButton) Draws a button for the given rect with an option for pressed.abstract void
paintButtonInShape
(Painter aPntr, RectBase buttonRect, int aState, boolean isSelected) Draws a button for the given rect with an option for pressed.void
paintButtonSelected
(Painter aPntr, ButtonBase _button, RectBase buttonRect) Draws a button for the given rect with an option for pressed.void
paintDefaultButton
(Painter aPntr, ButtonBase aButton) Paints a default button for given button.void
paintDefaultButtonInShape
(Painter aPntr, RectBase buttonRect, int aState) Paints a default button for given button shape and state.
-
Field Details
-
BUTTON_NORMAL
public static final int BUTTON_NORMAL- See Also:
-
BUTTON_OVER
public static final int BUTTON_OVER- See Also:
-
BUTTON_PRESSED
public static final int BUTTON_PRESSED- See Also:
-
-
Constructor Details
-
ButtonPainter
public ButtonPainter()
-
-
Method Details
-
paintButton
Draws a button for the given rect with an option for pressed. -
paintButtonInShape
public abstract void paintButtonInShape(Painter aPntr, RectBase buttonRect, int aState, boolean isSelected) Draws a button for the given rect with an option for pressed. -
paintButtonSelected
Draws a button for the given rect with an option for pressed. -
paintDefaultButton
Paints a default button for given button. -
paintDefaultButtonInShape
Paints a default button for given button shape and state. -
getButtonRect
Returns the button rect.
-