All Superinterfaces:
Control
All Known Implementing Classes:
AbstractView, AppView, BoxView, GridView, InputView, ListView, MenuBarView, MenuView, StatusBarView

public interface View extends Control
Base interface for all views. Represents a visible element that can render itself and contains zero or more nested Views.
  • Method Details

    • setLayer

      void setLayer(int index)
      Sets a layer index this View operates on.
      Parameters:
      index - the layer index
    • focus

      void focus(View view, boolean focus)
      Called when View gets or loses a focus.
      Parameters:
      view - the view receiving focus
      focus - flag if focus is received
    • hasFocus

      boolean hasFocus()
      Gets if this View has a focus.
      Returns:
      true if view has a focus
    • getMouseHandler

      @Nullable MouseHandler getMouseHandler()
      Gets a View mouse MouseHandler. Can be null which indicates view will not handle any mouse events.
      Returns:
      a view mouse handler
      See Also:
    • getKeyHandler

      @Nullable KeyHandler getKeyHandler()
      Gets a View mouse KeyHandler. Can be null which indicates view will not handle any key events.
      Returns:
      a view mouse handler
      See Also: