Class WindowState

  • All Implemented Interfaces:
    State

    public class WindowState
    extends Object
    implements State
    State for Window
    Since:
    2.5.16
    Author:
    poussin, Kevin Morin - morin@codelutin.com
    • Field Detail

      • frameState

        protected int frameState
    • Constructor Detail

      • WindowState

        public WindowState()
      • WindowState

        public WindowState​(Rectangle bounds,
                           Rectangle gcBounds,
                           int frameState)
    • Method Detail

      • setBounds

        public void setBounds​(Rectangle bounds)
      • getGcBounds

        public Rectangle getGcBounds()
      • setGcBounds

        public void setGcBounds​(Rectangle gcBounds)
      • getFrameState

        public int getFrameState()
      • setFrameState

        public void setFrameState​(int frameState)
      • checkComponent

        protected Window checkComponent​(Object o)
      • isResizable

        protected static boolean isResizable​(Window window)
        Checks whether the window supports resizing
        Parameters:
        window - the Window to be checked
        Returns:
        true if the window supports resizing
      • getWindowNormalBounds

        protected static Rectangle getWindowNormalBounds​(Window window)
        Gets Window bounds from the client property
        Parameters:
        window - the source Window
        Returns:
        bounds from the client property
      • computeVirtualGraphicsBounds

        public static Rectangle computeVirtualGraphicsBounds()
        Calculates virtual graphic bounds. On multiscreen systems all screens are united into one virtual screen.
        Returns:
        the graphic bounds
      • putWindowNormalBounds

        public static void putWindowNormalBounds​(Window window,
                                                 Rectangle bounds)
        Puts Window bounds to client property.
        Parameters:
        window - the target Window
        bounds - bounds