public void focusGained(FocusEvent fe) { textComponent = (JTextComponent) fe.getSource(); attributeSet = textComponent.getDocument().getDefaultRootElement().getAttributes(); } };
public void focusLost(FocusEvent e) { if (!focusLostEvents) return; actionPerformed(new ActionEvent(e.getSource(), 0, "focusLost")); }
@Override public void focusGained(FocusEvent e) { if (e.getSource() == searchTextField) { // make sure nothing is selected int n = searchTextField.getText().length(); searchTextField.select(n, n); } }
@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 focusLost(FocusEvent event) { convertLength(((JTextField) event.getSource()), format); } });
public void focusGained(FocusEvent e) { fieldWithFocus = e.getSource(); if (fieldWithFocus==widthField) constainAspectRatio = true; else if (fieldWithFocus==yField) constainAspectRatio = false; }
public void focusLost(FocusEvent e) { JTextComponent cell = (JTextComponent) e.getSource(); String data = cell.getText(); // TODO: save the data for this cell }
/** Handles information pane updates when component focus changes. */ @Override public void focusGained(FocusEvent e) { Object src = e.getSource(); String text = infoTable.get(src); infoPane.setText("<html>" + text); infoPane.setCaretPosition(0); }
@Override public void focusGained(FocusEvent e) { AbstractCommandButton b = (AbstractCommandButton) e.getSource(); b.repaint(); }
public void focusGained(FocusEvent evt) { m_strOldValue = ((JTextField)evt.getSource()).getText(); super.focusGained(evt); } public void focusLost(FocusEvent evt)
@Override public void focusGained(FocusEvent e) { TextField tf = (TextField)e.getSource(); tf.selectAll(); }
public void focusLost(FocusEvent e) { if (e.getSource() == searchTextField && searchTextField.getText().length() == 0) { clearFailure(false); indicateSearchType(); } }
public void focusGained(FocusEvent fe) { textComponent = (JTextComponent) fe.getSource(); attributeSet = textComponent.getDocument().getDefaultRootElement().getAttributes(); } };
public void focusGained(FocusEvent fe) { textComponent = (JTextComponent) fe.getSource(); attributeSet = textComponent.getDocument().getDefaultRootElement().getAttributes(); } };
@Override public void focusLost(FocusEvent event) { super.focusLost(event); if (event.getSource() == this.manualTickUnit) { validateTickUnit(); } }
public void focusGained(FocusEvent e) { if (blocker != null) blocker.stopBlocking(); ((JComponent)e.getSource()).removeFocusListener(this); }
public void focusGained(FocusEvent e) { //it will be the first focus gained event, so go select //whatever matches the first character processSearchText(((JTextField) e.getSource()).getText()); JRootPane root = getRootPane(); if (root != null) { // #57417 NPE root.getLayeredPane().repaint(); } }
public void focusLost(FocusEvent e) { JComponent component = (JComponent) e.getSource(); component.removeMouseListener(this); component.removeMouseMotionListener(this); setToolTipVisible(false); }