@Override public Component createEditor() { ComboBox ret = new ComboBox(); ret.setNullSelectionAllowed(false); ret.setTextInputAllowed(false); return ret; }
/** * Constructs a Switcher by a given {@link Container} and colorVariant ("green" or "black", "green" is default). * @param container * @param colorVariation */ public Switcher(Container container, String colorVariation) { this.colorVariation = colorVariation; // instantiate the combobox with the container if (!(container instanceof Container.Ordered)) { container = new ContainerOrderedWrapper(container); } combobox = new ComboBox("", container); combobox.setTextInputAllowed(false); }
public void configurateComboBox(ComboBox comboBox) { if (filteringMode != null) { comboBox.setFilteringMode(filteringMode); } if (itemStyleGenerator != null) { comboBox.setItemStyleGenerator(itemStyleGenerator); } if (pageLength != null) { comboBox.setPageLength(pageLength); } if (textInputAllowed != null) { comboBox.setTextInputAllowed(textInputAllowed); } if (scrollToSelectedItem != null) { comboBox.setScrollToSelectedItem(scrollToSelectedItem); } } }
menuDelete.setTextInputAllowed(false); menuDelete.setId("a" + UUID.randomUUID().toString().replace('-', 'x')); menuDelete.setWidth("0px");