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 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: