2070 |
|
|
2071 |
public void selectAll() |
public void selectAll() |
2072 |
{ |
{ |
2073 |
|
// rowLead and colLead store the current lead selection indices |
2074 |
|
int rowLead = selectionModel.getLeadSelectionIndex(); |
2075 |
|
int colLead = getColumnModel().getSelectionModel().getLeadSelectionIndex(); |
2076 |
|
// the following calls to setSelectionInterval change the lead selection |
2077 |
|
// indices |
2078 |
setColumnSelectionInterval(0, getColumnCount() - 1); |
setColumnSelectionInterval(0, getColumnCount() - 1); |
2079 |
setRowSelectionInterval(0, getRowCount() - 1); |
setRowSelectionInterval(0, getRowCount() - 1); |
2080 |
|
// the following addSelectionInterval calls restore the lead selection |
2081 |
|
// indices to their previous values |
2082 |
|
addColumnSelectionInterval(colLead,colLead); |
2083 |
|
addRowSelectionInterval(rowLead, rowLead); |
2084 |
} |
} |
2085 |
|
|
2086 |
public Object getValueAt(int row, int column) |
public Object getValueAt(int row, int column) |