use of org.linkki.core.ui.components.LinkkiComboBox in project linkki by linkki-framework.
the class UIComboBoxIntegrationTest method testCaptionProvider.
@Test
public void testCaptionProvider() {
LinkkiComboBox comboBox = getDynamicComponent();
assertThat((ToStringCaptionProvider) comboBox.getItemCaptionProvider(), isA(ToStringCaptionProvider.class));
}
use of org.linkki.core.ui.components.LinkkiComboBox in project linkki by linkki-framework.
the class UIYesNoComboBoxIntegrationTest method testNullInputIfRequired.
@Test
@Override
public void testNullInputIfRequired() {
LinkkiComboBox comboBox = getDynamicComponent();
getDefaultPmo().setRequired(true);
updateUi();
assertThat(comboBox.isRequired(), is(true));
comboBox.setValue(true);
assertThat(getDefaultModelObject().getValue(), is(true));
comboBox.setValue(null);
assertThat(getDefaultModelObject().getValue(), is(nullValue()));
}
use of org.linkki.core.ui.components.LinkkiComboBox in project linkki by linkki-framework.
the class ComponentFactory method newComboBox.
public static LinkkiComboBox newComboBox() {
LinkkiComboBox linkkiComboBox = new LinkkiComboBox();
linkkiComboBox.setFilteringMode(FilteringMode.CONTAINS);
return linkkiComboBox;
}
use of org.linkki.core.ui.components.LinkkiComboBox in project linkki by linkki-framework.
the class ComboboxBindingDefinition method newComponent.
@Override
public Component newComponent() {
LinkkiComboBox comboBox = ComponentFactory.newComboBox();
comboBox.setItemCaptionProvider(getItemCaptionProvider());
comboBox.setNullSelectionAllowed(false);
comboBox.setWidth(uiComboField.width());
return comboBox;
}
use of org.linkki.core.ui.components.LinkkiComboBox in project linkki by linkki-framework.
the class UIYesNoComboBoxIntegrationTest method testValue.
@Test
public void testValue() {
LinkkiComboBox comboBox = getDynamicComponent();
assertThat(comboBox.getValue(), is(nullValue()));
getDefaultModelObject().setValue(true);
updateUi();
assertThat(comboBox.getValue(), is(true));
comboBox.setValue(false);
assertThat(getDefaultModelObject().getValue(), is(false));
}
Aggregations