Java Window isResizable(Window window)

Here you can find the source of isResizable(Window window)

Description

is Resizable

License

Apache License

Declaration

public static boolean isResizable(Window window) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.awt.Dialog;

import java.awt.Window;
import javax.swing.JDialog;
import javax.swing.JFrame;

public class Main {

    public static boolean isResizable(Window window) {
        JFrame frame = null;//from ww  w .ja  v a2  s . co m
        JDialog dialog = null;

        if (window instanceof JFrame) {
            frame = (JFrame) window;

            return (frame.isResizable() && (frame.getExtendedState() != JFrame.MAXIMIZED_BOTH));
        } else if (window instanceof Dialog) {
            dialog = (JDialog) window;

            return (dialog != null && dialog.isResizable());

        }

        return false;
    }
}

Related

  1. getWindowTitle(Window window)
  2. getWindowTitle(Window window)
  3. growIfNecessary(Window window)
  4. hideWaitPane(Window win, Timer timer)
  5. installPrefsHandler(final Preferences prefs, final String name, Window window)
  6. modifyDimensions(Window window)
  7. openWindow(final JPanel panel)
  8. putWindowNormalBounds(Window window, Rectangle bounds)
  9. removeWindow(Window w)