public static FindDialogSupport getFindDialogSupport() { if (singleton == null) { singleton = new FindDialogSupport(); } return singleton; }
public void windowClosing(WindowEvent evt) { hideDialog(); }
public void showFindDialog(KeyEventBlocker blocker) { showFindDialogImpl(false, blocker); }
private void showFindDialogImpl( boolean isReplace, KeyEventBlocker blocker) { synchronized( dialogLock ) { if (findDialog != null) { // we have a dialog, change and raise if( isReplaceDialog != isReplace ) { isReplaceDialog = isReplace; findButtons[1].setVisible( isReplace ); findButtons[2].setVisible( isReplace ); findPanel.changeVisibility(isReplace); findDialog.setTitle (isReplace ? LocaleSupport.getString ("replace-title") : LocaleSupport.getString ("find-title")); // NOI18N } findDialog.toFront(); } else { // create and show new dialog of required type isReplaceDialog = isReplace; createFindButtons(); findButtons[1].setVisible( isReplace ); findButtons[2].setVisible( isReplace ); createFindPanel(); findPanel.changeVisibility(isReplace); findDialog = createFindDialog( findPanel, findButtons, this ); findDialog.addWindowListener( this ); ((JDialog)findDialog).getRootPane().setFocusable(false); } } // end of synchronized section findDialog.pack(); findPanel.init(isReplace, blocker); findDialog.setVisible(true); findPanel.showNotify(); updateCaretPosition(); }
saveBounds(findDialog, isReplaceDialog ? BOUNDS_REPLACE : BOUNDS_FIND); isReplaceDialog = isReplace; findButtons[1].setVisible(isReplace); findPanel.updateFind(); loadBounds(findDialog, isReplace ? BOUNDS_REPLACE : BOUNDS_FIND); findButtons = createFindButtons(); findButtons[1].setVisible(isReplace); findButtons[2].setVisible(isReplace); findPanel.updateFind(); findDialog = createFindDialog(findPanel, findButtons, this); loadBounds(findDialog, isReplace ? BOUNDS_REPLACE : BOUNDS_FIND);
fSup.find(null, false); if (!isReplaceDialog) { hideDialog(); } else { updateCaretPosition(); e.printStackTrace(); updateCaretPosition(); } else if (src == findButtons[2]) { // Replace All button incSearchTimer.stop(); } else if (src == findButtons[3]) { // Cancel button findPanel.getFindProps().putAll(fSup.getFindProperties()); hideDialog();
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { getSupport().showFindDialog(); } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { getSupport().showReplaceDialog(); } }
public FindDialogSupport getSupport() { return FindDialogSupport.getFindDialogSupport(); }
public void keyTyped(KeyEvent evt) { if (evt.getKeyChar() == '\n') { FindDialogSupport.this.actionPerformed(new ActionEvent(findButtons[0], 0, null)); } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { getSupport().showFindDialog(new KeyEventBlocker(target, false)); } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { // make KeyEventBlocker to discard the first key typed event (Ctrl-H) // because it is mapped to backspace in the replace dialog getSupport().showReplaceDialog(new KeyEventBlocker(target, true)); } }
public FindDialogSupport getSupport() { return FindDialogSupport.getFindDialogSupport(); }
public void showFindDialog() { showFindDialogImpl(false); }
public FindDialogSupport getSupport() { if (findDialogSupport == null) { findDialogSupport = new FindDialogSupport(); } return findDialogSupport; }
public void windowClosing(WindowEvent e) { hideDialog(); }
public void showReplaceDialog(KeyEventBlocker blocker) { showFindDialogImpl(true, blocker); }
public FindDialogSupport getSupport() { if (findDialogSupport == null) { findDialogSupport = new FindDialogSupport(); } return findDialogSupport; }
public void showReplaceDialog() { showFindDialogImpl(true); }