/** Our own painting code for the selection row - normally the UI delegate * would do this, but we specifically block it from adding a focus listener * and do it ourselves, since when focus changes, we need to repaint both * rows, not just the selected cell. */ protected void paintSelectionRow() { paintRow(getSelectedRow()); }
/** Our own painting code for the selection row - normally the UI delegate * would do this, but we specifically block it from adding a focus listener * and do it ourselves, since when focus changes, we need to repaint both * rows, not just the selected cell. */ protected void paintSelectionRow() { paintRow(getSelectedRow()); }
/** Our own painting code for the selection row - normally the UI delegate * would do this, but we specifically block it from adding a focus listener * and do it ourselves, since when focus changes, we need to repaint both * rows, not just the selected cell. */ protected void paintSelectionRow() { paintRow(getSelectedRow()); }
public void addNotify() { super.addNotify(); selectionBeforeLastShow = BaseTable.this.getSelectedRow(); }
public void addNotify() { super.addNotify(); selectionBeforeLastShow = BaseTable.this.getSelectedRow(); }
public void addNotify() { super.addNotify(); selectionBeforeLastShow = BaseTable.this.getSelectedRow(); }
/** Determines if the row should be painted as if it were selected. This * is overridden by SheetTable to also check if the focused component is * known to the current inplace editor, if any */ protected boolean isSelected(int row, Component focusOwner) { return ((getSelectedRow() == row) || ((editingRow == row) && !inEditorRemoveRequest())) && (hasFocus() || isKnownComponent(focusOwner) || inEditRequest()); }
/** Determines if the row should be painted as if it were selected. This * is overridden by SheetTable to also check if the focused component is * known to the current inplace editor, if any */ protected boolean isSelected(int row, Component focusOwner) { return (getSelectedRow() == row || (editingRow == row && !inEditorRemoveRequest())) && (hasFocus() || isKnownComponent(focusOwner) || inEditRequest()); }
/** Determines if the row should be painted as if it were selected. This * is overridden by SheetTable to also check if the focused component is * known to the current inplace editor, if any */ protected boolean isSelected(int row, Component focusOwner) { return (getSelectedRow() == row || (editingRow == row && !inEditorRemoveRequest())) && (hasFocus() || isKnownComponent(focusOwner) || inEditRequest()); }
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 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; } } }
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 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 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 whole field's panel, so repaint getRootPane().getLayeredPane().repaint(); break; } if (pos++ == (max - 1)) { pos = 0; } } }
public void actionPerformed(ActionEvent e) { int next = getSelectedRow() + (direction ? 1 : -1);
public void actionPerformed(ActionEvent e) { int next = getSelectedRow() + (direction ? 1 : -1);