Interface DisplayViewer<T>

    • Method Detail

      • isCompatible

        boolean isCompatible​(UserInterface ui)
        Returns true if this display viewer can be used with the given UI.
      • canView

        boolean canView​(Display<?> d)
        Returns true if an instance of this display viewer can view the given display.
      • view

        void view​(DisplayWindow w,
                  Display<?> d)
        Begins viewing the given display.
        Parameters:
        w - The frame / window that will contain the GUI elements
        d - the model for the display to show.
      • getDisplay

        Display<T> getDisplay()
        Gets the display being viewed.
      • getWindow

        DisplayWindow getWindow()
        Gets the window in which the view is displayed.
      • setPanel

        void setPanel​(DisplayPanel panel)
        Installs the display panel.
        Parameters:
        panel - the panel used to host the gui
      • getPanel

        DisplayPanel getPanel()
        Gets the display panel that hosts the gui elements.
      • onDisplayUpdatedEvent

        default void onDisplayUpdatedEvent​(DisplayUpdatedEvent e)
        Synchronizes the user interface appearance with the display model.
      • onDisplayDeletedEvent

        default void onDisplayDeletedEvent​(DisplayDeletedEvent e)
        Removes the user interface when the display is deleted.
      • onDisplayActivatedEvent

        default void onDisplayActivatedEvent​(DisplayActivatedEvent e)
        Handles a display activated event directed at this viewer's display. Note that the event's display may not be the viewer's display, but the active display will always be the viewer's display.
      • dispose

        default void dispose()
        Description copied from interface: Disposable
        Performs any needed cleanup of the object's services, in preparation for the object being retired (e.g., to make garbage collection possible).
        Specified by:
        dispose in interface Disposable