Class ComboBoxStateStore
java.lang.Object
com.vaadin.swingbridge.surrogates.internal.ComboBoxStateStore
State holder for
SJComboBox (SD_sjcombobox).
Scoped per R_vaadin_first: the model + its bridge listener registration + the
surrogate-level fan-out lists belong here because they have no Vaadin
counterpart we can read back. Selection state itself does not
live here — the installed ComboBoxModel.getSelectedItem() is
the source of truth (R_swing_is_truth) and Vaadin's getValue() mirrors it on
the peer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionCurrently installedAction; null when none.No Vaadin analog.PCL onactionthat propagates per-property mutations back to the surrogate.com.vaadin.flow.shared.RegistrationRegistrationfor the VaadinaddCustomValueSetListenersubscription that commits typed-but-unmatched input into the model; null when not editable.booleanEditable shadow.Cached previous selected item, used by theItemEventfan-out to deliver the JDK-canonical DESELECTED-prev + SELECTED-new pair on every selection change.final EventListenerListType-keyed listener lists forItemListener/ActionListener/PopupMenuListener/ListDataListenersurrogate-level fan-out.intmaximumRowCount— JDK default 8.Source of truth for items + selection (R_swing_is_truth).TheListDataListenerwe attach tomodelto push items into the Vaadin peer and to fan out the model'sListDataEvents to user listeners.booleanR_swing_is_truth feedback-loop guard.com.vaadin.flow.shared.RegistrationRegistrationfor the Vaadin ValueChangeListener that mirrors browser-side selection edits into the model. -
Method Summary
Modifier and TypeMethodDescriptionstatic ComboBoxStateStoreof(com.vaadin.flow.component.Component target)
-
Field Details
-
model
Source of truth for items + selection (R_swing_is_truth). Never null after ctor. -
modelListener
TheListDataListenerwe attach tomodelto push items into the Vaadin peer and to fan out the model'sListDataEvents to user listeners. Held sosetModelcan detach from the old model before attaching to the new one. -
preventPeerEvents
public boolean preventPeerEventsR_swing_is_truth feedback-loop guard. Set during model→peer pushes and during fire-side updates; checked by the peer ValueChangeListener and the customValue listener so they bail instead of re-writing the model. -
editable
public boolean editableEditable shadow. Vaadin'sComboBox.isAllowCustomValue()round-trips, but pairing the bit withcustomValueRegistrationhere keeps the swap atomic — flipping editable also tears down / installs the customValue subscription. -
customValueRegistration
public com.vaadin.flow.shared.Registration customValueRegistrationRegistrationfor the VaadinaddCustomValueSetListenersubscription that commits typed-but-unmatched input into the model; null when not editable. Recreated on everysetEditable(true)/ model swap so a stale registration can't fire against the wrong model. -
valueChangeRegistration
public com.vaadin.flow.shared.Registration valueChangeRegistrationRegistrationfor the Vaadin ValueChangeListener that mirrors browser-side selection edits into the model. One-shot install per surrogate lifetime — survives model swaps (the VaadinHasValuechannel doesn't re-source on model change, only its items do); stored so a teardown path could detach it. -
listenerList
Type-keyed listener lists forItemListener/ActionListener/PopupMenuListener/ListDataListenersurrogate-level fan-out. -
actionCommand
No Vaadin analog. JDK actionCommand drives theActionEventpayload delivered to user ActionListeners on selection commit. Defaults to"comboBoxChanged"— JDK's own constant for non-edit selection commits. -
action
-
actionPropertyChangeListener
PCL onactionthat propagates per-property mutations back to the surrogate. -
maximumRowCount
public int maximumRowCountmaximumRowCount— JDK default 8. Mirrors Vaadin'ssetPageSize; we read it back from a stored field rather than frompeer.getPageSize()since the two map cleanly. -
lastSelected
-
-
Method Details
-
of
-