Class JSpinner

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class JSpinner extends JComponent implements Accessible
Emulator for JSpinner, rendered by SJSpinner, which carries the per-model inner-field dispatch (Integer / Long / Double / Date / List + unknown-model fallback) and the browser → model sync (SD_sjspinner).

The value lives in the SpinnerModel, which the emulator and the surrogate share. Every getter reads the model, as the JDK's does, and never the peer, so it works on any thread without a hop; the surrogate renders the model from its own model listener. The emulator's ChangeListener subscribes to the model directly, as the JDK's ModelListener does, so a worker setting the value hears its ChangeEvent on the worker, with this spinner as the source. R_leaf_peer_lockdown-locked-down (JDK leaf — private peer ctor).

Editor surface (D_jspinner_editor): JSpinner.DefaultEditor / DateEditor / NumberEditor / ListEditor port as nested classes so setEditor(new JSpinner.DateEditor(spinner, "yyyy-MM-dd")) compiles and renders. Only DateEditor's pattern is plumbed through to the Vaadin DatePicker (via SJSpinner.setDatePattern); the other families drop-and-WARN at setEditor (R_match_swing_errors sub-bucket (c) — Vaadin's IntegerField / NumberField don't accept DecimalFormat patterns, and ListEditor is already covered by SJSpinner's Select dispatch). The editor's synthetic off-DOM JFormattedTextField exists so editor.getTextField() doesn't NPE.

See Also: