Class CmsCheckableDatePanel

  • All Implemented Interfaces:
    com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasValueChangeHandlers<java.util.SortedSet<java.util.Date>>, 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.IsRenderable, com.google.gwt.user.client.ui.IsWidget

    public class CmsCheckableDatePanel
    extends com.google.gwt.user.client.ui.Composite
    implements com.google.gwt.event.logical.shared.HasValueChangeHandlers<java.util.SortedSet<java.util.Date>>
    Special list for checkboxes with dates.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CmsCheckableDatePanel.Style
      The various style options for the checkable date panel.
      • 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
    • Field Summary

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

        DEBUG_ID_PREFIX
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDate​(java.util.Date date)
      Adds a date to the list (unchecked).
      void addDateChecked​(java.util.Date date)
      Adds a date that is already checked.
      com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler​(com.google.gwt.event.logical.shared.ValueChangeHandler<java.util.SortedSet<java.util.Date>> handler)  
      java.util.SortedSet<java.util.Date> getCheckedDates()
      Returns all checked dates.
      java.util.SortedSet<java.util.Date> getDates()
      Returns all dates in the list.
      java.util.SortedSet<java.util.Date> getDates​(java.lang.Boolean checkState)
      Returns all dates with the specified check state, if the check state is null, all dates are returned.
      java.util.SortedSet<java.util.Date> getUncheckedDates()
      Returns all dates that are not checked.
      void setDates​(java.util.SortedSet<java.util.Date> dates)
      Sets all dates in the list (unchecked).
      void setDates​(java.util.SortedSet<java.util.Date> dates, boolean checked)
      Sets all dates in the list.
      void setDatesWithCheckState​(java.util.Collection<org.opencms.util.CmsPair<java.util.Date,​java.lang.Boolean>> datesWithCheckInfo)
      Set dates with the provided check states.
      • Methods inherited from class com.google.gwt.user.client.ui.Composite

        claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, 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, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.gwt.event.shared.HasHandlers

        fireEvent
    • Constructor Detail

      • CmsCheckableDatePanel

        public CmsCheckableDatePanel​(java.lang.String dateFormat)
        Constructor for creating a one column list with check boxes.
        Parameters:
        dateFormat - The date format to use.
      • CmsCheckableDatePanel

        public CmsCheckableDatePanel​(java.lang.String dateFormat,
                                     CmsCheckableDatePanel.Style style)
        Constructor for creating a list with check boxes.
        Parameters:
        dateFormat - The date format to use.
        style - the style to use for displaying the dates.
      • CmsCheckableDatePanel

        public CmsCheckableDatePanel​(java.lang.String dateFormat,
                                     CmsCheckableDatePanel.Style style,
                                     boolean onlyLabels)
        Constructor where all options can be set.
        Parameters:
        dateFormat - The date format to use.
        style - the style to use for displaying the dates.
        onlyLabels - flag, indicating if only labels should be shown.
    • Method Detail

      • addDate

        public void addDate​(java.util.Date date)
        Adds a date to the list (unchecked).
        Parameters:
        date - the date to add.
      • addDateChecked

        public void addDateChecked​(java.util.Date date)
        Adds a date that is already checked.
        Parameters:
        date - the date to add.
      • addValueChangeHandler

        public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler​(com.google.gwt.event.logical.shared.ValueChangeHandler<java.util.SortedSet<java.util.Date>> handler)
        Specified by:
        addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<java.util.SortedSet<java.util.Date>>
        See Also:
        HasValueChangeHandlers.addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler)
      • getCheckedDates

        public java.util.SortedSet<java.util.Date> getCheckedDates()
        Returns all checked dates.
        Returns:
        all checked dates.
      • getDates

        public java.util.SortedSet<java.util.Date> getDates()
        Returns all dates in the list.
        Returns:
        all dates in the list.
      • getDates

        public java.util.SortedSet<java.util.Date> getDates​(java.lang.Boolean checkState)
        Returns all dates with the specified check state, if the check state is null, all dates are returned.
        Parameters:
        checkState - the check state, the returned dates should have.
        Returns:
        all dates with the specified check state, if the check state is null, all dates are returned.
      • getUncheckedDates

        public java.util.SortedSet<java.util.Date> getUncheckedDates()
        Returns all dates that are not checked.
        Returns:
        all dates that are not checked.
      • setDates

        public void setDates​(java.util.SortedSet<java.util.Date> dates)
        Sets all dates in the list (unchecked).
        Parameters:
        dates - the dates to set.
      • setDates

        public void setDates​(java.util.SortedSet<java.util.Date> dates,
                             boolean checked)
        Sets all dates in the list.
        Parameters:
        dates - the dates to set
        checked - flag, indicating if all should be checked or unchecked.
      • setDatesWithCheckState

        public void setDatesWithCheckState​(java.util.Collection<org.opencms.util.CmsPair<java.util.Date,​java.lang.Boolean>> datesWithCheckInfo)
        Set dates with the provided check states.
        Parameters:
        datesWithCheckInfo - the dates to set, accompanied with the check state to set.