public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { new GotoDialogSupport().showGotoDialog(); } }
public void keyTyped(KeyEvent evt) { if (evt.getKeyChar() == '\n') { actionPerformed( new ActionEvent(gotoButtons[0], 0, null)); } } });
public void actionPerformed(ActionEvent evt) { Object src = evt.getSource(); if (src == gotoButtons[0] || src == gotoPanel ) { // Find button if (performGoto()) { gotoPanel.updateHistory(); //A.N.: support for history disposeGotoDialog(); } } else { // Cancel button disposeGotoDialog(); } }
public void showGotoDialog() { Dialog dialog = createGotoDialog(); if (dialog == null) { // already visible // TODO:beep() return; } gotoPanel.popupNotify(); dialog.setVisible(true); }
public void windowClosing(WindowEvent evt) { disposeGotoDialog(); }
public void showGotoDialog(KeyEventBlocker blocker) { Dialog dialog = createGotoDialog(); if( dialog == null ) { // already visible // TODO:beep() return; } dialog.setVisible(true); gotoPanel.popupNotify(blocker); WindowAdapter winAdapt = new WindowAdapter(){ public void windowClosing(WindowEvent evt) { disposeGotoDialog(); } public void windowClosed(WindowEvent evt) { SwingUtilities.invokeLater(new Runnable(){ public void run(){ Utilities.returnFocus(); } }); } }; dialog.addWindowListener(winAdapt); }
public void actionPerformed(ActionEvent evt) { Object src = evt.getSource(); if (src == gotoButtons[0] || src == gotoPanel) { // Find button if (performGoto()) { gotoPanel.updateHistory(); // A.N.: support for history disposeGotoDialog(); } } else { // Cancel button disposeGotoDialog(); } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { new GotoDialogSupport().showGotoDialog(new KeyEventBlocker(target, false)); } }
public void keyTyped(KeyEvent evt) { if (evt.getKeyChar() == '\n') { actionPerformed(new ActionEvent(gotoButtons[0], 0, null)); } } });