mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable table speed search for empty tables
This commit is contained in:
@@ -55,7 +55,9 @@ public class TableSpeedSearch extends SpeedSearchBase<JTable> {
|
||||
|
||||
@Override
|
||||
protected boolean isSpeedSearchEnabled() {
|
||||
return !getComponent().isEditing() && super.isSpeedSearchEnabled();
|
||||
JTable table = getComponent();
|
||||
boolean tableIsNotEmpty = table.getRowCount() != 0 && table.getColumnCount() != 0;
|
||||
return tableIsNotEmpty && !table.isEditing() && super.isSpeedSearchEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user