Class ActivityWindow

java.lang.Object
icyllis.modernui.core.Window
icyllis.modernui.core.ActivityWindow
All Implemented Interfaces:
AutoCloseable

public final class ActivityWindow extends Window
The activity window is the default implementation for almost everything.
  • Method Details

    • createMainWindow

      @NonNull public static ActivityWindow createMainWindow(@NonNull String title, int width, int height)
      Creates the main window and initialize the view system. Hints are set before.
      Parameters:
      title - the initial title
      width - the window width in virtual screen coordinates
      height - the window height in virtual screen coordinates
      Returns:
      the main window
    • createMainWindow

      @NonNull public static ActivityWindow createMainWindow(@NonNull String title, int width, int height, @Nullable Monitor monitor)
    • getScreenX

      public int getScreenX()
      Description copied from class: Window
      Returns the y-coordinate of the top-left corner of this window in virtual screen coordinate system.
      Overrides:
      getScreenX in class Window
      Returns:
      the y-coordinate of this window
    • getScreenY

      public int getScreenY()
      Description copied from class: Window
      Returns the x-coordinate of the top-left corner of this window in virtual screen coordinate system.
      Overrides:
      getScreenY in class Window
      Returns:
      the x-coordinate of this window
    • getScreenWidth

      public int getScreenWidth()
      Description copied from class: Window
      Returns the window width in virtual screen coordinates.
      Overrides:
      getScreenWidth in class Window
      Returns:
      window width
    • getScreenHeight

      public int getScreenHeight()
      Description copied from class: Window
      Returns the window height in virtual screen coordinates.
      Overrides:
      getScreenHeight in class Window
      Returns:
      window height
    • getWidth

      public int getWidth()
      Description copied from class: Window
      Returns the framebuffer width for this window in pixels.
      Overrides:
      getWidth in class Window
      Returns:
      the framebuffer width
    • getHeight

      public int getHeight()
      Description copied from class: Window
      Returns the framebuffer height for this window in pixels.
      Overrides:
      getHeight in class Window
      Returns:
      the framebuffer height
    • center

      public void center(@NonNull Monitor monitor)
    • install

      public void install(@NonNull ViewRoot root)