void (FilterEditor editor) { AutoChoices autoChoices = editor.getAutoChoices(); if (autoChoices == AutoChoices.DISABLED) { editor.setChoices(editor.getCustomChoices()); } else { TableModel model = handler.getTable().getModel(); Class<?> c = model.getColumnClass(editor.getModelIndex()); boolean asEnum = c.equals(Boolean.class) || c.isEnum(); if (asEnum && (autoChoices != AutoChoices.ENUMS)) { editor.setAutoChoices(AutoChoices.ENUMS); } else if (!asEnum && (autoChoices == AutoChoices.ENUMS)) { editor.setAutoChoices(AutoChoices.DISABLED); } else if (asEnum) { Set choices = editor.getCustomChoices(); if (c.equals(Boolean.class)) { choices.add(true); choices.add(false); } else { Collections.addAll(choices, c.getEnumConstants()); } editor.setChoices(choices); } else { setChoicesFromModel(editor, model); } } }