Java JFrame Size isNormalSizeMode(JFrame window)

Here you can find the source of isNormalSizeMode(JFrame window)

Description

Check window for normal state.

License

Open Source License

Declaration

public static boolean isNormalSizeMode(JFrame window) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.Frame;

import javax.swing.JFrame;

public class Main {
    /** Check window for normal state.
    Checks if window is not maximized (in either or both directions) and
    not iconified. *//*from   w w  w .j av  a  2s. c o  m*/
    public static boolean isNormalSizeMode(JFrame window) {
        int state = window.getExtendedState();
        int mask = Frame.MAXIMIZED_BOTH | Frame.MAXIMIZED_VERT | Frame.MAXIMIZED_HORIZ | Frame.ICONIFIED;
        return ((state & mask) == 0);
    }
}

Related

  1. adaptSize(JFrame frame, int preferredWidth, int preferredHeight)
  2. getFramesCurrentScreenSize(JFrame currentFrame)
  3. getFrameSize(Component c)
  4. getFrameSize(Component c)
  5. getFrameSize(Component c)
  6. locateWindow(JFrame parent, Dimension mySize, Dimension offset, JDialog me)
  7. lockInMinSize(final JFrame frame)
  8. positionFrame(final JFrame frame, final Dimension viewSize, final int addX, final int addY)
  9. resizeApp(JFrame app)