/** * If the row at given index is selected, selected paths are updated. * @param counter number of row. */ private void updateSelectedPathIfRowIsSelected(int counter) { if (listSelectionModel.isSelectedIndex(counter)) { final TreePath selPath = treeTable.getTree().getPathForRow(counter); if (selPath != null) { addSelectionPath(selPath); } } }
public void actionPerformed(ActionEvent e) { for (int i = 0; i < dataModel.getRowCount(); i++) { if (selectionModel.isSelectedIndex(i)) { dataModel.setValueAt(value, i, CHECK_COL);
@Override public boolean isSelectedIndex(int index) { if (noSelection) { return false; } else { return super.isSelectedIndex(index); } }
@Override public boolean isSelectedIndex(int index) { boolean selected = super.isSelectedIndex(index); return selected || (getAllEntryIndex() >= 0 && super.isSelectedIndex(getAllEntryIndex())); }
protected void updateFromDja() { if (isInternalUpdate_) { return; } isInternalUpdate_ = true; for (int i = getSize() - 1; i >= 0; i--) { boolean selected = isSelectedInDjaVector(i); if (selected && !model_.isSelectedIndex(i)) { model_.addSelectionInterval(i, i); } else if (!selected && model_.isSelectedIndex(i)) { model_.removeSelectionInterval(i, i); } } isInternalUpdate_ = false; }
/** * If the row at given index is selected, selected paths are updated. * @param counter number of row. */ private void updateSelectedPathIfRowIsSelected(int counter) { if (listSelectionModel.isSelectedIndex(counter)) { final TreePath selPath = treeTable.getTree().getPathForRow(counter); if (selPath != null) { addSelectionPath(selPath); } } }
@Override public int getMinSelectionIndex() { int index = super.getMinSelectionIndex(); if (getAllEntryIndex() < 0) { return index; } if (super.isSelectedIndex(getAllEntryIndex()) && getAllEntryIndex() == 0) { return 1; } return index; }
if (listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = renderer.getPathForRow( counter);
@Override public boolean isSelectedIndex(int index) { InsetPart part = inset.toInnerSpace(index, informer.getContentSize()); if(part.getKind() == InsetPart.PartKind.CONTENT) { return delegate.isSelectedIndex(part.getValue()); } return super.isSelectedIndex(index); }
public void valueChanged(final ListSelectionEvent _e) { if (isInternalUpdate_ || _e.getValueIsAdjusting()) { return; } isInternalUpdate_ = true; for (int i = _e.getFirstIndex(); i <= _e.getLastIndex(); i++) { if (i < 0) { continue; } boolean selected = model_.isSelectedIndex(i); boolean djaSelected = isSelectedInDjaVector(i); if (selected && !djaSelected) { controller_.grid_.addSelection(getDjaObject(i)); } if (!selected && djaSelected) { controller_.grid_.removeSelection(getDjaObject(i)); } } isInternalUpdate_ = false; }
if(min != -1 && max != -1) { for(int counter = min; counter <= max; counter++) { if(listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = tree.getPathForRow (counter);
/** * If <code>updatingListSelectionModel</code> is false, this will * reset the selected paths from the selected rows in the list selection * model. */ protected void updateSelectedPathsFromSelectedRows() { if (!updatingListSelectionModel) { updatingListSelectionModel = true; try { // This is way expensive, ListSelectionModel needs an // enumerator for iterating. int min = listSelectionModel.getMinSelectionIndex(); int max = listSelectionModel.getMaxSelectionIndex(); clearSelection(); if ((min != -1) && (max != -1)) { for (int counter = min; counter <= max; counter++) { if (listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = tree.getPathForRow(counter); if (selPath != null) { addSelectionPath(selPath); } } } } } finally { updatingListSelectionModel = false; } } }
/** * If <code>updatingListSelectionModel</code> is false, this will * reset the selected paths from the selected rows in the list * selection model. */ protected void updateSelectedPathsFromSelectedRows() { if (!updatingListSelectionModel) { updatingListSelectionModel = true; try { // This is way expensive, ListSelectionModel needs an // enumerator for iterating. int min = listSelectionModel.getMinSelectionIndex(); int max = listSelectionModel.getMaxSelectionIndex(); clearSelection(); if ((min != -1) && (max != -1)) { for (int counter = min; counter <= max; counter++) { if (listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = tree.getPathForRow(counter); if (selPath != null) { addSelectionPath(selPath); } } } } } finally { updatingListSelectionModel = false; } } }
/** * If {@code updatingListSelectionModel} is false, this will * reset the selected paths from the selected rows in the list * selection model. */ protected void updateSelectedPathsFromSelectedRows () { if (!updatingListSelectionModel) { updatingListSelectionModel = true; try { // This is way expensive, ListSelectionModel needs an // enumerator for iterating. int min = listSelectionModel.getMinSelectionIndex(); int max = listSelectionModel.getMaxSelectionIndex(); clearSelection(); if ((min != -1) && (max != -1)) { for (int counter = min; counter <= max; counter++) { if (listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = tree.getPathForRow(counter); if (selPath != null) { addSelectionPath(selPath); } } } } } finally { updatingListSelectionModel = false; } } }
/** * If <code>updatingListSelectionModel</code> is false, this will * reset the selected paths from the selected rows in the list selection * model. */ protected void updateSelectedPathsFromSelectedRows() { if (!updatingListSelectionModel) { updatingListSelectionModel = true; try { // This is way expensive, ListSelectionModel needs an // enumerator for iterating. int min = listSelectionModel.getMinSelectionIndex(); int max = listSelectionModel.getMaxSelectionIndex(); clearSelection(); if ((min != -1) && (max != -1)) { for (int counter = min; counter <= max; counter++) { if (listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = tree.getPathForRow(counter); if (selPath != null) { addSelectionPath(selPath); } } } } } finally { updatingListSelectionModel = false; } } }
if(min != -1 && max != -1) { for(int counter = min; counter <= max; counter++) { if(listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = tree.getPathForRow (counter);
if(min != -1 && max != -1) { for(int counter = min; counter <= max; counter++) { if(listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = tree.getPathForRow (counter);
if(min != -1 && max != -1) { for(int counter = min; counter <= max; counter++) { if(listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = tree.getPathForRow (counter);
if(min != -1 && max != -1) { for(int counter = min; counter <= max; counter++) { if(listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = tree.getPathForRow (counter);
if(min != -1 && max != -1) { for(int counter = min; counter <= max; counter++) { if(listSelectionModel.isSelectedIndex(counter)) { TreePath selPath = tree.getPathForRow (counter);