@Override public void focusLost(FocusEvent e) { if (e.isTemporary() || isAlwaysShown()) { return ; } Component oppositeComponent = e.getOppositeComponent(); if (e.getSource() != searchTextField) { ((Component) e.getSource()).removeFocusListener(this); } if (oppositeComponent instanceof JMenuItem || oppositeComponent instanceof JPopupMenu) { oppositeComponent.addFocusListener(this); return ; } if (oppositeComponent == searchTextField) { return ; } if (searchPanel != null) { removeSearchField(); //fireQuickSearchConfirmed(); callback.quickSearchCanceled(); } } }
@Override public void focusGained(FocusEvent fe) { if (!fe.isTemporary()) customOption.setSelected(true); } });
public void focusLost(FocusEvent e) { if (!e.isTemporary()) { updateText(); } }
/** * {@inheritDoc} */ @Override public void focusLost(FocusEvent e) { if (!e.isTemporary()) { fireConnectorValueChange(); } } });
/** * {@inheritDoc} */ @Override public void focusLost(FocusEvent e) { if (!e.isTemporary()) { performActionIfNeeded(); } } });
@Override public void focusLost(FocusEvent e) { if (!e.isTemporary()) { StringBuffer saveFile = new StringBuffer(chatFilenameFormat.getText()); if (saveFile.indexOf(".") < 0) { saveFile.append(".html"); } AppPreferences.setChatFilenameFormat(saveFile.toString()); } } });
@Override public void focusLost(FocusEvent e) { boolean keepSelection = components.contains(e.getOppositeComponent()) || e.isTemporary(); if (!keepSelection) action.run(); } };
@Override public void focusGained(FocusEvent e) { if (!e.isTemporary()) { JTextField tf = ((DateField) e.getSource()).getFormattedTextField(); tf.requestFocus(); } } });
public void focusLost(FocusEvent fe) { if (!fe.isTemporary()) { FocusLostTask task = new FocusLostTask(textField); if (textField instanceof JFormattedTextField) { SwingUtilities.invokeLater(task); } else { task.run(); } } } });
@Override public void focusLost(FocusEvent fe) { if (!fe.isTemporary()) { FocusLostTask task = new FocusLostTask(textField); if (textField instanceof JFormattedTextField) { SwingUtilities.invokeLater(task); } else { task.run(); } } } });
public void focusLost(FocusEvent evt) { if (evt.isTemporary()) { return; } int selectedRow = list.getSelectedIndex(); table.getSelectionModel().setAnchorSelectionIndex(selectedRow); table.getColumnModel().getSelectionModel().setAnchorSelectionIndex(0); }
public void focusLost(FocusEvent evt) { if (evt.isTemporary()) return; int selectedRow = list.getSelectedIndex(); table.getSelectionModel().setAnchorSelectionIndex(selectedRow); table.getColumnModel().getSelectionModel().setAnchorSelectionIndex(0); }
@Override public void focusLost(final FocusEvent e) { if(! e.isTemporary()){ spellCheckerController.enableAutoSpell(editorPane, false); enabled = false; noteManager.saveNote(); } }
/** * Called when the component containing the caret loses focus. This is implemented to set the * caret to visibility to false. * * @param e * the focus event * @see FocusListener#focusLost */ public void focusLost(FocusEvent e) { setVisible(false); setSelectionVisible(ownsSelection || e.isTemporary()); }
static void focusEventToString(FocusEvent fe, final StringBuffer sb) { Component target = (Component) fe.getSource(); Component opposite = fe.getOppositeComponent(); sb.append(" focus "); //NOI18N sb.append((fe.getID() == FocusEvent.FOCUS_GAINED) ? " gained by " : " lost by "); //NOI18N compToString(target, sb); sb.append((fe.getID() == FocusEvent.FOCUS_GAINED) ? " from " : " to "); //NOI18N compToString(opposite, sb); sb.append(" isTemporary: "); //NOI18N sb.append(fe.isTemporary()); }
static void focusEventToString (FocusEvent fe, final StringBuffer sb) { Component target = (Component) fe.getSource(); Component opposite = (Component) fe.getOppositeComponent(); sb.append (" focus "); //NOI18N sb.append (fe.getID() == FocusEvent.FOCUS_GAINED ? " gained by " : " lost by "); //NOI18N compToString (target, sb); sb.append (fe.getID() == FocusEvent.FOCUS_GAINED ? " from " : " to "); //NOI18N compToString (opposite, sb); sb.append (" isTemporary: "); //NOI18N sb.append (fe.isTemporary()); }
void handleFocus(FocusEvent event) // @C2A { // @C2A // Can not call this directly from inner @C2A // class, since it is protected. @C2A processFocusEvent(new FocusEvent(this, event.getID(), event.isTemporary())); // @C2A } // @C2A
@Override public void focusGained(FocusEvent e) { if (!e.isTemporary()) { JTextField tf = ((DateField) e.getSource()).getFormattedTextField(); tf.requestFocusInWindow(); } } });
private class SelectAllOfFocus extends FocusAdapter { @Override public void focusGained(FocusEvent e) { if (! e.isTemporary()) { JFormattedTextField textField = (JFormattedTextField)e.getComponent(); // This is needed to put the text field in edited mode, so that its processFocusEvent doesn't // do anything. Otherwise, it calls setValue, and the selection is lost. textField.setText(textField.getText()); textField.selectAll(); } } }
@Override public void focusLost(FocusEvent e) { FocusEvent fe = new FocusEvent(ModelGrid.this, e.getID(), e.isTemporary(), e.getOppositeComponent()); for (FocusListener l : getFocusListeners()) { l.focusLost(fe); } }