Class Splide
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.Div
com.vaadin.componentfactory.addons.splide.Splide
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Div>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasOrderedComponents,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasText,Serializable
@NpmPackage(value="@splidejs/splide",version="3.6.12") @NpmPackage(value="@splidejs/splide-extension-video",version="0.6.8")
@JsModule("./src/vcf-splide.js")
@CssImport("@splidejs/splide/dist/css/splide.min.css") @CssImport("@splidejs/splide-extension-video/dist/css/splide-extension-video.min.css") @CssImport("./styles/splide.css")
public class Splide
extends com.vaadin.flow.component.html.Div
Splide component definition. Splide uses splide library to display images and videos as a
carousel (see more at https://github.com/Splidejs/splide).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
com.vaadin.flow.component.HasText.WhiteSpace -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new slide to the splide carousel.voidRemove all current slides present in the carousel.Return the list of slides that are currently part of the splide component.booleanReturns if the images are being cropped or not.protected voidonAttach(com.vaadin.flow.component.AttachEvent attachEvent) protected voidonDetach(com.vaadin.flow.component.DetachEvent detachEvent) voidsetImageTrueSize(boolean imageTrueSize) Slide images usually have different aspect ratios.voidSet the list of the slides to be displayed by the splide component.Methods inherited from class com.vaadin.flow.component.HtmlComponent
getTitle, setTitleMethods 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, 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.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAllMethods 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.HasOrderedComponents
getChildren, getComponentAt, getComponentCount, indexOf, replaceMethods 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.HasText
getText, getWhiteSpace, setText, setWhiteSpace
-
Constructor Details
-
Splide
public Splide() -
Splide
-
-
Method Details
-
onAttach
protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent) - Overrides:
onAttachin classcom.vaadin.flow.component.Component
-
onDetach
protected void onDetach(com.vaadin.flow.component.DetachEvent detachEvent) - Overrides:
onDetachin classcom.vaadin.flow.component.Component
-
getSlides
Return the list of slides that are currently part of the splide component.- Returns:
- the list of the slides
-
setSlides
Set the list of the slides to be displayed by the splide component.- Parameters:
slides- the list of slides to display
-
addSlide
Add a new slide to the splide carousel.- Parameters:
slide- the new slide to add
-
clearSlides
public void clearSlides()Remove all current slides present in the carousel. -
isImageTrueSize
public boolean isImageTrueSize()Returns if the images are being cropped or not. By default, this flag is set to true.- Returns:
- true, if images are shown in true size.
-
setImageTrueSize
public void setImageTrueSize(boolean imageTrueSize) Slide images usually have different aspect ratios. We can tell the component to show them in true size or to crop them so they all have the same size to fit container. If this flag is set true, images will be shown in true size, if not, images will be cropped.- Parameters:
imageTrueSize-
-