Class SJFormattedNumberField

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<com.vaadin.flow.component.textfield.NumberField, Double>
com.vaadin.flow.component.AbstractSinglePropertyField<com.vaadin.flow.component.textfield.NumberField, Double>
com.vaadin.flow.component.textfield.TextFieldBase<com.vaadin.flow.component.textfield.NumberField, Double>
com.vaadin.flow.component.textfield.AbstractNumberField<com.vaadin.flow.component.textfield.NumberField, Double>
com.vaadin.flow.component.textfield.NumberField
com.vaadin.swingbridge.surrogates.SJFormattedNumberField
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.textfield.NumberField>, com.vaadin.flow.component.CompositionNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<com.vaadin.flow.component.textfield.NumberField>, com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.textfield.NumberField>, com.vaadin.flow.component.HasAriaDescription, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasHelper, com.vaadin.flow.component.HasLabel, com.vaadin.flow.component.HasPlaceholder, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.HasValidation, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.textfield.NumberField, Double>, Double>, com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.textfield.NumberField, Double>, Double>, com.vaadin.flow.component.InputNotifier, com.vaadin.flow.component.KeyNotifier, com.vaadin.flow.component.shared.HasAllowedCharPattern, com.vaadin.flow.component.shared.HasClearButton, com.vaadin.flow.component.shared.HasPrefix, com.vaadin.flow.component.shared.HasSuffix, com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.textfield.TextFieldVariant>, com.vaadin.flow.component.shared.HasTooltip, com.vaadin.flow.component.shared.HasValidationProperties, com.vaadin.flow.component.shared.InputField<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.textfield.NumberField, Double>, Double>, com.vaadin.flow.component.textfield.HasAutocapitalize, com.vaadin.flow.component.textfield.HasAutocomplete, com.vaadin.flow.component.textfield.HasAutocorrect, com.vaadin.flow.data.binder.HasValidator<Double>, com.vaadin.flow.data.value.HasValueChangeMode, ComponentMixin, ContainerMixin, EnterClaims.Claimant, JComponentMixin, Serializable

public class SJFormattedNumberField extends com.vaadin.flow.component.textfield.NumberField implements JComponentMixin, EnterClaims.Claimant
Surrogate for JFormattedTextField when the emulator's formatter is a NumberFormatter bound to Number.class / Double.class / null (D_jformattedtextfield NumberStrategy default — Double-typed). Extends Vaadin NumberField.

Mirrors SJFormattedIntegerField's shape — peer's value type here is Double rather than Integer.

See Also:
  • Field Details

  • Constructor Details

    • SJFormattedNumberField

      public SJFormattedNumberField()
    • SJFormattedNumberField

      public SJFormattedNumberField(Double initialValue)
  • Method Details

    • validate

      public void validate()
      Description copied from interface: ComponentMixin
      Deliberate no-op.
      Specified by:
      validate in interface ComponentMixin
      Overrides:
      validate in class com.vaadin.flow.component.textfield.AbstractNumberField<com.vaadin.flow.component.textfield.NumberField, Double>
    • setDoubleValue

      public void setDoubleValue(Double value)
    • getFocusLostBehavior

      public int getFocusLostBehavior()
    • setFocusLostBehavior

      public void setFocusLostBehavior(int behavior)
    • addActionListener

      public void addActionListener(ActionListener l)
    • removeActionListener

      public void removeActionListener(ActionListener l)
    • getActionListeners

      public ActionListener[] getActionListeners()
    • fireActionPerformed

      protected void fireActionPerformed()
    • setActionCommand

      public void setActionCommand(String command)
    • getColumns

      public int getColumns()
    • setColumns

      public void setColumns(int columns)
    • getHorizontalAlignment

      public int getHorizontalAlignment()
    • setHorizontalAlignment

      public void setHorizontalAlignment(int alignment)
    • getUIClassID

      public String getUIClassID()
      Description copied from interface: JComponentMixin
      Deliberate no-op — L&F key.
      Specified by:
      getUIClassID in interface JComponentMixin
    • getAccessibleContext

      public AccessibleContext getAccessibleContext()
    • claimsEnter

      public boolean claimsEnter()
      The SJFormattedTextField.claimsEnter() rule: Enter commits an edit and only an unedited field lets it through.
      Specified by:
      claimsEnter in interface EnterClaims.Claimant