Class AbstractUiScreen

    • Constructor Detail

      • AbstractUiScreen

        public AbstractUiScreen()
        The constructor.
    • Method Detail

      • getWidthInPixel

        public double getWidthInPixel()
        Specified by:
        getWidthInPixel in interface AttributeReadSize
        Returns:
        the width of this object in pixels.
        NOTE: The result will typically be an int value. However, to be compatible with UiSize.getAmount() and with some underlying native toolkits we use double. You may cast the result to int.
      • getHeightInPixel

        public double getHeightInPixel()
        Specified by:
        getHeightInPixel in interface AttributeReadSize
        Returns:
        the height of this object in pixels.
        NOTE: The result will typically be an int value. However, to be compatible with UiSize.getAmount() and with some underlying native toolkits we use double. You may cast the result to int.
      • getDpi

        public double getDpi()
        Specified by:
        getDpi in interface UiScreen
        Returns:
        the dots per inch (DPI) rate of this display.
      • getSize

        public double getSize()
        Specified by:
        getSize in interface UiScreen
        Returns:
        screen size (diagonal) in inches.
      • update

        public void update()
        Description copied from interface: UiScreen
        Forces the display to update. Typically the screen-resolution does not change while your application is running. Therefore values of UiScreen may be pre-calculated and cached. However, you can call this method before reading resolution or screen type to force that you are getting most recent values.
        Specified by:
        update in interface UiScreen
      • doUpdate

        protected abstract void doUpdate()
        Called from update() to update the native values while update() will by default also update calculated values.