Class CmsCheckableDatePanel
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.CmsCheckableDatePanel
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.logical.shared.HasValueChangeHandlers<SortedSet<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<SortedSet<Date>>
Special list for checkboxes with dates.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
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
-
Constructor Summary
ConstructorDescriptionCmsCheckableDatePanel
(String dateFormat) Constructor for creating a one column list with check boxes.CmsCheckableDatePanel
(String dateFormat, CmsCheckableDatePanel.Style style) Constructor for creating a list with check boxes.CmsCheckableDatePanel
(String dateFormat, CmsCheckableDatePanel.Style style, boolean onlyLabels) Constructor where all options can be set. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a date to the list (unchecked).void
addDateChecked
(Date date) Adds a date that is already checked.com.google.gwt.event.shared.HandlerRegistration
addValueChangeHandler
(com.google.gwt.event.logical.shared.ValueChangeHandler<SortedSet<Date>> handler) Returns all checked dates.getDates()
Returns all dates in the list.Returns all dates with the specified check state, if the check state isnull
, all dates are returned.Returns all dates that are not checked.void
Sets all dates in the list (unchecked).void
Sets all dates in the list.void
setDatesWithCheckState
(Collection<org.opencms.util.CmsPair<Date, 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 Details
-
CmsCheckableDatePanel
Constructor for creating a one column list with check boxes.- Parameters:
dateFormat
- The date format to use.
-
CmsCheckableDatePanel
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(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 Details
-
addDate
Adds a date to the list (unchecked).- Parameters:
date
- the date to add.
-
addDateChecked
Adds a date that is already checked.- Parameters:
date
- the date to add.
-
getCheckedDates
Returns all checked dates.- Returns:
- all checked dates.
-
getDates
Returns all dates in the list.- Returns:
- all dates in the list.
-
getDates
Returns all dates with the specified check state, if the check state isnull
, 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
Returns all dates that are not checked.- Returns:
- all dates that are not checked.
-
setDates
Sets all dates in the list (unchecked).- Parameters:
dates
- the dates to set.
-
setDates
Sets all dates in the list.- Parameters:
dates
- the dates to setchecked
- flag, indicating if all should be checked or unchecked.
-
setDatesWithCheckState
public void setDatesWithCheckState(Collection<org.opencms.util.CmsPair<Date, Boolean>> datesWithCheckInfo) Set dates with the provided check states.- Parameters:
datesWithCheckInfo
- the dates to set, accompanied with the check state to set.
-