Java JFrame getPersistentExtendedStateMask(JFrame frame)

Here you can find the source of getPersistentExtendedStateMask(JFrame frame)

Description

Gets JFrame extended state mask for this frame.

License

Open Source License

Parameter

Parameter Description
frame the source JFrame

Return

extended state mask from the source

Declaration

public static int getPersistentExtendedStateMask(JFrame frame) 

Method Source Code

//package com.java2s;
/*/*w  w w .j a v  a2s. c o m*/
 * Copyright (C) 2009 Illya Yalovyy
 * Use is subject to license terms.
 */

import javax.swing.JFrame;

public class Main {
    private static final String FRAME_PERSISTENT_EXTENDED_STATE_MASK = "FrameState.persistentExtendedStateMask";

    /**
     * Gets {@code JFrame} extended state mask for this frame. Defaults to
     * Integer.MAX_VALUE (all bits set).
     *
     * @param frame the source {@code JFrame}
     * @return extended state mask from the source
     */
    public static int getPersistentExtendedStateMask(JFrame frame) {
        Object res = frame.getRootPane().getClientProperty(FRAME_PERSISTENT_EXTENDED_STATE_MASK);
        if (res instanceof Integer) {
            return (Integer) res;
        }
        return Integer.MAX_VALUE;
    }
}

Related

  1. getJFrameOfComponent(Component cmpnt)
  2. getModalDlg(JFrame frame, String title)
  3. getParentJFrame(Component c)
  4. getParentJFrame(Container theFrame)
  5. getParentJFrame(java.awt.Container component)
  6. getRootJFrame(Component c)
  7. getRootJFrame(Component component)
  8. getTheJFrame(String title, int width, int height, int x, int y)
  9. getTopJFrame(Container c)