Class ButtonBorder

All Implemented Interfaces:
Border, ColorConstants

public class ButtonBorder extends SchemeBorder
Creates a border for a clickable type of figure, which works in conjunction with the Figure and its model. This border adjusts itself to the various states the model of the figure could be. This border uses an extended Scheme called ButtonBorder.ButtonScheme which provides more information required by border to handle the the states of the model.
See Also:
  • Field Details

  • Constructor Details

    • ButtonBorder

      public ButtonBorder()
      Constructs a ButtonBorder with a predefined button scheme set as its default.
      Since:
      2.0
    • ButtonBorder

      public ButtonBorder(ButtonBorder.ButtonScheme scheme)
      Constructs a ButtonBorder with the input ButtonScheme set as its Scheme.
      Parameters:
      scheme - ButtonScheme for this ButtonBorder.
      Since:
      2.0
  • Method Details

    • paint

      public void paint(IFigure figure, Graphics graphics, Insets insets)
      Paints this border with the help of the set scheme, the model of the clickable figure, and other inputs. The scheme is used in conjunction with the state of the model to get the appropriate colors for the border.
      Specified by:
      paint in interface Border
      Overrides:
      paint in class SchemeBorder
      Parameters:
      figure - The Clickable that this border belongs to
      graphics - The graphics used for painting
      insets - The insets
      See Also: