/** * Returns the selection mode used by this table's selection model. * <p> * PENDING JW - setter? * * @return the selection mode used by this table's selection model * @see ListSelectionModel#getSelectionMode() */ public int getSelectionMode() { return getSelectionModel().getSelectionMode(); }
/** * Returns the selection mode used by this table's selection model. * <p> * PENDING JW - setter? * * @return the selection mode used by this table's selection model * @see ListSelectionModel#getSelectionMode() */ public int getSelectionMode() { return getSelectionModel().getSelectionMode(); }
/** * Returns the selection mode used by this table's selection model. * <p> * PENDING JW - setter? * * @return the selection mode used by this table's selection model * @see ListSelectionModel#getSelectionMode() */ public int getSelectionMode() { return getSelectionModel().getSelectionMode(); }
/** * Returns the selection mode used by this table's selection model. * <p> * PENDING JW - setter? * * @return the selection mode used by this table's selection model * @see ListSelectionModel#getSelectionMode() */ public int getSelectionMode() { return getSelectionModel().getSelectionMode(); }
/** * Returns the selection mode used by this table's selection model. * <p> * PENDING JW - setter? * * @return the selection mode used by this table's selection model * @see ListSelectionModel#getSelectionMode() */ public int getSelectionMode() { return getSelectionModel().getSelectionMode(); }
/** * Resets the selection and resorts the table by the Rules. */ public void resetSelection() { // TODO: there is the bug. commented out. sequiturTable.getSelectionModel().clearSelection(); // sequiturTable.setSortOrder(0, SortOrder.ASCENDING); }
/** * Gets the current state from the given JXTable and stores it for later restore. */ public void storeStateFrom(JXTable table) { oldTableModel = table.getModel(); oldSelectionModel = table.getSelectionModel(); oldSortable = table.isSortable(); }
@Override public void valueChanged(ListSelectionEvent e) { if (!e.getValueIsAdjusting()) { selectionChanged(getTable().getSelectionModel().getMinSelectionIndex() >= 0); } } });
private void selectRowAndEnsureVisible(int row) { if (row != -1) { breakpointsTable.getSelectionModel().setSelectionInterval(row, row); breakpointsTable.scrollRectToVisible(breakpointsTable.getCellRect(row, 0, true)); } }
/** * Overridden to update selectionMapper */ @Override public void setSelectionModel(ListSelectionModel newModel) { super.setSelectionModel(newModel); getSelectionMapper().setViewSelectionModel(getSelectionModel()); }
protected int getSelectedRow() { int selectedRow = getTable().getSelectionModel().getMinSelectionIndex(); if (selectedRow == -1) { return -1; } return getTable().convertRowIndexToModel(selectedRow); }
/** * Gets the current state from the given JXTable and stores it for later restore. */ public void storeStateFrom(JXTable table) { oldTableModel = table.getModel(); oldSelectionModel = table.getSelectionModel(); oldSortable = table.isSortable(); oldDefaultRenderer = table.getTableHeader().getDefaultRenderer(); }
/** * {@inheritDoc} */ @Override public boolean hasFocus() { boolean rowIsLead = (table.getSelectionModel() .getLeadSelectionIndex() == row); boolean colIsLead = (table.getColumnModel().getSelectionModel() .getLeadSelectionIndex() == column); return table.isFocusOwner() && (rowIsLead && colIsLead); }
/** * {@inheritDoc} */ @Override public boolean hasFocus() { boolean rowIsLead = (table.getSelectionModel() .getLeadSelectionIndex() == row); boolean colIsLead = (table.getColumnModel().getSelectionModel() .getLeadSelectionIndex() == column); return table.isFocusOwner() && (rowIsLead && colIsLead); }
/** * {@inheritDoc} */ @Override public boolean hasFocus() { boolean rowIsLead = (table.getSelectionModel() .getLeadSelectionIndex() == row); boolean colIsLead = (table.getColumnModel().getSelectionModel() .getLeadSelectionIndex() == column); return table.isFocusOwner() && (rowIsLead && colIsLead); }
/** * {@inheritDoc} */ @Override public boolean hasFocus() { boolean rowIsLead = (table.getSelectionModel() .getLeadSelectionIndex() == row); boolean colIsLead = (table.getColumnModel().getSelectionModel() .getLeadSelectionIndex() == column); return table.isFocusOwner() && (rowIsLead && colIsLead); }
/** * {@inheritDoc} */ @Override public boolean hasFocus() { boolean rowIsLead = (table.getSelectionModel() .getLeadSelectionIndex() == row); boolean colIsLead = (table.getColumnModel().getSelectionModel() .getLeadSelectionIndex() == column); return table.isFocusOwner() && (rowIsLead && colIsLead); }
@Override public void actionPerformed(ActionEvent e) { getMultipleOptionsModel().moveTop(getSelectedRow()); int finalRow = getTable().convertRowIndexToView(0); getTable().getSelectionModel().setSelectionInterval(finalRow, finalRow); } });
@Override public void actionPerformed(ActionEvent e) { int row = getSelectedRow(); getMultipleOptionsModel().moveUp(row); int finalRow = getTable().convertRowIndexToView(row - 1); getTable().getSelectionModel().setSelectionInterval(finalRow, finalRow); } });
@Override public void actionPerformed(ActionEvent e) { int row = getSelectedRow(); getMultipleOptionsModel().moveDown(row); int finalRow = getTable().convertRowIndexToView(row + 1); getTable().getSelectionModel().setSelectionInterval(finalRow, finalRow); } });