Package com.levigo.jadice.web.client
Class ThumbnailViewBuilder
java.lang.Object
com.levigo.jadice.web.client.ThumbnailViewBuilder
Builder for creating ThumbnailViews.
Builds a ThumbnailView
that can be used - e.g. as a panel - to steer a document in a
separate PageView
in order to build a ThumbnailView
by calling build()
.
-
Constructor Summary
ConstructorsConstructorDescriptionThumbnailViewBuilder
(PageView targetPageView) The later createdThumbnailView
will track the givenPageView
and show thumbnails for theViewComponent.getDocument()
current document. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builder method to create a configuredThumbnailView
instance.setBorderThumbnailStyle
(com.levigo.jadice.web.client.border.internal.SimpleBorderSettings.BorderStyle borderThumbnailStyle) Setter for configuring CSS styles of borders.setDefaultThumbnailSize
(Dimension defaultThumbnailSize) setHasNativeScrollbars
(boolean nativeScrollbars) setIsAlignMiddle
(boolean alignMiddle) setLabelThumbnailStyle
(com.levigo.jadice.web.client.viewer.internal.ThumbnailPageView.LabelThumbnailStyle thumbnailLabelStyle) Setter for configuring css styles of labels.setScrollbarVisibility
(ScrollbarVisibility scrollbarVisibility) Sets theScrollbarVisibility
for the created thumbnail view to the desired value.
-
Constructor Details
-
ThumbnailViewBuilder
The later createdThumbnailView
will track the givenPageView
and show thumbnails for theViewComponent.getDocument()
current document.- Parameters:
targetPageView
- the target page view
-
-
Method Details
-
setIsAlignMiddle
-
setLabelThumbnailStyle
public ThumbnailViewBuilder setLabelThumbnailStyle(com.levigo.jadice.web.client.viewer.internal.ThumbnailPageView.LabelThumbnailStyle thumbnailLabelStyle) Setter for configuring css styles of labels.ThumbnailPageView.LabelThumbnailStyle
is part of an "internal" package. In general "internal" code is not guaranteed to remain API stable across releases. For this case, we're guaranteeing that theThumbnailPageView.LabelThumbnailStyle
interface will remain stable up until to Version 5.4 (see details in JWT-358).- Parameters:
thumbnailLabelStyle
- the label style- Returns:
- the builder object itself
-
setBorderThumbnailStyle
public ThumbnailViewBuilder setBorderThumbnailStyle(com.levigo.jadice.web.client.border.internal.SimpleBorderSettings.BorderStyle borderThumbnailStyle) Setter for configuring CSS styles of borders.SimpleBorderSettings
is part of an "internal" package. In general "internal" are not guaranteed to remain API stable across releases. For this case, we're guaranteeing that theSimpleBorderSettings.BorderStyle
interface will remain stable up until to Version 5.4 (see details in JWT-358).- Parameters:
borderThumbnailStyle
- the border style- Returns:
- the builder object itself
-
setDefaultThumbnailSize
-
setScrollbarVisibility
Sets theScrollbarVisibility
for the created thumbnail view to the desired value.Important
When setting the scrollbar to HIDDEN (off), scrolling might still be possible due to a registeredMouseWheelScrollTool
in the ToolManager of the thumbnail viewer.The tool has to be disabled manually in that case. Example:
ThumbnailView thumbnailView = new ThumbnailViewBuilder() .setScrollbarVisibility(new ScrollbarVisibility(Overflow.HIDDEN)) [...] .build(); ToolManager tt = thumbnailView.getToolManager(); tt.setEnabled(MouseWheelScrollTool.class, false);
- Parameters:
scrollbarVisibility
- the desiredScrollbarVisibility
- Returns:
- The builder for method chaining
-
setHasNativeScrollbars
-
build
Builder method to create a configuredThumbnailView
instance.- Returns:
- the ThumbnailView
-