Interface Element

All Known Implementing Classes:
AnimatedButton, AnimatedMask, ButtonPaginatedMask, HybridMask, ListButton, ListMask, MaskPaginatedMask, MultiButton, MultiMask, MultiPositionMask, OneTimeAnimatedMask, PaginatedMask, PlaceholderMask, PredicateButton, PredicateMask, SequencePaginatedMask, SimpleButtonMask, SingleMask

public interface Element
An element of the GUI
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    handleIfElement(Object o, Consumer<Element> elementConsumer)
    Handle the object if it is an instance of Element
    static <T> void
    handleIfElement(Collection<T> collection, Consumer<Element> elementConsumer)
    Loop through the collection and handle the element if it is an instance of Element
    default void
    Initialize the element.
    default void
    Stop the element.
  • Method Details

    • handleIfElement

      static void handleIfElement(Object o, Consumer<Element> elementConsumer)
      Handle the object if it is an instance of Element
      Parameters:
      o - the object
      elementConsumer - the consumer
    • handleIfElement

      static <T> void handleIfElement(Collection<T> collection, Consumer<Element> elementConsumer)
      Loop through the collection and handle the element if it is an instance of Element
      Parameters:
      collection - the collection
      elementConsumer - the consumer
    • init

      default void init()
      Initialize the element. Should be called before adding to the GUI.
    • stop

      default void stop()
      Stop the element. Should be called after removing from the GUI.