# Interface SyButtonType

All Superinterfaces:
  `SyActiveReadableType, SyActiveType, SyBoundedReadableType<SySpaceParentRelativeType>, SyBoundedType<SySpaceParentRelativeType>, SyButtonReadableType, SyComponentReadableType, SyComponentType, SyEventReceiverType, SyKeyboardFocusableReadableType, SyKeyboardFocusableType, SyMouseFocusAcceptingReadableType, SyMouseFocusAcceptingType, SySizedReadableType<SySpaceParentRelativeType>, SySizedType<SySpaceParentRelativeType>, SyThemeableReadableType, SyThemeableType, SyVisibleReadableType, SyVisibleType`

All Known Subinterfaces:
  `SyButtonWithTextType`

public interface SyButtonType extends SyButtonReadableType, SyComponentType

The basic type of button components.

A button is a component that notifies a listener when clicked.

The button has a "momentary" action; every time the mouse is clicked on the button, the listener is notified when the mouse button is released.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `removeOnClickListener()`
  Remove any listeners that are executed when the button is clicked.
  `void`
  `setOnClickListener(Runnable runnable)`
  Set a listener that will be executed when the button is clicked.

  ### Methods inherited from interface SyActiveReadableType

  `isMouseOver`

  ### Methods inherited from interface SyActiveType

  `activity, setActive`

  ### Methods inherited from interface SyBoundedReadableType

  `boundingArea`

  ### Methods inherited from interface SyBoundedType

  `position, setPosition`

  ### Methods inherited from interface SyButtonReadableType

  `isPressed, themeClassesDefaultForComponent`

  ### Methods inherited from interface SyComponentReadableType

  `ancestorMatchingReadable, childCount, isActive, isVisible, nodeReadable, relativePositionOf, screen, viewportPositionOf, windowReadable`

  ### Methods inherited from interface SyComponentType

  `ancestorMatching, childAdd, childRemove, childrenClear, componentForWindowRelative, layout, node, window`

  ### Methods inherited from interface SyEventReceiverType

  `eventSend`

  ### Methods inherited from interface SyKeyboardFocusableType

  `keyboardFocusBehavior`

  ### Methods inherited from interface SyMouseFocusAcceptingReadableType

  `isMouseQueryAccepting`

  ### Methods inherited from interface SyMouseFocusAcceptingType

  `setMouseQueryAccepting`

  ### Methods inherited from interface SySizedType

  `setSize, setSizeUpperLimit, size, sizeUpperLimit`

  ### Methods inherited from interface SyThemeableReadableType

  `themeClassesExtra, themeClassesInPreferenceOrder`

  ### Methods inherited from interface SyVisibleType

  `setVisible, visibility`

- ## Method Details

  - ### setOnClickListener

    void setOnClickListener(Runnable runnable)
    Set a listener that will be executed when the button is clicked.
    Parameters:
      `runnable` - The listener

  - ### removeOnClickListener

    void removeOnClickListener()
    Remove any listeners that are executed when the button is clicked.
    See Also:
      - `setOnClickListener(Runnable)`