Class CmsSerialDateController

  • All Implemented Interfaces:,,<java.lang.String>,,,<java.lang.String>,<java.lang.String>,,,, I_CmsEditWidget, I_StatusUpdateHandler

    public class CmsSerialDateController
    implements I_CmsEditWidget, I_StatusUpdateHandler
    Controller for the serial date widget, being the widget implementation itself.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CmsSerialDateController.PatternDefaultValues
      Data wrapper for the default values to set when changing the pattern, dependent on the event's start date.
      protected static class  CmsSerialDateController.StatusUpdateTimer
      The status update timer.
      • Nested classes/interfaces inherited from class,
    • Field Summary

      Modifier and Type Field Description
      static java.lang.String DEFAULT_DATE_FORMAT
      Default date format.
      • Fields inherited from class

    • Constructor Summary

      Constructor Description
      Category field widgets for ADE forms.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description addFocusHandler​( handler) addValueChangeHandler​(<java.lang.String> handler)  
      void conditionallyRemoveExceptionsOnChange​( action, boolean showDialog)  
      void executeShowDatesAction()
      Show the dates for managing exceptions.
      I_CmsSerialDatePatternController getPattern()
      Returns the controller for the currently active pattern.
      CmsSerialDateController.PatternDefaultValues getPatternDefaultValues()
      Returns the default values to set for the patterns dependent on the current start date.
      I_CmsSerialDatePatternView getPatternView()
      Returns the widget to place in the pattern panel.
      java.lang.String getValue()  
      boolean isActive()
      Returns if the widget is active.
      void onAttachWidget()
      This method is called when a widget is attached to the browser's document.
      boolean owns​( element)
      Returns true if the element should be logically counted as part of the widget for the purpose of determining whether a mouse click is "outside".
      void removeExceptionsOnChange​( cmd)  
      void setActive​(boolean active)
      Sets the widget active/inactive.
      void setCurrentTillEnd​(java.lang.Boolean isCurrentTillEnd)
      Set the flag, indicating if the events are displayed as "current" till they end (true) or only till they start (false).
      void setEndTime​(java.util.Date date)
      Set the end time.
      void setEndType​(java.lang.String value)
      Set the duration option.
      void setIsSeries​(java.lang.Boolean isSeries)
      Toggle between single events and series.
      void setName​(java.lang.String name)
      Sets the name of input fields.
      void setOccurrences​(java.lang.String occurrences)
      Set the occurrences.
      void setPattern​(java.lang.String patternType)
      Set the serial pattern type.
      void setSeriesEndDate​(java.util.Date date)
      Set the serial end date.
      void setStartTime​(java.util.Date date)
      Set the start time.
      void setValue​(java.lang.String value)  
      void setValue​(java.lang.String value, boolean fireEvent)  
      void setWholeDay​(java.lang.Boolean isWholeDay)
      Sets the whole day flag.
      void sizeChanged()  
      void updateExceptions​(java.util.SortedSet<java.util.Date> exceptions)
      Updates the exceptions.
      void updateStatus()
      Method called when a status update is triggered.
      void valueChanged()  
      • Methods inherited from class

        claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
      • Methods inherited from class

        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

        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

      • Methods inherited from interface

    • Method Detail

      • addFocusHandler

        public addFocusHandler​( handler)
        Specified by:
        addFocusHandler in interface
        See Also:
      • addValueChangeHandler

        public addValueChangeHandler​(<java.lang.String> handler)
        Specified by:
        addValueChangeHandler in interface<java.lang.String>
        Specified by:
        addValueChangeHandler in interface I_CmsEditWidget
        See Also:
      • conditionallyRemoveExceptionsOnChange

        public void conditionallyRemoveExceptionsOnChange​( action,
                                                          boolean showDialog)
        See Also:
        I_ChangeHandler.conditionallyRemoveExceptionsOnChange(, boolean)
      • getValue

        public java.lang.String getValue()
        Specified by:
        getValue in interface<java.lang.String>
        Specified by:
        getValue in interface<java.lang.String>
        See Also:
      • owns

        public boolean owns​( element)
        Description copied from interface: I_CmsEditWidget
        Returns true if the element should be logically counted as part of the widget for the purpose of determining whether a mouse click is "outside". For example, this is needed if the widget uses a popup.
        Specified by:
        owns in interface I_CmsEditWidget
        element - the element to check
        true if the element counts as part of the widget
        See Also:
      • removeExceptionsOnChange

        public void removeExceptionsOnChange​( cmd)
        See Also:
      • setCurrentTillEnd

        public void setCurrentTillEnd​(java.lang.Boolean isCurrentTillEnd)
        Set the flag, indicating if the events are displayed as "current" till they end (true) or only till they start (false).
        isCurrentTillEnd - the flag, indicating if the events are displayed as "current" till they end (true) or only till they start (false).
      • setEndTime

        public void setEndTime​(java.util.Date date)
        Set the end time.
        date - the end time to set.
      • setEndType

        public void setEndType​(java.lang.String value)
        Set the duration option.
        value - the duration option to set (I_CmsSerialDateValue.EndType as string).
      • setIsSeries

        public void setIsSeries​(java.lang.Boolean isSeries)
        Toggle between single events and series.
        isSeries - flag, indicating if we want a series of events.
      • setOccurrences

        public void setOccurrences​(java.lang.String occurrences)
        Set the occurrences. If the String is invalid, the occurrences will be set to "-1" to cause server-side validation to fail.
        occurrences - the interval to set.
      • setPattern

        public void setPattern​(java.lang.String patternType)
        Set the serial pattern type.
        patternType - the pattern type to set.
      • setSeriesEndDate

        public void setSeriesEndDate​(java.util.Date date)
        Set the serial end date.
        date - the serial end date.
      • setStartTime

        public void setStartTime​(java.util.Date date)
        Set the start time.
        date - the start time to set.
      • setValue

        public void setValue​(java.lang.String value)
        Specified by:
        setValue in interface<java.lang.String>
        Specified by:
        setValue in interface<java.lang.String>
        See Also:
      • setWholeDay

        public void setWholeDay​(java.lang.Boolean isWholeDay)
        Sets the whole day flag.
        isWholeDay - flag, indicating if the event lasts whole days.
      • sizeChanged

        public void sizeChanged()
        See Also:
      • updateExceptions

        public void updateExceptions​(java.util.SortedSet<java.util.Date> exceptions)
        Updates the exceptions.
        exceptions - the exceptions to set
      • valueChanged

        public void valueChanged()
        See Also: