Class TemporalInputPanel<T extends Temporal>

    • Method Detail

      • inputField

        public TemporalField<T> inputField()
        Returns:
        the input field
      • calendarButton

        public Optional<JButton> calendarButton()
        Returns:
        the calendar button
      • getOptional

        public Optional<T> getOptional()
        Returns:
        the Temporal value currently being displayed, an empty Optional in case of an incomplete/unparseable date
      • getTemporal

        public T getTemporal()
        Returns:
        the Temporal value currently being displayed, null in case of an incomplete/unparseable date
      • setTemporal

        public void setTemporal​(Temporal temporal)
        Sets the date in the input field, clears the field if date is null.
        Parameters:
        temporal - the temporal value to set
      • setTransferFocusOnEnter

        public void setTransferFocusOnEnter​(boolean transferFocusOnEnter)
        Parameters:
        transferFocusOnEnter - specifies whether focus should be transferred on Enter
      • setEnabled

        public void setEnabled​(boolean enabled)
        Overrides:
        setEnabled in class JComponent
      • builder

        public static <T extends TemporalTemporalInputPanel.Builder<T> builder​(Class<T> valueClass,
                                                                                 String dateTimePattern)
        Type Parameters:
        T - the value type
        Parameters:
        valueClass - the value class
        dateTimePattern - the date time pattern
        Returns:
        a builder for a temporal component
      • builder

        public static <T extends TemporalTemporalInputPanel.Builder<T> builder​(Class<T> valueClass,
                                                                                 String dateTimePattern,
                                                                                 Value<T> linkedValue)
        Type Parameters:
        T - the value type
        Parameters:
        valueClass - the value class
        dateTimePattern - the date time pattern
        linkedValue - the value to link to the component
        Returns:
        a builder for a temporal component