Package com.storedobject.ui
Class FileField
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<com.vaadin.flow.component.customfield.CustomField<StreamData>,StreamData>
com.vaadin.flow.component.customfield.CustomField<StreamData>
- All Implemented Interfaces:
FilterMethods<StreamData>
,ObjectGetter<StreamData>
,ObjectSetter<StreamData>
,ObjectInput<StreamData>
,ObjectProvider<StreamData>
,AbstractObjectInput<StreamData>
,HasElement
,HasThemeStyle
,ValueRequired
,com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.customfield.CustomField<StreamData>>
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.customfield.CustomField<StreamData>>
,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.customfield.CustomField<StreamData>>
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasEnabled
,com.vaadin.flow.component.HasHelper
,com.vaadin.flow.component.HasLabel
,com.vaadin.flow.component.HasPlaceholder
,com.vaadin.flow.component.HasSize
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.HasTheme
,com.vaadin.flow.component.HasValidation
,com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<StreamData>,
,StreamData>, StreamData> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<StreamData>,
,StreamData>, StreamData> com.vaadin.flow.component.shared.HasTooltip
,com.vaadin.flow.component.shared.HasValidationProperties
,com.vaadin.flow.component.shared.InputField<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<StreamData>,
,StreamData>, StreamData> Serializable
,Consumer<StreamData>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,
V> Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>
Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>
-
Constructor Summary
ConstructorsConstructorDescriptionFileField
(ObjectField.Type... types) FileField
(String label, ObjectField.Type... types) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContentType
(String... contentType) protected ImageButton
addExtraButton
(StreamData value) void
void
static <O extends StoredObject>
booleanprotected com.vaadin.flow.component.Component
void
void
void
protected StreamData
boolean
isAudio()
boolean
isContentTypeAllowed
(String contentType) boolean
isImage()
final boolean
Get the value required flag.boolean
isVideo()
protected void
onAttach
(com.vaadin.flow.component.AttachEvent attachEvent) void
removeContentType
(String contentType) void
setEnabled
(boolean enabled) Enable/disable this field.void
setMaxFileSize
(int maxFileSize) void
setMediaPreview
(boolean preview) protected void
setModelValue
(StreamData value, boolean fromClient) protected void
setPresentationValue
(StreamData value) void
setReadOnly
(boolean readOnly) Make this field read-only.void
setRequired
(boolean required) Set value required flag.void
setValue
(StreamData value) Set the value.Methods inherited from class com.storedobject.ui.AbstractObjectField
applyFilter, createDefaultSearcher, createSearcher, doSearch, editor, filter, filteredList, getBrowseColumns, getCached, getContent, getDetailComponent, getDisplayDetail, getInternalLabel, getLoadFilter, getObjectClass, getPrefixComponent, getSearchColumns, getSearcher, initComponent, isAllowAny, isInvalid, load, reget, reload, setBrowseColumns, setCached, setDetailComponent, setDisplayDetail, setInternalLabel, setItemLabelGenerator, setPrefixFieldControl, setSearchColumns
Methods inherited from class com.storedobject.vaadin.CustomField
addField, addField, focus
Methods inherited from class com.vaadin.flow.component.customfield.CustomField
add, addThemeVariants, getLabel, remove, removeThemeVariants, setLabel, updateValue
Methods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, getValue, isEmpty, valueEquals
Methods 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, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.storedobject.ui.util.AbstractObjectInput
applyFilterPredicate, convert, focus, getObject, getObjectId, getObjectId, setObject
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.storedobject.core.FilterMethods
getEffectiveCondition, getFilterCondition, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setLoadFilter, setLoadFilter, setViewFilter, setViewFilter
Methods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, getTabIndex, setTabIndex
Methods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListener
Methods inherited from interface com.storedobject.vaadin.HasElement
getAttribute, getStyle, setAttribute, setStyle
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled
Methods inherited from interface com.vaadin.flow.component.HasHelper
getHelperComponent, getHelperText, setHelperComponent, setHelperText
Methods inherited from interface com.vaadin.flow.component.HasLabel
getLabel, setLabel
Methods inherited from interface com.vaadin.flow.component.HasPlaceholder
getPlaceholder, setPlaceholder
Methods 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, setWidthFull
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
Methods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
Methods inherited from interface com.storedobject.vaadin.HasThemeStyle
addTheme, asPrimary, asSmall, clearThemes, getInternalElement, removeTheme, setTheme
Methods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipText
Methods inherited from interface com.vaadin.flow.component.HasValidation
setManualValidation
Methods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, setErrorMessage, setInvalid
Methods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty
Methods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setRequiredIndicatorVisible
Methods inherited from interface com.storedobject.ui.ObjectInput
getObject, getValue, setObject, setObjectClass, setValue
Methods inherited from interface com.storedobject.core.ObjectSetter
accept
-
Constructor Details
-
FileField
public FileField() -
FileField
-
FileField
-
FileField
-
-
Method Details
-
allowLinking
public void allowLinking() -
setMaxFileSize
public void setMaxFileSize(int maxFileSize) -
onAttach
protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent) - Overrides:
onAttach
in classAbstractObjectField<StreamData>
-
canCreate
-
setRequired
public void setRequired(boolean required) Description copied from interface:ValueRequired
Set value required flag.- Specified by:
setRequired
in interfaceValueRequired
- Overrides:
setRequired
in classAbstractObjectField<StreamData>
- Parameters:
required
- Required or not
-
isRequired
public final boolean isRequired()Description copied from interface:ValueRequired
Get the value required flag.- Specified by:
isRequired
in interfaceValueRequired
- Overrides:
isRequired
in classAbstractObjectField<StreamData>
- Returns:
- Whether required or not.
-
createPrefixComponent
protected com.vaadin.flow.component.Component createPrefixComponent()- Specified by:
createPrefixComponent
in classAbstractObjectField<StreamData>
-
generateModelValue
- Specified by:
generateModelValue
in classcom.vaadin.flow.component.customfield.CustomField<StreamData>
-
setPresentationValue
- Overrides:
setPresentationValue
in classAbstractObjectField<StreamData>
-
setModelValue
- Overrides:
setModelValue
in classcom.vaadin.flow.component.AbstractField<com.vaadin.flow.component.customfield.CustomField<StreamData>,
StreamData>
-
setValue
Description copied from interface:ObjectInput
Set the value.- Specified by:
setValue
in interfacecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<StreamData>,
StreamData>, StreamData> - Specified by:
setValue
in interfaceObjectInput<StreamData>
- Overrides:
setValue
in classcom.vaadin.flow.component.AbstractField<com.vaadin.flow.component.customfield.CustomField<StreamData>,
StreamData> - Parameters:
value
- Value to set.
-
setReadOnly
public void setReadOnly(boolean readOnly) Description copied from interface:AbstractObjectInput
Make this field read-only.- Specified by:
setReadOnly
in interfaceAbstractObjectInput<StreamData>
- Specified by:
setReadOnly
in interfacecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<StreamData>,
StreamData>, StreamData> - Specified by:
setReadOnly
in interfacecom.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<StreamData>,
StreamData>, StreamData> - Overrides:
setReadOnly
in classAbstractObjectField<StreamData>
- Parameters:
readOnly
- True to set as read-only.
-
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:AbstractObjectInput
Enable/disable this field.- Specified by:
setEnabled
in interfaceAbstractObjectInput<StreamData>
- Specified by:
setEnabled
in interfacecom.vaadin.flow.component.HasEnabled
- Overrides:
setEnabled
in classAbstractObjectField<StreamData>
- Parameters:
enabled
- True for enabling.
-
addExtraButton
-
addContentType
-
removeContentType
-
isContentTypeAllowed
-
isImage
public boolean isImage() -
isAudio
public boolean isAudio() -
isVideo
public boolean isVideo() -
disallowLinking
public void disallowLinking() -
disallowDownload
public void disallowDownload() -
allowDownload
public void allowDownload() -
disallowView
public void disallowView() -
getFileName
-
setMediaPreview
public void setMediaPreview(boolean preview)
-