private void deleteMatchlistSelections() { int[] selectionIndices = resultsTable.getSelectedRows(); for (int i = selectionIndices.length - 1; i >= 0; i--) { matches.remove(selectionIndices[i]); } resultsTable.getSelectionModel().clearSelection(); resultsTable.addNotify(); }
private void sortOnColumn(int columnIndex) { Comparator<Match> comparator = matchColumns[columnIndex].sorter(); SortingTableModel<Match> model = (SortingTableModel<Match>) resultsTable.getModel(); if (model.sortColumn() == columnIndex) { model.sortDescending(!model.sortDescending()); } model.sortColumn(columnIndex); model.sort(comparator); resultsTable.getSelectionModel().clearSelection(); resultsTable.repaint(); }
public OneClicListSelectionModel(ListSelectionModel delegate, ListModel model) { this.delegate = delegate; this.model = model; delegate.clearSelection(); }
private void deleteMatchlistSelections() { int[] selectionIndices = resultsTable.getSelectedRows(); for (int i = selectionIndices.length - 1; i >= 0; i--) { matches.remove(selectionIndices[i]); } resultsTable.getSelectionModel().clearSelection(); resultsTable.addNotify(); }
public void clearSelection() { mListSelectionModel.clearSelection(); handleListSelection(); }
public void clearSelection() { mListSelectionModel.clearSelection(); handleListSelection(); }
public OneClicListSelectionModel(JList list) { this.delegate = list.getSelectionModel(); this.model = list.getModel(); delegate.clearSelection(); }
public void removeAll() { ListSelectionModel lsm = connectionTable.getSelectionModel(); lsm.clearSelection(); while ( connections.size() > 0 ) { ((Connection) connections.get(0)).remove(); } lsm.setSelectionInterval(0, 0); }
public void removeAll() { ListSelectionModel lsm = connectionTable.getSelectionModel(); lsm.clearSelection(); while ( connections.size() > 0 ) { ((Connection) connections.get(0)).remove(); } lsm.setSelectionInterval(0, 0); }
public void doActionPerformed__on__resetSelection(ActionEvent event) { if (log.isDebugEnabled()) { log.debug(event); } getList().getSelectionModel().clearSelection(); }
public void valueChanged(ListSelectionEvent evt) { int index = selectedNetworkList.getMinSelectionIndex(); if (index > -1) { unselectedNetworkList.getSelectionModel().clearSelection(); leftButton.setEnabled(true); } else { leftButton.setEnabled(false); } updateUpDownButtonEnable(); } });
ListSelectionModel model = table.getSelectionModel(); model.clearSelection(); model.addSelectionInterval(1, 1); model.addSelectionInterval(18, 18); model.addSelectionInterval(23, 23);
public void setSelectedPalette(final BPaletteCouleur _s) { if (model_.contains(_s)) { list_.setSelectedValue(_s, true); } else { list_.getSelectionModel().clearSelection(); } }
public void selectRowByContents(String rowString, int columnIndex, boolean setVisible) { for (int i = 0; i < getRowCount(); i++) { if (getValueAt(i, columnIndex).toString().equals(rowString)) { getSelectionModel().setSelectionInterval(i, i); if (setVisible) { ensureRowVisible(i); } return; } } getSelectionModel().clearSelection(); }
public void setTo(ListSelectionModel sm) { sm.clearSelection(); sm.setSelectionMode(selectionMode); for (int[] itv : intervals) { sm.addSelectionInterval(itv[0], itv[1]); } sm.setAnchorSelectionIndex(anchor); sm.setLeadSelectionIndex(lead); } }
public void selectMethod(String methodName) { for (int i = 0; i < resTable.getRowCount(); i++) { if (resTable.getValueAt(i, 0).toString().equals(methodName)) { resTable.getSelectionModel().setSelectionInterval(i, i); resTable.scrollRectToVisible(resTable.getCellRect(i, 0, true)); return; } } resTable.getSelectionModel().clearSelection(); }
private void sortOnColumn(int columnIndex) { Comparator<Match> comparator = matchColumns[columnIndex].sorter(); SortingTableModel<Match> model = (SortingTableModel<Match>) resultsTable.getModel(); if (model.sortColumn() == columnIndex) { model.sortDescending(!model.sortDescending()); } model.sortColumn(columnIndex); model.sort(comparator); resultsTable.getSelectionModel().clearSelection(); resultsTable.repaint(); }
public void selectRowsByInstances(Object[] instances, int columnIndex, boolean setVisible) { List instancesList = Arrays.asList(instances); getSelectionModel().clearSelection(); for (int i = 0; i < getRowCount(); i++) { if (instancesList.contains(getValueAt(i, columnIndex))) { getSelectionModel().addSelectionInterval(i, i); } } if (setVisible && (getSelectedRow() != -1)) { ensureRowVisible(getSelectedRow()); } }
public void valueChanged(final ListSelectionEvent _e) { final boolean empty = common_.isSelectionEmpty(); final int idx = empty ? -1 : common_.getLeadSelectionIndex(); for (int i = targets_.length - 1; i >= 0; i--) { if (empty) { targets_[i].getTimeListSelectionModel().clearSelection(); } else { targets_[i].getTimeListSelectionModel().setSelectionInterval(idx, idx); } } }