protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { abortAction.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "")); } else if (e.getID() == WindowEvent.WINDOW_CLOSED) { close(); } }
public void frame__windowStateChanged(WindowEvent e) { if ((e.getNewState() & Frame.ICONIFIED) == Frame.ICONIFIED) { stateMachine.minimized = true; KeyHook.unblockWindowsKey(); } else if ((e.getNewState() & Frame.NORMAL) == Frame.NORMAL) { stateMachine.minimized = false; KeyHook.blockWindowsKey(); } }
@Override public void windowStateChanged(final WindowEvent e) { if (e.getNewState() == Frame.ICONIFIED) { Logger.debug("Window Iconified"); windowIconifiedEvent(); } else if (e.getNewState() != Frame.ICONIFIED) { Logger.debug("Window Deiconified"); windowDeiconifiedEvent(); } }
@Override public void eventDispatched(AWTEvent event) { if (event.getID() == WindowEvent.WINDOW_OPENED) { final WindowEvent we = (WindowEvent) event; for (JBPopup each : JBPopupFactory.getInstance().getChildPopups(this)) { if (each.getContent() != null && SwingUtilities.isDescendingFrom(each.getContent(), we.getWindow())) { super.setPopupVisible(false); } } } }
@Override protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { client.shutdown(); } super.processWindowEvent(e); }
protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { try { FocusManager fm = FocusManager.getCurrentManager(); if (fm != null) { Component cmp = fm.getFocusOwner(); if (cmp != null) { // フォーカスロスト前に×ボタンで閉じる場合を想定し、擬似的にFocusLostを発行する cmp.dispatchEvent(new FocusEvent(cmp, FocusEvent.FOCUS_LOST)); } } if (canClose()) { // パラメータを渡し用HashMapに格納する paramas.put("ACT", "close"); paramas.put("INSURER_NM", ""); paramas.put("INSURER_NO", ""); paramas.put("JIGYOUSHA_NO", ""); closeWindow(); } else { return; } } catch (Exception ex) { ex.printStackTrace(); } super.processWindowEvent(e); closeWindow(); } super.processWindowEvent(e); }
/* * (non-Javadoc) * * @see * java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent) */ public void windowClosing(java.awt.event.WindowEvent arg0) { if (bWindowListener) System.out.println("windowClosing=" + arg0.getSource()); int theChoice; theChoice = JOptionPane.showConfirmDialog( null, "關閉時是否儲存參數", "關閉", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null); if (theChoice == JOptionPane.YES_OPTION) { StringBuffer sb = new StringBuffer(); for (int ii = 0; ii < this.getComponentCount(); ii++) sb.append( this.getComponents()[ii].getName() + "=" + getComponentValue(this.getComponents()[ii]) + System.getProperty("line.separator")); FileUtil.saveToFile(configFilePath, sb.toString().getBytes()); Runtime.getRuntime().exit(0); } else if (theChoice == JOptionPane.NO_OPTION) { Runtime.getRuntime().exit(0); } else if (theChoice == JOptionPane.CANCEL_OPTION) { Runtime.getRuntime().exit(0); } }
@Override public void windowStateChanged(WindowEvent e) { if (e.getOldState() == JFrame.ICONIFIED && messageReceivedWhileIconified) { setForceFocus(); messageReceivedWhileIconified = false; } }
public void windowClosing(WindowEvent e) { // e.getWindow().setVisible(false); (e.getWindow()).dispose(); // System.exit(0); // (new Frame()).setVisible(false); // this.windowClosed(e); }
@Override // 设置窗口显示模式 protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { switch (getDefaultCloseOperation()) { case HIDE_ON_CLOSE: setVisible(false); MainFrame.getMainFrame().cancelShowNear(); MainFrame.getMainFrame().cancelShowFocusNearPoint(); break; case DISPOSE_ON_CLOSE: dispose(); break; case DO_NOTHING_ON_CLOSE: default: break; case EXIT_ON_CLOSE: // This needs to match the checkExit call in // setDefaultCloseOperation System.exit(0); break; } } }
@Override public void windowClosing(WindowEvent e) { int n = JOptionPane.NO_OPTION; if (fileEdited) { n = JOptionPane.showConfirmDialog( view, "Il progetto " + project.getTitle() + " è stato modificato. Salvare il File prima di uscire?"); } switch (n) { case JOptionPane.OK_OPTION: saveProject(); case JOptionPane.NO_OPTION: try { comunication.close(); } catch (IOException e1) { e1.printStackTrace(); } view.trend.close(); e.getWindow().dispose(); System.exit(0); break; case JOptionPane.CANCEL_OPTION: break; } }
protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); int defaultCloseOperation = getDefaultCloseOperation(); if ((e.getID() == WindowEvent.WINDOW_CLOSING) && (defaultCloseOperation == EXIT_ON_CLOSE)) { System.exit(returnCode); } }
@Override /** Closing the application */ protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); } }
/* (non-Javadoc) * @see java.awt.Window#processWindowEvent(java.awt.event.WindowEvent) */ protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { // Fenster schliessen. this.setVisible(false); this.dispose(); } }
/** * A window is closed (by the 'x') - create an SVET_DESTROY event. If it was the last open Window, * also send an SVET_EXIT event (but do not exit unless the client says so). */ public void windowClosing(WindowEvent e) { processEvent(new SVEvent(SVEventType.SVET_DESTROY, svWindow, lastXMove, lastYMove, 0, 0, null)); e.getWindow().dispose(); SVWindow.nrWindows--; if (SVWindow.nrWindows == 0) { processEvent(new SVEvent(SVEventType.SVET_EXIT, svWindow, lastXMove, lastYMove, 0, 0, null)); } }
protected void mainFrameWindowStateChanged(WindowEvent e) { // minimized if ((e.getNewState() & mainFrame.MAXIMIZED_BOTH) == mainFrame.MAXIMIZED_BOTH) { hideBtn.setEnabled(false); } else { hideBtn.setEnabled(true); } }
/** Window closing */ protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { if (_responseTableModel != null) { _responseTableModel.cleanup(); } dispose(); } }
protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { status = CLOSED_OPTION; dispose(); } super.processWindowEvent(e); }
@Override public void windowActivated(WindowEvent event) { ResourceEditor editor = (ResourceEditor) event.getWindow(); // dont double add, but also bump this one to the end if (mostRecentFocusedEditors.contains(editor)) mostRecentFocusedEditors.remove(editor); mostRecentFocusedEditors.add(editor); Application.this.notifyApplicationWindowActivated(event); }
protected void processWindowEvent(java.awt.event.WindowEvent e) { super.processWindowEvent(e); if (e.getID() != java.awt.event.WindowEvent.WINDOW_OPENED) //noinspection UnnecessaryReturnStatement return; GLFrame glFrame = new GLFrame(outputArea); glFrame.setVisible(true); }
/** Handle dialog closing event. */ protected void processWindowEvent(WindowEvent e) { int id = e.getID(); if (id == WindowEvent.WINDOW_CLOSING) { selectedDir = null; dispose(); } else { super.processWindowEvent(e); } }
@Override public void windowClosing(WindowEvent arg0) { FrameEdit edit = (FrameEdit) arg0.getSource(); if (editFrames.contains(edit)) { // System.out.println("destory: " + edit.toString()); editFrames.remove(edit); edit = null; } }
/** * Window Events - requestFocus * * @param e */ @Override protected void processWindowEvent(final WindowEvent e) { super.processWindowEvent(e); // // When window is opened, focus on initial answer button if (e.getID() == WindowEvent.WINDOW_OPENED) { focusInitialAnswerButton(); } } // processWindowEvent
protected void processWindowEvent(WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { /* * 关闭当前窗体 如果省略此句,那么就禁用了关闭按钮 */ this.dispose(); } else { super.processWindowEvent(e); } }
public void windowClosing(WindowEvent e) { if (online) { try { client.sendDisconnect(); } catch (IOException e1) { e1.printStackTrace(); } } e.getWindow().dispose(); // Fenster "killen" System.exit(0); }
@Override public void windowClosed(WindowEvent event) { ResourceEditor editor = (ResourceEditor) event.getSource(); if (openEditors2.containsKey(editor)) openEditors.remove(openEditors2.get(editor)); openEditors2.remove(editor); mostRecentFocusedEditors.remove(editor); editor.removeWindowListener( openEditorsListener); // not neceesary since they dispose on close? System.gc(); // might help? especially with media resources? Application.this.notifyApplicationWindowClosed(event); }
@Override protected void processWindowEvent(final WindowEvent e) { if (e.getID() == WindowEvent.WINDOW_CLOSING) { if (!plugin) { dispose(); System.exit(0); } else { saveWindowState(); setVisible(false); } } else { super.processWindowEvent(e); } }
/** * Descripción de Método * * @param e */ public void windowStateChanged(WindowEvent e) { // The Customize Window was closed if ((e.getID() == WindowEvent.WINDOW_CLOSED) && (m_reportEngine != null)) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); log.info("Re-read PrintFormat"); int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().getID(); Language language = m_reportEngine.getPrintFormat().getLanguage(); MPrintFormat pf = MPrintFormat.get(Env.getCtx(), AD_PrintFormat_ID, true); pf.setLanguage(language); // needs to be re-set - otherwise viewer will be blank pf.setTranslationLanguage(language); m_reportEngine.setPrintFormat(pf); revalidate(); cmd_drill(); // setCursor } } // windowStateChanged
@Override public void windowClosing(WindowEvent e) { layout.remove((NotificationWindow) e.getWindow()); }
public void windowClosing(WindowEvent e) { Window w = e.getWindow(); w.setVisible(false); }