Class CmsSerialDateController
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Composite
-
- org.opencms.acacia.client.widgets.serialdate.CmsSerialDateController
-
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasFocusHandlers
,com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.logical.shared.HasValueChangeHandlers<java.lang.String>
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.TakesValue<java.lang.String>
,com.google.gwt.user.client.ui.HasValue<java.lang.String>
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.IsRenderable
,com.google.gwt.user.client.ui.IsWidget
,I_CmsEditWidget
,I_StatusUpdateHandler
public class CmsSerialDateController extends com.google.gwt.user.client.ui.Composite 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.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_DATE_FORMAT
Default date format.
-
Constructor Summary
Constructors Constructor Description CmsSerialDateController()
Category field widgets for ADE forms.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwt.event.shared.HandlerRegistration
addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler)
com.google.gwt.event.shared.HandlerRegistration
addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<java.lang.String> handler)
void
conditionallyRemoveExceptionsOnChange(com.google.gwt.user.client.Command 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(com.google.gwt.dom.client.Element 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(com.google.gwt.user.client.Command 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 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 org.opencms.acacia.client.widgets.I_CmsEditWidget
shouldSetDefaultWhenDisabled
-
-
-
-
Field Detail
-
DEFAULT_DATE_FORMAT
public static final java.lang.String DEFAULT_DATE_FORMAT
Default date format.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsSerialDateController
public CmsSerialDateController()
Category field widgets for ADE forms.
-
-
Method Detail
-
addFocusHandler
public com.google.gwt.event.shared.HandlerRegistration addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler)
- Specified by:
addFocusHandler
in interfacecom.google.gwt.event.dom.client.HasFocusHandlers
- See Also:
HasFocusHandlers.addFocusHandler(com.google.gwt.event.dom.client.FocusHandler)
-
addValueChangeHandler
public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<java.lang.String> handler)
- Specified by:
addValueChangeHandler
in interfacecom.google.gwt.event.logical.shared.HasValueChangeHandlers<java.lang.String>
- Specified by:
addValueChangeHandler
in interfaceI_CmsEditWidget
- See Also:
HasValueChangeHandlers.addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler)
-
conditionallyRemoveExceptionsOnChange
public void conditionallyRemoveExceptionsOnChange(com.google.gwt.user.client.Command action, boolean showDialog)
- See Also:
I_ChangeHandler.conditionallyRemoveExceptionsOnChange(com.google.gwt.user.client.Command, boolean)
-
executeShowDatesAction
public void executeShowDatesAction()
Show the dates for managing exceptions.
-
getPattern
public I_CmsSerialDatePatternController getPattern()
Returns the controller for the currently active pattern.- Returns:
- the controller for the currently active pattern.
-
getPatternDefaultValues
public CmsSerialDateController.PatternDefaultValues getPatternDefaultValues()
Returns the default values to set for the patterns dependent on the current start date.- Returns:
- the default values to set for the patterns dependent on the current start date.
-
getPatternView
public I_CmsSerialDatePatternView getPatternView()
Returns the widget to place in the pattern panel.- Returns:
- the widget to place in the pattern panel.
-
getValue
public java.lang.String getValue()
- Specified by:
getValue
in interfacecom.google.gwt.user.client.ui.HasValue<java.lang.String>
- Specified by:
getValue
in interfacecom.google.gwt.user.client.TakesValue<java.lang.String>
- See Also:
HasValue.getValue()
-
isActive
public boolean isActive()
Description copied from interface:I_CmsEditWidget
Returns if the widget is active.- Specified by:
isActive
in interfaceI_CmsEditWidget
- Returns:
true
if the widget is active- See Also:
I_CmsEditWidget.isActive()
-
onAttachWidget
public void onAttachWidget()
Description copied from interface:I_CmsEditWidget
This method is called when a widget is attached to the browser's document.It needs to call the
Widget.onAttach()
method.- Specified by:
onAttachWidget
in interfaceI_CmsEditWidget
- See Also:
I_CmsEditWidget.onAttachWidget()
-
owns
public boolean owns(com.google.gwt.dom.client.Element 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 interfaceI_CmsEditWidget
- Parameters:
element
- the element to check- Returns:
- true if the element counts as part of the widget
- See Also:
I_CmsEditWidget.owns(com.google.gwt.dom.client.Element)
-
removeExceptionsOnChange
public void removeExceptionsOnChange(com.google.gwt.user.client.Command cmd)
- See Also:
I_ChangeHandler.removeExceptionsOnChange(com.google.gwt.user.client.Command)
-
setActive
public void setActive(boolean active)
Description copied from interface:I_CmsEditWidget
Sets the widget active/inactive.- Specified by:
setActive
in interfaceI_CmsEditWidget
- Parameters:
active
-true
to activate the widget- See Also:
I_CmsEditWidget.setActive(boolean)
-
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).- Parameters:
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.- Parameters:
date
- the end time to set.
-
setEndType
public void setEndType(java.lang.String value)
Set the duration option.- Parameters:
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.- Parameters:
isSeries
- flag, indicating if we want a series of events.
-
setName
public void setName(java.lang.String name)
Description copied from interface:I_CmsEditWidget
Sets the name of input fields.- Specified by:
setName
in interfaceI_CmsEditWidget
- Parameters:
name
- of the input field- See Also:
I_CmsEditWidget.setName(java.lang.String)
-
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.- Parameters:
occurrences
- the interval to set.
-
setPattern
public void setPattern(java.lang.String patternType)
Set the serial pattern type.- Parameters:
patternType
- the pattern type to set.
-
setSeriesEndDate
public void setSeriesEndDate(java.util.Date date)
Set the serial end date.- Parameters:
date
- the serial end date.
-
setStartTime
public void setStartTime(java.util.Date date)
Set the start time.- Parameters:
date
- the start time to set.
-
setValue
public void setValue(java.lang.String value)
- Specified by:
setValue
in interfacecom.google.gwt.user.client.ui.HasValue<java.lang.String>
- Specified by:
setValue
in interfacecom.google.gwt.user.client.TakesValue<java.lang.String>
- See Also:
HasValue.setValue(java.lang.Object)
-
setValue
public void setValue(java.lang.String value, boolean fireEvent)
- Specified by:
setValue
in interfacecom.google.gwt.user.client.ui.HasValue<java.lang.String>
- Specified by:
setValue
in interfaceI_CmsEditWidget
- See Also:
I_CmsEditWidget.setValue(java.lang.String, boolean)
-
setWholeDay
public void setWholeDay(java.lang.Boolean isWholeDay)
Sets the whole day flag.- Parameters:
isWholeDay
- flag, indicating if the event lasts whole days.
-
sizeChanged
public void sizeChanged()
- See Also:
I_ChangeHandler.sizeChanged()
-
updateExceptions
public void updateExceptions(java.util.SortedSet<java.util.Date> exceptions)
Updates the exceptions.- Parameters:
exceptions
- the exceptions to set
-
updateStatus
public void updateStatus()
Description copied from interface:I_StatusUpdateHandler
Method called when a status update is triggered.- Specified by:
updateStatus
in interfaceI_StatusUpdateHandler
- See Also:
I_StatusUpdateHandler.updateStatus()
-
valueChanged
public void valueChanged()
- See Also:
I_ChangeHandler.valueChanged()
-
-