Java Code Examples for java.awt.event.WindowEvent#getOldState()

The following examples show how to use java.awt.event.WindowEvent#getOldState() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PopupUtil.java    From cakephp3-netbeans with Apache License 2.0 6 votes vote down vote up
@Override
        public void windowStateChanged(WindowEvent windowEvent) {
            if (popupWindow != null) {
                int oldState = windowEvent.getOldState();
                int newState = windowEvent.getNewState();

                if (((oldState & Frame.ICONIFIED) == 0)
                        && ((newState & Frame.ICONIFIED) == Frame.ICONIFIED)) {
                    hidePopup();
//                } else if (((oldState & Frame.ICONIFIED) == Frame.ICONIFIED) &&
//                           ((newState & Frame.ICONIFIED) == 0 )) {
//                    //TODO remember we showed before and show again? I guess not worth the efford, not part of spec.
                }
            }

        }
 
Example 2
Source File: PopupUtil.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void windowStateChanged(WindowEvent windowEvent) {
            if (popupWindow != null ) {
                int oldState = windowEvent.getOldState();
                int newState = windowEvent.getNewState();
            
                if (((oldState & Frame.ICONIFIED) == 0) &&
                    ((newState & Frame.ICONIFIED) == Frame.ICONIFIED)) {
                    hidePopup();
//                } else if (((oldState & Frame.ICONIFIED) == Frame.ICONIFIED) && 
//                           ((newState & Frame.ICONIFIED) == 0 )) {
//                    //TODO remember we showed before and show again? I guess not worth the efford, not part of spec.
                }
            }

        }
 
Example 3
Source File: StatusLineComponent.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public @Override void windowStateChanged(WindowEvent windowEvent) {
            if (showingPopup) {
                int oldState = windowEvent.getOldState();
                int newState = windowEvent.getNewState();
            
                if (((oldState & Frame.ICONIFIED) == 0) &&
                    ((newState & Frame.ICONIFIED) == Frame.ICONIFIED)) {
                    hidePopup();
//                } else if (((oldState & Frame.ICONIFIED) == Frame.ICONIFIED) && 
//                           ((newState & Frame.ICONIFIED) == 0 )) {
//                    //TODO remember we showed before and show again? I guess not worth the efford, not part of spec.
                }
            }

        }
 
Example 4
Source File: PopupUtil.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void windowStateChanged(WindowEvent windowEvent) {
    if (popupWindow != null ) {
        int oldState = windowEvent.getOldState();
        int newState = windowEvent.getNewState();
    
        if (((oldState & Frame.ICONIFIED) == 0) &&
            ((newState & Frame.ICONIFIED) == Frame.ICONIFIED)) {
            hidePopup();
        }
    }

}
 
Example 5
Source File: SymfonyGoToViewActionPopup.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public void windowStateChanged(WindowEvent windowEvent) {
    if (popupWindow != null ) {
        int oldState = windowEvent.getOldState();
        int newState = windowEvent.getNewState();
    
        if (((oldState & Frame.ICONIFIED) == 0) &&
            ((newState & Frame.ICONIFIED) == Frame.ICONIFIED)) {
            hide();
        }
    }
}
 
Example 6
Source File: PopupUtil.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public void windowStateChanged(WindowEvent windowEvent) {
    if (popupWindow != null) {
        int oldState = windowEvent.getOldState();
        int newState = windowEvent.getNewState();

        if (((oldState & Frame.ICONIFIED) == 0) && ((newState & Frame.ICONIFIED) == Frame.ICONIFIED)) {
            hidePopup();
        }
    }

}
 
Example 7
Source File: PopupUtil.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void windowStateChanged(WindowEvent windowEvent) {
            if (popupWindow != null ) {
                int oldState = windowEvent.getOldState();
                int newState = windowEvent.getNewState();
            
                if (((oldState & Frame.ICONIFIED) == 0) &&
                    ((newState & Frame.ICONIFIED) == Frame.ICONIFIED)) {
                    hidePopup();
//                } else if (((oldState & Frame.ICONIFIED) == Frame.ICONIFIED) && 
//                           ((newState & Frame.ICONIFIED) == 0 )) {
//                    //TODO remember we showed before and show again? I guess not worth the efford, not part of spec.
                }
            }

        }
 
Example 8
Source File: PopupUtil.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void windowStateChanged(WindowEvent windowEvent) {
            if (popupWindow != null ) {
                int oldState = windowEvent.getOldState();
                int newState = windowEvent.getNewState();
            
                if (((oldState & Frame.ICONIFIED) == 0) &&
                    ((newState & Frame.ICONIFIED) == Frame.ICONIFIED)) {
                    hidePopup();
//                } else if (((oldState & Frame.ICONIFIED) == Frame.ICONIFIED) && 
//                           ((newState & Frame.ICONIFIED) == 0 )) {
//                    //TODO remember we showed before and show again? I guess not worth the efford, not part of spec.
                }
            }

        }
 
Example 9
Source File: PopupUtil.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void windowStateChanged(WindowEvent windowEvent) {
            if (popupWindow != null ) {
                int oldState = windowEvent.getOldState();
                int newState = windowEvent.getNewState();
            
                if (((oldState & Frame.ICONIFIED) == 0) &&
                    ((newState & Frame.ICONIFIED) == Frame.ICONIFIED)) {
                    hidePopup();
//                } else if (((oldState & Frame.ICONIFIED) == Frame.ICONIFIED) && 
//                           ((newState & Frame.ICONIFIED) == 0 )) {
//                    //TODO remember we showed before and show again? I guess not worth the efford, not part of spec.
                }
            }

        }