Package snap.view

Class ButtonPainter

java.lang.Object
snap.view.ButtonPainter
Direct Known Subclasses:
ButtonPainter.Classic, ButtonPainter.Flat

public abstract class ButtonPainter extends Object
This class has methods to paint a button.
  • Field Details

  • Constructor Details

    • ButtonPainter

      public ButtonPainter()
  • Method Details

    • paintButton

      public void paintButton(Painter aPntr, ButtonBase aButton)
      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

      public void paintButtonSelected(Painter aPntr, ButtonBase _button, RectBase buttonRect)
      Draws a button for the given rect with an option for pressed.
    • paintDefaultButton

      public void paintDefaultButton(Painter aPntr, ButtonBase aButton)
      Paints a default button for given button.
    • paintDefaultButtonInShape

      public void paintDefaultButtonInShape(Painter aPntr, RectBase buttonRect, int aState)
      Paints a default button for given button shape and state.
    • getButtonRect

      public static RoundRect getButtonRect(ButtonBase aButton)
      Returns the button rect.