use of org.rstudio.core.client.widget.events.SelectionChangedEvent in project rstudio by rstudio.
the class FastSelectTable method setSelected.
public void setSelected(TableRowElement row, boolean selected) {
try {
if (row.getParentElement().getParentElement() != table_)
return;
} catch (NullPointerException npe) {
return;
}
boolean isCurrentlySelected = isSelected(row);
if (isCurrentlySelected == selected)
return;
if (selected && !codec_.isValueRow(row))
return;
setStyleName(row, selectedClassName_, selected);
if (selected)
selectedRows_.add(row);
else
selectedRows_.remove(row);
if (selected && !allowMultiSelect_) {
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
public void execute() {
fireEvent(new SelectionChangedEvent());
}
});
}
}
Aggregations