com.vaadin.client.ui.

Class VAbstractCalendarPanel<R extends Enum<R>>

  • java.lang.Object
    • com.google.gwt.user.client.ui.UIObject
      • com.google.gwt.user.client.ui.Widget
        • com.google.gwt.user.client.ui.Panel
  • Type Parameters:

    R - the resolution type which this field is based on (day, month, ...)

    All Implemented Interfaces:

    com.google.gwt.event.dom.client.BlurHandler, com.google.gwt.event.dom.client.FocusHandler, com.google.gwt.event.dom.client.HasAllDragAndDropHandlers, com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.event.dom.client.HasDoubleClickHandlers, com.google.gwt.event.dom.client.HasDragEndHandlers, com.google.gwt.event.dom.client.HasDragEnterHandlers, com.google.gwt.event.dom.client.HasDragHandlers, com.google.gwt.event.dom.client.HasDragLeaveHandlers, com.google.gwt.event.dom.client.HasDragOverHandlers, com.google.gwt.event.dom.client.HasDragStartHandlers, com.google.gwt.event.dom.client.HasDropHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.dom.client.HasKeyDownHandlers, com.google.gwt.event.dom.client.HasKeyPressHandlers, com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.MouseOutHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.SourcesTableEvents, Focusable, SubPartAware, Iterable<com.google.gwt.user.client.ui.Widget>

    Direct Known Subclasses:

    VDateCalendarPanel, VDateTimeCalendarPanel

    public abstract class VAbstractCalendarPanel<R extends Enum<R>>
    extends FocusableFlexTable
    implements com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.dom.client.MouseOutHandler, com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.dom.client.BlurHandler, com.google.gwt.event.dom.client.FocusHandler, SubPartAware

    Abstract calendar panel to show and select a date using a resolution. The class is parameterized by the date resolution enumeration type.

    Since:

    8.0

    Author:

    Vaadin Ltd

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class Description
      static interface  VAbstractCalendarPanel.FocusChangeListener

      FocusChangeListener is notified when the panel changes its focused value.

      class  VAbstractCalendarPanel.FocusedDate

      Helper class to inform the screen reader that the user changed the selected date.

      static interface  VAbstractCalendarPanel.FocusOutListener

      Blur listener that listens to blur event from the panel.

      static interface  VAbstractCalendarPanel.SubmitListener

      Interface for updating date field value based on the current calendar panel data or canceling the update.

      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.FlexTable

        com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter
      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.HTMLTable

        com.google.gwt.user.client.ui.HTMLTable.Cell, com.google.gwt.user.client.ui.HTMLTable.CellFormatter, com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter, com.google.gwt.user.client.ui.HTMLTable.RowFormatter
      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
      • Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets

        com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
    • Field Summary

      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors
      Constructor Description
      VAbstractCalendarPanel()

      Constructs a calendar panel widget for displaying and selecting a date.

    • Method Summary

      All Methods
      Modifier and Type Method Description
      protected abstract boolean acceptDayFocus()

      Returns true if current resolution assumes handling focus event for day UI component.

      protected boolean contains​(com.google.gwt.user.client.ui.Widget w, com.google.gwt.dom.client.Element subElement)

      Checks if subElement is inside the widget DOM hierarchy.

      protected void doRenderCalendar​(boolean updateDate)

      Performs the rendering required by the renderCalendar(boolean).

      protected void doSetDate​(Date currentDate, boolean needRerender, Runnable focusAction)

      The actual implementation of the logic which sets the data of the Panel.

      protected int getBackwardKey()

      The key that selects the previous day in the calendar.

      protected int getCloseKey()

      Returns the key that closes the popup window if this is a VPopopCalendar.

      Date getDate()

      Returns the current date value.

      protected VDateField<R> getDateField()

      Returns the date field which this panel is attached to.

      protected DateTimeService getDateTimeService()

      Returns date time service for the widget.

      protected int getForwardKey()

      The key that selects the next day in the calendar.

      protected int getNextKey()

      The key that selects the next week in the calendar.

      protected int getPreviousKey()

      The key that selects the previous week in the calendar.

      protected int getResetKey()

      Returns the reset key which will reset the calendar to the previous selection.

      R getResolution()

      Returns the current date resolution.

      protected R getResolution​(Predicate<R> filter)

      Finds the resolution by the filter.

      protected Stream<R> getResolutions()

      Returns all available resolutions for the widget.

      protected int getSelectKey()

      Returns the select key which selects the value.

      VAbstractCalendarPanel.SubmitListener getSubmitListener()

      Returns the submit listener that listens to selection made from the panel.

      com.google.gwt.user.client.Element getSubPartElement​(String subPart)

      Locates an element inside a component using the identifier provided in subPart.

      String getSubPartName​(com.google.gwt.user.client.Element subElement)

      Provides an identifier that identifies the element within the component.

      protected boolean handleNavigation​(int keycode, boolean ctrl, boolean shift)

      Handles the keyboard navigation.

      protected boolean handleNavigationDayMode​(int keycode, boolean ctrl, boolean shift)

      Handle keyboard navigation what the resolution is set to DAY.

      protected boolean handleNavigationMonthMode​(int keycode, boolean ctrl, boolean shift)

      Handle the keyboard navigation when the resolution is set to MONTH.

      protected boolean handleNavigationYearMode​(int keycode, boolean ctrl, boolean shift)

      Handles the keyboard navigation when the resolution is set to years.

      protected abstract boolean isBelowMonth​(R resolution)

      Returns true if the resolution representation is strictly below month (day, hour, etc..).

      protected abstract boolean isDay​(R resolution)

      Returns true if the provided resolution represents a day.

      protected boolean isEnabled()

      Checks whether the widget is enabled.

      boolean isInitialRenderDone()

      Returns the value of initialRenderDone.

      protected abstract boolean isMonth​(R resolution)

      Returns true if the provided resolution represents a month.

      protected boolean isReadonly()

      Checks whether the widget is not editable (read-only).

      boolean isShowISOWeekNumbers()

      Returns whether ISO 8601 week numbers should be shown in the value selector or not.

      protected boolean isYear​(R resolution)

      Returns true if the provided resolution represents an year.

      void onBlur​(com.google.gwt.event.dom.client.BlurEvent event)  
      protected void onDetach()  
      void onFocus​(com.google.gwt.event.dom.client.FocusEvent event)  
      void onKeyDown​(com.google.gwt.event.dom.client.KeyDownEvent event)  
      void onKeyPress​(com.google.gwt.event.dom.client.KeyPressEvent event)  
      void onMouseDown​(com.google.gwt.event.dom.client.MouseDownEvent event)  
      void onMouseOut​(com.google.gwt.event.dom.client.MouseOutEvent event)  
      void onMouseUp​(com.google.gwt.event.dom.client.MouseUpEvent event)  
      protected boolean onTabOut​(com.google.gwt.event.dom.client.DomEvent<?> event)

      True should be returned if the panel will not be used after this event.

      protected boolean onValueChange()

      Deprecated.

      This method is not used by the framework code anymore.

      void renderCalendar()

      Updates the calendar and text field with the selected dates.

      void renderCalendar​(boolean updateDate)

      For internal use only.

      void setAssistiveLabelNextMonth​(String label)

      Set assistive label for the next month element.

      void setAssistiveLabelNextYear​(String label)

      Set assistive label for the next year element.

      void setAssistiveLabelPreviousMonth​(String label)

      Set assistive label for the previous month element.

      void setAssistiveLabelPreviousYear​(String label)

      Set assistive label for the previous year element.

      void setDate​(Date currentDate)

      Sets the data of the Panel.

      void setDateStyles​(Map<String,​String> dateStyles)

      Sets the style names for dates.

      void setDateTimeService​(DateTimeService dateTimeService)

      Sets date time service for the widget.

      void setFocusChangeListener​(VAbstractCalendarPanel.FocusChangeListener listener)

      The given FocusChangeListener is notified when the focused date changes by user either clicking on a new date or by using the keyboard.

      void setFocusOutListener​(VAbstractCalendarPanel.FocusOutListener listener)

      A focus out listener is triggered when the panel loosed focus.

      void setParentField​(VDateField<R> parent)

      Sets the parent date field widget.

      void setRangeEnd​(String newRangeEnd)

      Sets the end range for this component.

      void setRangeStart​(String newRangeStart)

      Sets the start range for this component.

      void setResolution​(R resolution)

      Sets the current date resolution.

      void setShowISOWeekNumbers​(boolean showISOWeekNumbers)

      Sets whether ISO 8601 week numbers should be shown in the value selector or not.

      void setStyleName​(String style)  
      void setStylePrimaryName​(String style)  
      void setSubmitListener​(VAbstractCalendarPanel.SubmitListener submitListener)

      The submit listener is called when the user selects a value from the calendar either by clicking the day or selects it by keyboard.

      void updateAssistiveLabels()

      Updates assistive labels of the navigation elements.

      • Methods inherited from class com.google.gwt.user.client.ui.FlexTable

        addCell, getCellCount, getFlexCellFormatter, getRowCount, insertCell, insertRow, prepareCell, prepareRow, removeAllRows, removeCell, removeCells, removeRow
      • Methods inherited from class com.google.gwt.user.client.ui.HTMLTable

        addClickHandler, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addTableListener, checkCellBounds, checkRowBounds, clear, clear, clearCell, createCell, getBodyElement, getCellForEvent, getCellFormatter, getCellPadding, getCellSpacing, getColumnFormatter, getDOMCellCount, getDOMCellCount, getDOMCellCount, getDOMRowCount, getDOMRowCount, getDOMRowCount, getEventTargetCell, getHTML, getRowFormatter, getText, getWidget, insertCells, internalClearCell, internalClearCell, isCellPresent, iterator, onEnsureDebugId, prepareColumn, remove, removeTableListener, setBorderWidth, setCellFormatter, setCellPadding, setCellSpacing, setColumnFormatter, setHTML, setHTML, setRowFormatter, setText, setWidget, setWidget
      • Methods inherited from class com.google.gwt.user.client.ui.Panel

        add, add, adopt, doAttachChildren, doDetachChildren, orphan, remove
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class com.google.gwt.user.client.ui.UIObject

        addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
      • Methods inherited from interface com.google.gwt.event.shared.HasHandlers

        fireEvent
    • Constructor Detail

      • VAbstractCalendarPanel

        public VAbstractCalendarPanel()

        Constructs a calendar panel widget for displaying and selecting a date.

    • Method Detail

      • setParentField

        public void setParentField​(VDateField<R> parent)

        Sets the parent date field widget.

        Parameters:

        parent - the parent widget

      • acceptDayFocus

        protected abstract boolean acceptDayFocus()

        Returns true if current resolution assumes handling focus event for day UI component.

        Returns:

        true if day focus events should be handled, false otherwise

      • isDay

        protected abstract boolean isDay​(R resolution)

        Returns true if the provided resolution represents a day.

        Parameters:

        resolution - the given resolution

        Returns:

        true if the resolution represents a day

      • isMonth

        protected abstract boolean isMonth​(R resolution)

        Returns true if the provided resolution represents a month.

        Parameters:

        resolution - the given resolution

        Returns:

        true if the resolution represents a month

      • isYear

        protected boolean isYear​(R resolution)

        Returns true if the provided resolution represents an year.

        Parameters:

        resolution - the given resolution

        Returns:

        true if the resolution represents a year

      • isBelowMonth

        protected abstract boolean isBelowMonth​(R resolution)

        Returns true if the resolution representation is strictly below month (day, hour, etc..).

        Parameters:

        resolution - the given resolution

        Returns:

        whether the resolution is below the month resolution

      • getResolutions

        protected Stream<R> getResolutions()

        Returns all available resolutions for the widget.

        Returns:

        all available resolutions

      • getResolution

        protected R getResolution​(Predicate<R> filter)

        Finds the resolution by the filter.

        Parameters:

        filter - predicate to filter resolutions

        Returns:

        the resolution accepted by the filter

      • onValueChange

        @Deprecated
        protected boolean onValueChange()
        Deprecated.
        This method is not used by the framework code anymore.

        Returns:

        false

      • getResolution

        public R getResolution()

        Returns the current date resolution.

        Returns:

        the resolution

      • setResolution

        public void setResolution​(R resolution)

        Sets the current date resolution.

        Parameters:

        resolution - the new resolution

      • isReadonly

        protected boolean isReadonly()

        Checks whether the widget is not editable (read-only).

        Returns:

        true if the widget is read-only

      • isEnabled

        protected boolean isEnabled()

        Checks whether the widget is enabled.

        Returns:

        true is the widget is enabled

      • setStyleName

        public void setStyleName​(String style)

        Overrides:

        setStyleName in class com.google.gwt.user.client.ui.UIObject

      • setStylePrimaryName

        public void setStylePrimaryName​(String style)

        Overrides:

        setStylePrimaryName in class com.google.gwt.user.client.ui.UIObject

      • setDateStyles

        public void setDateStyles​(Map<String,​String> dateStyles)

        Sets the style names for dates.

        Parameters:

        dateStyles - the map of date string to style name

        Since:

        8.3

      • getDateField

        protected VDateField<R> getDateField()

        Returns the date field which this panel is attached to.

        Returns:

        the "parent" date field

      • setDateTimeService

        public void setDateTimeService​(DateTimeService dateTimeService)

        Sets date time service for the widget.

        Parameters:

        dateTimeService - date time service

      • isShowISOWeekNumbers

        public boolean isShowISOWeekNumbers()

        Returns whether ISO 8601 week numbers should be shown in the value selector or not. ISO 8601 defines that a week always starts with a Monday so the week numbers are only shown if this is the case.

        Returns:

        true if week number should be shown, false otherwise

      • setShowISOWeekNumbers

        public void setShowISOWeekNumbers​(boolean showISOWeekNumbers)

        Sets whether ISO 8601 week numbers should be shown in the value selector or not. ISO 8601 defines that a week always starts with a Monday so the week numbers are only shown if this is the case.

        Parameters:

        showISOWeekNumbers - true if week number should be shown, false otherwise

      • renderCalendar

        public void renderCalendar()

        Updates the calendar and text field with the selected dates.

      • isInitialRenderDone

        public boolean isInitialRenderDone()

        Returns the value of initialRenderDone.

        Returns:

        true if the initial render has been marked as done, false otherwise

        Since:

        8.7

      • renderCalendar

        public void renderCalendar​(boolean updateDate)

        For internal use only. May be removed or replaced in the future. Updates the calendar and text field with the selected dates.

        Parameters:

        updateDate - The value false prevents setting the selected date of the calendar based on focusedDate. That can be used when only the resolution of the calendar is changed and no date has been selected.

      • doRenderCalendar

        protected void doRenderCalendar​(boolean updateDate)

        Performs the rendering required by the renderCalendar(boolean). Subclasses may override this method to provide a custom implementation avoiding renderCalendar(boolean) override. The latter method contains a common logic which should not be overridden.

        Parameters:

        updateDate - The value false prevents setting the selected date of the calendar based on focusedDate. That can be used when only the resolution of the calendar is changed and no date has been selected.

      • onKeyDown

        public void onKeyDown​(com.google.gwt.event.dom.client.KeyDownEvent event)

        Specified by:

        onKeyDown in interface com.google.gwt.event.dom.client.KeyDownHandler

      • onKeyPress

        public void onKeyPress​(com.google.gwt.event.dom.client.KeyPressEvent event)

        Specified by:

        onKeyPress in interface com.google.gwt.event.dom.client.KeyPressHandler

      • handleNavigationYearMode

        protected boolean handleNavigationYearMode​(int keycode,
                                                   boolean ctrl,
                                                   boolean shift)

        Handles the keyboard navigation when the resolution is set to years.

        Parameters:

        keycode - The keycode to process

        ctrl - Is ctrl pressed?

        shift - is shift pressed

        Returns:

        Returns true if the keycode was processed, else false

      • handleNavigationMonthMode

        protected boolean handleNavigationMonthMode​(int keycode,
                                                    boolean ctrl,
                                                    boolean shift)

        Handle the keyboard navigation when the resolution is set to MONTH.

        Parameters:

        keycode - The keycode to handle

        ctrl - Was the ctrl key pressed?

        shift - Was the shift key pressed?

        Returns:

        true if the navigation was handled successfully, false otherwise

      • handleNavigationDayMode

        protected boolean handleNavigationDayMode​(int keycode,
                                                  boolean ctrl,
                                                  boolean shift)

        Handle keyboard navigation what the resolution is set to DAY.

        Parameters:

        keycode - The keycode to handle

        ctrl - Was the ctrl key pressed?

        shift - Was the shift key pressed?

        Returns:

        Return true if the key press was handled by the method, else return false.

      • handleNavigation

        protected boolean handleNavigation​(int keycode,
                                           boolean ctrl,
                                           boolean shift)

        Handles the keyboard navigation.

        Parameters:

        keycode - The key code that was pressed

        ctrl - Was the ctrl key pressed

        shift - Was the shift key pressed

        Returns:

        Return true if key press was handled by the component, else return false

      • getResetKey

        protected int getResetKey()

        Returns the reset key which will reset the calendar to the previous selection. By default this is backspace but it can be overridden to change the key to whatever you want.

        Returns:

        the reset key

      • getSelectKey

        protected int getSelectKey()

        Returns the select key which selects the value. By default this is the enter key but it can be changed to whatever you like by overriding this method.

        Returns:

        the select key

      • getCloseKey

        protected int getCloseKey()

        Returns the key that closes the popup window if this is a VPopopCalendar. Else this does nothing. By default this is the Escape key but you can change the key to whatever you want by overriding this method.

        Returns:

        the closing key

      • getForwardKey

        protected int getForwardKey()

        The key that selects the next day in the calendar. By default this is the right arrow key but by overriding this method it can be changed to whatever you like.

        Returns:

        the forward key

      • getBackwardKey

        protected int getBackwardKey()

        The key that selects the previous day in the calendar. By default this is the left arrow key but by overriding this method it can be changed to whatever you like.

        Returns:

        the backward key

      • getNextKey

        protected int getNextKey()

        The key that selects the next week in the calendar. By default this is the down arrow key but by overriding this method it can be changed to whatever you like.

        Returns:

        the next week key

      • getPreviousKey

        protected int getPreviousKey()

        The key that selects the previous week in the calendar. By default this is the up arrow key but by overriding this method it can be changed to whatever you like.

        Returns:

        the previous week key

      • onMouseOut

        public void onMouseOut​(com.google.gwt.event.dom.client.MouseOutEvent event)

        Specified by:

        onMouseOut in interface com.google.gwt.event.dom.client.MouseOutHandler

      • onMouseDown

        public void onMouseDown​(com.google.gwt.event.dom.client.MouseDownEvent event)

        Specified by:

        onMouseDown in interface com.google.gwt.event.dom.client.MouseDownHandler

      • onMouseUp

        public void onMouseUp​(com.google.gwt.event.dom.client.MouseUpEvent event)

        Specified by:

        onMouseUp in interface com.google.gwt.event.dom.client.MouseUpHandler

      • setDate

        public void setDate​(Date currentDate)

        Sets the data of the Panel.

        Parameters:

        currentDate - The date to set

      • doSetDate

        protected void doSetDate​(Date currentDate,
                                 boolean needRerender,
                                 Runnable focusAction)

        The actual implementation of the logic which sets the data of the Panel. The method setDate(Date) just delegate a call to this method providing additional config parameters.

        Parameters:

        currentDate - currentDate The date to set

        needRerender - if true then calendar will be rerendered regardless of internal logic, otherwise the decision will be made on the internal state inside the method

        focusAction - an additional action which will be executed in case rerendering is not required

      • getDate

        public Date getDate()

        Returns the current date value.

        Returns:

        current date value

      • onTabOut

        protected boolean onTabOut​(com.google.gwt.event.dom.client.DomEvent<?> event)

        True should be returned if the panel will not be used after this event.

        Parameters:

        event - dom event

        Returns:

        true if the panel will not be used after this event, false otherwise

      • setFocusOutListener

        public void setFocusOutListener​(VAbstractCalendarPanel.FocusOutListener listener)

        A focus out listener is triggered when the panel loosed focus. This can happen either after a user clicks outside the panel or tabs out.

        Parameters:

        listener - The listener to trigger

      • setSubmitListener

        public void setSubmitListener​(VAbstractCalendarPanel.SubmitListener submitListener)

        The submit listener is called when the user selects a value from the calendar either by clicking the day or selects it by keyboard.

        Parameters:

        submitListener - The listener to trigger

      • setFocusChangeListener

        public void setFocusChangeListener​(VAbstractCalendarPanel.FocusChangeListener listener)

        The given FocusChangeListener is notified when the focused date changes by user either clicking on a new date or by using the keyboard.

        Parameters:

        listener - The FocusChangeListener to be notified

      • getSubmitListener

        public VAbstractCalendarPanel.SubmitListener getSubmitListener()

        Returns the submit listener that listens to selection made from the panel.

        Returns:

        The listener or NULL if no listener has been set

      • onBlur

        public void onBlur​(com.google.gwt.event.dom.client.BlurEvent event)

        Specified by:

        onBlur in interface com.google.gwt.event.dom.client.BlurHandler

      • onFocus

        public void onFocus​(com.google.gwt.event.dom.client.FocusEvent event)

        Specified by:

        onFocus in interface com.google.gwt.event.dom.client.FocusHandler

      • getSubPartName

        public String getSubPartName​(com.google.gwt.user.client.Element subElement)

        Description copied from interface: SubPartAware

        Provides an identifier that identifies the element within the component. The subElement is a part of the component and must never be null.

        Note! getSubPartElement(getSubPartName(element)) == element is not always true. A component can choose to provide a more generic identifier for any given element if the results of all interactions with subElement are the same as interactions with the element identified by the return value. For example a button can return an identifier for the root element even though a DIV inside the button was passed as subElement because interactions with the DIV and the root button element produce the same result.

        Specified by:

        getSubPartName in interface SubPartAware

        Parameters:

        subElement - The element the identifier string should uniquely identify

        Returns:

        An identifier that uniquely identifies subElement or null if no identifier could be provided.

      • contains

        protected boolean contains​(com.google.gwt.user.client.ui.Widget w,
                                   com.google.gwt.dom.client.Element subElement)

        Checks if subElement is inside the widget DOM hierarchy.

        Parameters:

        w - the widget to investigate

        subElement - the element to search for

        Returns:

        true if the given widget is a parent of the given element, false otherwise.

      • getSubPartElement

        public com.google.gwt.user.client.Element getSubPartElement​(String subPart)

        Description copied from interface: SubPartAware

        Locates an element inside a component using the identifier provided in subPart. The subPart identifier is component specific and may be any string of characters, numbers, space characters and brackets.

        Specified by:

        getSubPartElement in interface SubPartAware

        Parameters:

        subPart - The identifier for the element inside the component

        Returns:

        The element identified by subPart or null if the element could not be found.

      • onDetach

        protected void onDetach()

        Overrides:

        onDetach in class com.google.gwt.user.client.ui.Widget

      • setRangeStart

        public void setRangeStart​(String newRangeStart)

        Sets the start range for this component. The start range is inclusive, and it depends on the current resolution, what is considered inside the range.

        Parameters:

        newRangeStart - - the allowed range's start date

      • setRangeEnd

        public void setRangeEnd​(String newRangeEnd)

        Sets the end range for this component. The end range is inclusive, and it depends on the current resolution, what is considered inside the range.

        Parameters:

        newRangeEnd - - the allowed range's end date

      • setAssistiveLabelPreviousYear

        public void setAssistiveLabelPreviousYear​(String label)

        Set assistive label for the previous year element.

        Parameters:

        label - the label to set

        Since:

        8.4

      • setAssistiveLabelNextYear

        public void setAssistiveLabelNextYear​(String label)

        Set assistive label for the next year element.

        Parameters:

        label - the label to set

        Since:

        8.4

      • setAssistiveLabelPreviousMonth

        public void setAssistiveLabelPreviousMonth​(String label)

        Set assistive label for the previous month element.

        Parameters:

        label - the label to set

        Since:

        8.4

      • setAssistiveLabelNextMonth

        public void setAssistiveLabelNextMonth​(String label)

        Set assistive label for the next month element.

        Parameters:

        label - the label to set

        Since:

        8.4

      • updateAssistiveLabels

        public void updateAssistiveLabels()

        Updates assistive labels of the navigation elements.

        Since:

        8.4