Class ButtonStateStore
AbstractButtonMixin.
Scoped per R_vaadin_first: UI-functional state or state the store-less path
genuinely can't reconstruct lives here. Setters for the rest — six
state-conditional icons, border-painted / content-area-filled /
focus-painted / rollover-enabled, margin, displayedMnemonicIndex,
multiClickThreshhold — route through SHelper.onUnimplemented
and drop the value; their getters return the JDK default.
Layout fields are not stored here. The four
alignment / text-position setters and iconTextGap write CSS
inline on the host (Vaadin Button is already display: inline-flex
per Lumo) and the matching getters lossy-parse CSS back — same shape
as setBorder / getBorder per SD_border_css_lossy. R_vaadin_first explicitly
accepts the LEADING ↔ LEFT and "vertical-text-position-non-CENTER
masks horizontal-text-position" lossy round-trips; storing them just
to dodge the loss would be the "shadow cache so the setter
round-trips through its own getter" R_vaadin_first forbids.
text is not stored: setText/getText were lifted
to abstract on AbstractButtonMixin, so
each concrete surrogate routes through its parent Vaadin component's
HasText (e.g. SJButton's inherited
Button.getText() reads textNode). The R_vaadin_first lossy
setText(null) → getText() == "" round-trip is the contract
on the surrogate side; the emulator layer preserves null on its own
field shadow per R_swing_is_truth.
-
Field Summary
FieldsModifier and TypeFieldDescriptionCurrently installedAction; null when none.No Vaadin analog; drives ActionEvent payload.Listener onactionthat routes per-property mutations back to the button.booleanNo Vaadin analog; affectssetActionNAME propagation.final EventListenerListType-keyed listener lists for ActionListener / ChangeListener / ItemListener fan-out.intShortcuts is write-only; VK round-trip + install state.com.vaadin.flow.shared.RegistrationHandle to tear down the previousShortcutsinstall.Source of truth for armed/pressed/selected/enabled — drives all three fire-families.com.vaadin.flow.shared.RegistrationSingle teardown handle for the three bridge listeners (ChangeListener / ActionListener / ItemListener) the mixin installs onmodelto re-fire model events at the button level. -
Method Summary
Modifier and TypeMethodDescriptionstatic ButtonStateStoreof(com.vaadin.flow.component.Component target)
-
Field Details
-
actionCommand
No Vaadin analog; drives ActionEvent payload. -
hideActionText
public boolean hideActionTextNo Vaadin analog; affectssetActionNAME propagation. -
mnemonic
public int mnemonicShortcuts is write-only; VK round-trip + install state. -
mnemonicRegistration
public com.vaadin.flow.shared.Registration mnemonicRegistrationHandle to tear down the previousShortcutsinstall. -
action
-
actionPropertyChangeListener
Listener onactionthat routes per-property mutations back to the button. -
model
Source of truth for armed/pressed/selected/enabled — drives all three fire-families. -
modelInstall
public com.vaadin.flow.shared.Registration modelInstallSingle teardown handle for the three bridge listeners (ChangeListener / ActionListener / ItemListener) the mixin installs onmodelto re-fire model events at the button level.remove()detaches all three. Bridge listeners are internal glue, not user-supplied API — see class javadoc for why this isn't inRegistrations. -
listenerList
Type-keyed listener lists for ActionListener / ChangeListener / ItemListener fan-out.
-
-
Method Details
-
of
-