Examples of WindowEvent


Examples of java.awt.event.WindowEvent

                // isFocused method may not return the correct value
                // because the window is in transition.
                boolean hasFocus = (Boolean) component.getClientProperty(FRAME_ACTIVE_PROPERTY);
                if (hasFocus) {
                    focusListener.windowGainedFocus(
                            new WindowEvent(window, WindowEvent.WINDOW_GAINED_FOCUS));
                } else {
                    focusListener.windowLostFocus(
                            new WindowEvent(window, WindowEvent.WINDOW_LOST_FOCUS));
                }
            }
        };
    }
View Full Code Here

Examples of java.awt.event.WindowEvent

      close();
    }
  }

  private void close() {
    dispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
  }
View Full Code Here

Examples of java.awt.event.WindowEvent

      close();
    }
  }

  private void close() {
    dispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
  }
View Full Code Here

Examples of java.awt.event.WindowEvent

        this.jList1.clearSelection();
        this.jButtonExcluir.setEnabled(false);
    }//GEN-LAST:event_jTextField1FocusGained

    private void jButtonSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSalvarActionPerformed
        this.processWindowEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
        this.setVisible(false);
        this.dispose();
    }//GEN-LAST:event_jButtonSalvarActionPerformed
View Full Code Here

Examples of java.awt.event.WindowEvent

            Window window = (Window) src;
            int id = event.getEventId();

            if (id == WindowEvent.WINDOW_CLOSING) {
                toolkit.getSystemEventQueueImpl().postEvent(
                          new WindowEvent(window, WindowEvent.WINDOW_CLOSING));

                return true;
            } else if (id == WindowEvent.WINDOW_STATE_CHANGED) {
                if (window instanceof Frame) {
                    ((Frame) window)
View Full Code Here

Examples of java.awt.event.WindowEvent

        if (newIconified != oldIconified) {
            int eventID = (newIconified != 0 ? WindowEvent.WINDOW_ICONIFIED :
                                               WindowEvent.WINDOW_DEICONIFIED);

            postEvent(new WindowEvent(this, eventID, 0, 0));
        }
        postEvent(new WindowEvent(this, WindowEvent.WINDOW_STATE_CHANGED,
                                  oldState, state));
    }
View Full Code Here

Examples of java.awt.event.WindowEvent

        Window oppositeDecorWnd = ((opposite != null) ? opposite.getFrameDialogOwner() : null);
        boolean focusedWindowChanged = ((wnd != null) && (focus ? focusedWnd != wnd
                : opposite != wnd));
        boolean activeWindowChanged = ((decorWnd != null) && (focus ? actualActiveWindow != decorWnd
                : oppositeDecorWnd != decorWnd));
        WindowEvent activationEvent = (activeWindowChanged ? new WindowEvent(decorWnd,
                activationEventId, oppositeDecorWnd) : null);
        if (activeWindowChanged && focus) {
            decorWnd.postEvent(activationEvent);
            actualActiveWindow = decorWnd;
        }
        if (focusedWindowChanged) {
            wnd.postEvent(new WindowEvent(wnd, focusEventId, opposite));
            actualFocusedWindow = (focus ? wnd : null);
        }
        if (activeWindowChanged && !focus) {
            decorWnd.postEvent(activationEvent);
            actualActiveWindow = null;
View Full Code Here

Examples of java.awt.event.WindowEvent

            return (preProcessKeyEvent(ke) || dispatchKeyEvent(ke));
        } else if (e instanceof FocusEvent) {
            FocusEvent fe = (FocusEvent) e;
            return dispatchFocusEvent(fe);
        } else if (e instanceof WindowEvent) {
            WindowEvent we = (WindowEvent) e;
            return dispatchWindowEvent(we);
        }
        return false;
    }
View Full Code Here

Examples of java.awt.event.WindowEvent

                mapToDisplay(false);
                disposed = true;
                opened = false;
                disposeInputContext();
                finishHierarchyChange(this, parent, 0);
                postEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSED));
            }
        } finally {
            toolkit.unlockAWT();
        }
    }
View Full Code Here

Examples of java.awt.event.WindowEvent

            }
            super.show();
            toFront();
            if (!opened) {
                opened = true;
                postEvent(new WindowEvent(this, WindowEvent.WINDOW_OPENED));
            }
        } finally {
            toolkit.unlockAWT();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.