Class DayOfWeekSelector
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<CustomField<T>,T>
com.vaadin.flow.component.customfield.CustomField<Set<DayOfWeek>>
com.flowingcode.vaadin.addons.dayofweekselector.DayOfWeekSelector
- All Implemented Interfaces:
AttachNotifier,BlurNotifier<CustomField<Set<DayOfWeek>>>,DetachNotifier,Focusable<CustomField<Set<DayOfWeek>>>,FocusNotifier<CustomField<Set<DayOfWeek>>>,HasElement,HasEnabled,HasHelper,HasLabel,HasSize,HasStyle,HasTheme,HasValidation,HasValue<AbstractField.ComponentValueChangeEvent<CustomField<Set<DayOfWeek>>,,Set<DayOfWeek>>, Set<DayOfWeek>> HasValueAndElement<AbstractField.ComponentValueChangeEvent<CustomField<Set<DayOfWeek>>,,Set<DayOfWeek>>, Set<DayOfWeek>> HasTooltip,HasValidationProperties,InputField<AbstractField.ComponentValueChangeEvent<CustomField<Set<DayOfWeek>>,,Set<DayOfWeek>>, Set<DayOfWeek>> Serializable
@CssImport("./styles/fc-days-of-week-selector-styles.css")
@JsModule("./src/fc-days-of-week-selector.ts")
@Tag("fc-days-of-week-selector")
public class DayOfWeekSelector
extends CustomField<Set<DayOfWeek>>
Shows the days of the week so they can be selected.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
AbstractField.ComponentValueChangeEvent<C extends Component,V extends Object> Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
BlurNotifier.BlurEvent<C extends Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
FocusNotifier.FocusEvent<C extends Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
HasValue.ValueChangeEvent<V extends Object>, HasValue.ValueChangeListener<E extends HasValue.ValueChangeEvent<?>> -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofDayOfWeekSelector.DayOfWeekSelector(String label) Constructs a new instance ofDayOfWeekSelectorwith the given label.DayOfWeekSelector(String label, DayOfWeek... value) Constructs a new instance ofDayOfWeekSelectorwith the given label and initial value.DayOfWeekSelector(DayOfWeek... value) Constructs a new instance ofDayOfWeekSelectorwith the given value. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetFirstDayOfWeek(DayOfWeek first) Sets the first day of the week.voidSets the internationalization properties for this component.voidsetOverflowIcon(Component icon) Sets the icon for the overflow menu trigger.protected voidsetPresentationValue(Set<DayOfWeek> newPresentationValue) voidsetReadOnly(boolean readOnly) voidSets the value of this object.voidsetWeekDaysShort(List<String> weekdaysShort) Sets the short names of the week days, starting fromsunand ending onsat.voidsetWeekDaysTooltip(List<String> weekdaysTooltip) Sets the tooltips of the week days, starting fromsunand ending onsat.protected booleanvalueEquals(Set<DayOfWeek> value1, Set<DayOfWeek> value2) Methods inherited from class com.vaadin.flow.component.customfield.CustomField
add, addThemeVariants, getLabel, onAttach, remove, removeThemeVariants, setLabel, updateValueMethods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getValue, isEmpty, setModelValue, setValueMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasHelper
getHelperComponent, getHelperText, setHelperComponent, setHelperTextMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipTextMethods inherited from interface com.vaadin.flow.component.HasValidation
setManualValidationMethods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, isInvalid, setErrorMessage, setInvalidMethods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getOptionalValue, getValue, isEmpty, setValueMethods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setRequiredIndicatorVisible
-
Constructor Details
-
DayOfWeekSelector
public DayOfWeekSelector()Creates a new instance ofDayOfWeekSelector. -
DayOfWeekSelector
Constructs a new instance ofDayOfWeekSelectorwith the given value.- Parameters:
value- the initial value.
-
DayOfWeekSelector
Constructs a new instance ofDayOfWeekSelectorwith the given label.- Parameters:
label- the text to set as the label
-
DayOfWeekSelector
Constructs a new instance ofDayOfWeekSelectorwith the given label and initial value.- Parameters:
label- the text to set as the labelvalue- the initial value.
-
-
Method Details
-
getEmptyValue
- Specified by:
getEmptyValuein interfaceHasValue<AbstractField.ComponentValueChangeEvent<CustomField<Set<DayOfWeek>>,Set<DayOfWeek>>, Set<DayOfWeek>> - Overrides:
getEmptyValuein classAbstractField<CustomField<Set<DayOfWeek>>,Set<DayOfWeek>>
-
valueEquals
- Overrides:
valueEqualsin classAbstractField<CustomField<Set<DayOfWeek>>,Set<DayOfWeek>>
-
generateModelValue
- Specified by:
generateModelValuein classCustomField<Set<DayOfWeek>>
-
setPresentationValue
- Specified by:
setPresentationValuein classCustomField<Set<DayOfWeek>>
-
setReadOnly
public void setReadOnly(boolean readOnly) -
setValue
Sets the value of this object. -
setI18N
Sets the internationalization properties for this component.- Parameters:
i18n- the internationalized properties, notnull
-
setWeekDaysShort
Sets the short names of the week days, starting fromsunand ending onsat.- Parameters:
weekdaysShort- the short names of the week days
-
setWeekDaysTooltip
Sets the tooltips of the week days, starting fromsunand ending onsat.- Parameters:
weekdaysTooltip- the tooltips of the week days
-
setFirstDayOfWeek
Sets the first day of the week.0 for Sunday, 1 for Monday, 2 for Tuesday, 3 for Wednesday, 4 for Thursday, 5 for Friday, 6 for Saturday.
- Parameters:
first- the index of the first day of the week- Throws:
IllegalArgumentException- if firstDayOfWeek is invalid
-
setOverflowIcon
Sets the icon for the overflow menu trigger.- Parameters:
icon- the icon component, notnull- Throws:
NullPointerException- ificonisnull
-