/** * Get the index of the sub row that is currently selected via the keyboard. * If the row value maps to one rendered row element, the subrow is 0. * * @return the currently selected subrow, or -1 if none selected */ public int getKeyboardSelectedSubRow() { return KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy() ? -1 : keyboardSelectedSubrow; }
/** * Get the index of the column that is currently selected via the keyboard. * * @return the currently selected column, or -1 if none selected */ public int getKeyboardSelectedColumn() { return KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy() ? -1 : keyboardSelectedColumn; }
/** * Set the keyboard selected column index and optionally focus on the new * cell. * * @param column the column index, greater than or equal to zero * @param stealFocus true to focus on the new column * @see #setKeyboardSelectedColumn(int) */ public void setKeyboardSelectedColumn(int column, boolean stealFocus) { assert column >= 0 : "Column must be zero or greater"; if (KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy()) { return; } this.keyboardSelectedColumn = column; // Reselect the row to move the selected column. setKeyboardSelectedRow(getKeyboardSelectedRow(), keyboardSelectedSubrow, stealFocus); }
/** * Get the index of the column that is currently selected via the keyboard. * * @return the currently selected column, or -1 if none selected */ public int getKeyboardSelectedColumn() { return KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy() ? -1 : keyboardSelectedColumn; }
/** * Get the index of the sub row that is currently selected via the keyboard. * If the row value maps to one rendered row element, the subrow is 0. * * @return the currently selected subrow, or -1 if none selected */ public int getKeyboardSelectedSubRow() { return KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy() ? -1 : keyboardSelectedSubrow; }
/** * Get the index of the column that is currently selected via the keyboard. * * @return the currently selected column, or -1 if none selected */ public int getKeyboardSelectedColumn() { return KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy() ? -1 : keyboardSelectedColumn; }
/** * Get the index of the sub row that is currently selected via the keyboard. * If the row value maps to one rendered row element, the subrow is 0. * * @return the currently selected subrow, or -1 if none selected */ public int getKeyboardSelectedSubRow() { return KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy() ? -1 : keyboardSelectedSubrow; }
@Override protected void setKeyboardSelected(int index, boolean selected, boolean stealFocus) { if (KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy() || !isRowWithinBounds(index)) { return;
|| KeyboardSelectionPolicy.BOUND_TO_SELECTION == getKeyboardSelectionPolicy(); T value = getVisibleItem(relRow);
/** * Set the keyboard selected column index and optionally focus on the new * cell. * * @param column the column index, greater than or equal to zero * @param stealFocus true to focus on the new column * @see #setKeyboardSelectedColumn(int) */ public void setKeyboardSelectedColumn(int column, boolean stealFocus) { assert column >= 0 : "Column must be zero or greater"; if (KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy()) { return; } this.keyboardSelectedColumn = column; // Reselect the row to move the selected column. setKeyboardSelectedRow(getKeyboardSelectedRow(), keyboardSelectedSubrow, stealFocus); }
/** * Set the keyboard selected column index and optionally focus on the new * cell. * * @param column the column index, greater than or equal to zero * @param stealFocus true to focus on the new column * @see #setKeyboardSelectedColumn(int) */ public void setKeyboardSelectedColumn(int column, boolean stealFocus) { assert column >= 0 : "Column must be zero or greater"; if (KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy()) { return; } this.keyboardSelectedColumn = column; // Reselect the row to move the selected column. setKeyboardSelectedRow(getKeyboardSelectedRow(), keyboardSelectedSubrow, stealFocus); }
@Override protected void setKeyboardSelected(int index, boolean selected, boolean stealFocus) { if (KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy() || !isRowWithinBounds(index)) { return;
@Override protected void setKeyboardSelected(int index, boolean selected, boolean stealFocus) { if (KeyboardSelectionPolicy.DISABLED == getKeyboardSelectionPolicy() || !isRowWithinBounds(index)) { return;
|| KeyboardSelectionPolicy.BOUND_TO_SELECTION == getKeyboardSelectionPolicy(); T value = getVisibleItem(relRow);
|| KeyboardSelectionPolicy.BOUND_TO_SELECTION == getKeyboardSelectionPolicy(); T value = getVisibleItem(relRow);