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()); repaint(); }
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()); repaint(); }
private void reverseSearch(String txt) { if ((txt == null) || (txt.length() == 0)) { return; } int max = getRowCount(); int pos = getSelectedRow(); if (pos < 1) { pos = max - 1; } for (int i = pos - 1; i >= 0; i--) { boolean match = matchText(BaseTable.this.getValueAt(i, 0), txt); if (match) { changeSelection(i, 0, false, false); //Set renderers can overpaint it, so repaint repaint(); break; } } }
private void processSearchText(String txt) { if (txt == null || txt.length() == 0) { return; } int max = getRowCount(); int pos = getSelectedRow(); if (pos == max - 1 || pos < 0) { pos = 0; } for (int i=0; i < max; i++) { boolean match = matchText(BaseTable.this.getValueAt(i, 0), txt); if (match) { changeSelection(i, 0, false, false); //Set renderers can overpaint it, so repaint repaint(); break; } if (pos++ == max -1) { pos = 0; } } }
private void processSearchText(String txt) { if (txt == null || txt.length() == 0) { return; } int max = getRowCount(); int pos = getSelectedRow(); if (pos == max - 1 || pos < 0) { pos = 0; } for (int i=0; i < max; i++) { boolean match = matchText(BaseTable.this.getValueAt(i, 0), txt); if (match) { changeSelection(i, 0, false, false); //Set renderers can overpaint it, so repaint repaint(); break; } if (pos++ == max -1) { pos = 0; } } }
private void forwardSearch(String txt) { if ((txt == null) || (txt.length() == 0)) { return; } int max = getRowCount(); int pos = getSelectedRow() + 1; if ((pos == (max - 1)) || (pos < 0)) { pos = 0; } for (int i = pos; i < max; i++) { boolean match = matchText(BaseTable.this.getValueAt(i, 0), txt); if (match) { changeSelection(i, 0, false, false); //Set renderers can overpaint it, so repaint repaint(); break; } } }
private void forwardSearch(String txt) { if (txt == null || txt.length() == 0) { return; } int max = getRowCount(); int pos = getSelectedRow()+1; if (pos == max - 1 || pos < 0) { pos = 0; } for (int i=pos; i < max; i++) { boolean match = matchText(BaseTable.this.getValueAt(i, 0), txt); if (match) { changeSelection(i, 0, false, false); //Set renderers can overpaint it, so repaint repaint(); break; } } }
private void forwardSearch(String txt) { if (txt == null || txt.length() == 0) { return; } int max = getRowCount(); int pos = getSelectedRow()+1; if (pos == max - 1 || pos < 0) { pos = 0; } for (int i=pos; i < max; i++) { boolean match = matchText(BaseTable.this.getValueAt(i, 0), txt); if (match) { changeSelection(i, 0, false, false); //Set renderers can overpaint it, so repaint repaint(); break; } } }
private void reverseSearch(String txt) { if (txt == null || txt.length() == 0) { return; } int max = getRowCount(); int pos = getSelectedRow(); if (pos < 1) { pos = max-1; } for (int i=pos-1; i >=0; i--) { boolean match = matchText(BaseTable.this.getValueAt(i, 0), txt); if (match) { changeSelection(i, 0, false, false); //Set renderers can overpaint it, so repaint repaint(); break; } } }
private void reverseSearch(String txt) { if (txt == null || txt.length() == 0) { return; } int max = getRowCount(); int pos = getSelectedRow(); if (pos < 1) { pos = max-1; } for (int i=pos-1; i >=0; i--) { boolean match = matchText(BaseTable.this.getValueAt(i, 0), txt); if (match) { changeSelection(i, 0, false, false); //Set renderers can overpaint it, so repaint repaint(); break; } } }
public void paintComponent (Graphics g) { super.paintComponent(g); //Issue 41546 - bad repaint when scrolling if (searchField != null && searchField.isVisible()) { searchField.repaint(); } }
public void paintComponent (Graphics g) { super.paintComponent(g); //Issue 41546 - bad repaint when scrolling if (searchField != null && searchField.isVisible()) { searchField.repaint(); } }