Package gui.page

Interface PageEventHandler

All Known Subinterfaces:
Tool
All Known Implementing Classes:
AudioTool, ColourTool, HyperlinkTool, ImageTool, MediaTool, PenTool, SearchTool, ShapeTool, TagTool, TextTool, VideoTool

public interface PageEventHandler
Implementors of this interface provide handler methods which accept events from a Page.

Implementors will also be notified when their handlers are added to or removed from a page via the `enabledFor` and `disabledFor` methods.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    PageEventHandler.HandlerMethod<T extends javafx.event.Event>
    Combination of an EventType and an EventHandler which handles events of an appropriate type.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Called when the handler is no longer set to receive events for the given page.
    default void
    Called when the handler is set to receive events from the given page.
    Get the handler methods to be added to a page through which events will be received.
  • Method Details

    • getHandlerMethods

      default PageEventHandler.HandlerMethod<?>[] getHandlerMethods()
      Get the handler methods to be added to a page through which events will be received.
    • enabledFor

      default void enabledFor(Page page)
      Called when the handler is set to receive events from the given page.
    • disabledFor

      default void disabledFor(Page page)
      Called when the handler is no longer set to receive events for the given page.

      Implementors should get rid of any references to the given page when this method is called.