Class DateRangePickerOverlay<D extends DateRange>

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
software.xdev.vaadin.daterange_picker.ui.DateRangePickerOverlay<D>
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasOrderedComponents, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.orderedlayout.FlexComponent, com.vaadin.flow.data.binder.HasItems<D>, Serializable

@CssImport("./styles/dateRangePicker.css") public class DateRangePickerOverlay<D extends DateRange> extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout> implements com.vaadin.flow.data.binder.HasItems<D>, com.vaadin.flow.component.orderedlayout.FlexComponent
Overlay of the expanded DateRangePicker
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
     

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.orderedlayout.FlexComponent

    com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment, com.vaadin.flow.component.orderedlayout.FlexComponent.JustifyContentMode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final com.vaadin.flow.component.button.Button
     
    protected final com.vaadin.flow.component.button.Button
     
    protected com.vaadin.flow.component.combobox.ComboBox<D>
     
    protected DateRangeModel<D>
     
    protected DateRangePicker<D>
     
    protected com.vaadin.flow.component.datepicker.DatePicker
     
    protected com.vaadin.flow.component.datepicker.DatePicker
     
    protected boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.shared.Registration
    addValueChangeListener(com.vaadin.flow.component.ComponentEventListener<DateRangePickerOverlay<D>.DateRangeOverlayValueChangeEvent> listener)
     
    protected void
     
    protected void
    fireValueChanged(DateRangeModel<D> oldValue, boolean isFromClient)
     
    com.vaadin.flow.component.combobox.ComboBox<D>
     
    com.vaadin.flow.component.datepicker.DatePicker
     
    com.vaadin.flow.component.datepicker.DatePicker
     
     
    protected DateRangeModel<D>
     
    protected void
    initDatePicker(com.vaadin.flow.component.datepicker.DatePicker dp)
     
    protected void
     
    boolean
     
    protected void
    moveRange(int dif)
     
    protected void
    onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
     
    protected void
    onComboBoxDateRangeValueChanged(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<D>,D> ev)
     
    protected void
    onDatePickerValueChanged(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.datepicker.DatePicker,LocalDate> ev)
     
    protected void
     
    protected void
     
    protected void
     
    void
     
    void
     
    void
    setReadOnly(boolean readOnly)
     
    protected void
    setTextFieldDefaultWidthFlexConform(com.vaadin.flow.component.HasStyle component)
     
    protected void
     

    Methods inherited from class com.vaadin.flow.component.Composite

    getChildren, getContent, getElement, initContent

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.orderedlayout.FlexComponent

    expand, getAlignItems, getAlignSelf, getFlexGrow, getFlexShrink, getJustifyContentMode, replace, setAlignItems, setAlignSelf, setFlexGrow, setFlexShrink, setJustifyContentMode

    Methods inherited from interface com.vaadin.flow.component.HasComponents

    add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.data.binder.HasItems

    setItems, setItems

    Methods inherited from interface com.vaadin.flow.component.HasOrderedComponents

    getChildren, getComponentAt, getComponentCount, indexOf

    Methods inherited from interface com.vaadin.flow.component.HasSize

    getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Field Details

    • readOnly

      protected boolean readOnly
    • dateRangePicker

      protected DateRangePicker<D extends DateRange> dateRangePicker
    • currentModel

      protected DateRangeModel<D extends DateRange> currentModel
    • btnBackwardRange

      protected final com.vaadin.flow.component.button.Button btnBackwardRange
    • cbDateRange

      protected com.vaadin.flow.component.combobox.ComboBox<D extends DateRange> cbDateRange
    • btnForwardRange

      protected final com.vaadin.flow.component.button.Button btnForwardRange
    • dpStart

      protected com.vaadin.flow.component.datepicker.DatePicker dpStart
    • dpEnd

      protected com.vaadin.flow.component.datepicker.DatePicker dpEnd
  • Constructor Details

    • DateRangePickerOverlay

      public DateRangePickerOverlay(DateRangePicker<D> dateRangePicker)
  • Method Details

    • initUI

      protected void initUI()
    • initDatePicker

      protected void initDatePicker(com.vaadin.flow.component.datepicker.DatePicker dp)
    • onAttach

      protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
      Overrides:
      onAttach in class com.vaadin.flow.component.Component
    • setTextFieldDefaultWidthFlexConform

      protected void setTextFieldDefaultWidthFlexConform(com.vaadin.flow.component.HasStyle component)
    • registerListeners

      protected void registerListeners()
    • onComboBoxDateRangeValueChanged

      protected void onComboBoxDateRangeValueChanged(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<D>,D> ev)
    • onDatePickerValueChanged

      protected void onDatePickerValueChanged(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.datepicker.DatePicker,LocalDate> ev)
    • moveRange

      protected void moveRange(int dif)
    • calcModel

      protected void calcModel(Optional<DateRangeResult> optResult, DateRangeModel<D> model)
    • onValueChange

      protected void onValueChange(Function<DateRangeModel<D>,Optional<DateRangeResult>> calcFunc)
    • getModelFromComponents

      protected DateRangeModel<D> getModelFromComponents()
    • updateComponentsFromModel

      protected void updateComponentsFromModel(DateRangeModel<D> model)
    • setCurrentModel

      protected void setCurrentModel(DateRangeModel<D> model)
    • fireValueChanged

      protected void fireValueChanged(DateRangeModel<D> oldValue, boolean isFromClient)
    • setItems

      public void setItems(Collection<D> items)
      Specified by:
      setItems in interface com.vaadin.flow.data.binder.HasItems<D extends DateRange>
    • getCbDateRange

      public com.vaadin.flow.component.combobox.ComboBox<D> getCbDateRange()
    • getDpStart

      public com.vaadin.flow.component.datepicker.DatePicker getDpStart()
    • getDpEnd

      public com.vaadin.flow.component.datepicker.DatePicker getDpEnd()
    • getModel

      public DateRangeModel<D> getModel()
    • setModel

      public void setModel(DateRangeModel<D> model)
    • setReadOnly

      public void setReadOnly(boolean readOnly)
    • isReadOnly

      public boolean isReadOnly()
    • addValueChangeListener

      public com.vaadin.flow.shared.Registration addValueChangeListener(com.vaadin.flow.component.ComponentEventListener<DateRangePickerOverlay<D>.DateRangeOverlayValueChangeEvent> listener)