Example usage for java.awt Toolkit isFrameStateSupported

List of usage examples for java.awt Toolkit isFrameStateSupported

Introduction

In this page you can find the example usage for java.awt Toolkit isFrameStateSupported.

Prototype

public boolean isFrameStateSupported(int state) throws HeadlessException 

Source Link

Document

Returns whether Toolkit supports this state for Frame s.

Usage

From source file:WindowEventDemo.java

public void checkWM() {
    Toolkit tk = frame.getToolkit();
    if (!(tk.isFrameStateSupported(Frame.ICONIFIED))) {
        displayMessage("Your window manager doesn't support ICONIFIED.");
    }/*ww w . j av a2  s  . c  o  m*/
    if (!(tk.isFrameStateSupported(Frame.MAXIMIZED_VERT))) {
        displayMessage("Your window manager doesn't support MAXIMIZED_VERT.");
    }
    if (!(tk.isFrameStateSupported(Frame.MAXIMIZED_HORIZ))) {
        displayMessage("Your window manager doesn't support MAXIMIZED_HORIZ.");
    }
    if (!(tk.isFrameStateSupported(Frame.MAXIMIZED_BOTH))) {
        displayMessage("Your window manager doesn't support MAXIMIZED_BOTH.");
    } else {
        displayMessage("Your window manager supports MAXIMIZED_BOTH.");
    }
}

From source file:WindowEventDemo.java

public void checkWM() {
    Toolkit tk = frame.getToolkit();
    if (!(tk.isFrameStateSupported(Frame.ICONIFIED))) {
        displayMessage("Your window manager doesn't support ICONIFIED.");
    } else/*from   www  . j ava  2 s. com*/
        displayMessage("Your window manager supports ICONIFIED.");
    if (!(tk.isFrameStateSupported(Frame.MAXIMIZED_VERT))) {
        displayMessage("Your window manager doesn't support MAXIMIZED_VERT.");
    } else
        displayMessage("Your window manager supports MAXIMIZED_VERT.");
    if (!(tk.isFrameStateSupported(Frame.MAXIMIZED_HORIZ))) {
        displayMessage("Your window manager doesn't support MAXIMIZED_HORIZ.");
    } else
        displayMessage("Your window manager supports MAXIMIZED_HORIZ.");
    if (!(tk.isFrameStateSupported(Frame.MAXIMIZED_BOTH))) {
        displayMessage("Your window manager doesn't support MAXIMIZED_BOTH.");
    } else {
        displayMessage("Your window manager supports MAXIMIZED_BOTH.");
    }
}