public class CategoricalComboBoxDataProvider implements IComboBoxDataProvider {
private CharacterMatrix matrix;
- private int maxVisibleItems;
public CategoricalComboBoxDataProvider(CharacterMatrix matrix) {
super();
public List<?> getValues(int columnIndex, int rowIndex) {
Feature feature = matrix.getIndexToCharacterMap().get(columnIndex);
List<State> supportedStatesForCategoricalFeature = matrix.getSupportedStatesForCategoricalFeature(feature);
- maxVisibleItems = Math.max(3, Math.min(supportedStatesForCategoricalFeature.size()-1, 10));
return supportedStatesForCategoricalFeature;
}
- int getMaxVisibleItems(){
- return maxVisibleItems;
- }
}