Interface ClientConfiguration
- All Known Implementing Classes:
DefaultClientConfiguration
The intention of this class is to hide the actual implementation of the configuration from the
user and provide a pluggable interface. Public access to the properties stored in here is
provided in a static manner by ClientConfigurationManager.getClientConfiguration().
This enables the jadice web toolkit to provide different implementations for different
configuration frameworks in the future. Implementations of this interface can then be passed to
ClientConfigurationManager.setClientConfiguration(ClientConfiguration).
-
Method Summary
Modifier and TypeMethodDescriptionintGets the maximum number of concurrentTilerequests that a client can request on a jadice web toolkit server.Returns the maximum allowed zoom value.Returns the minimum allowed zoom value.intSee thesetMouseWheelSpeed(int)documentation for further info.intThe render quality enhancement for modern high-resolution displays and for high browser zoom levels (120% and more).This ID is used whenever the GWT-RootPanel.get(String)-Method is used.booleanIndicates if GWTs setAnimationEnabled is used whenever possible or notbooleanWhether a position editor widget is added to the per-annotation toolbar.booleanWhether the improved text annotation font scaling is used or not.booleanWhether the drag and drop across different instances is enabled or not.booleanGets whether text editors of text based annotations should be focused by the browser.booleanWhether icon fonts should be used when rendering images on toolbar buttons.booleanbooleanReturns whether the document controls should be preserved on document change.booleanbooleanbooleanIndicates if by default the serialized render controls are set to the document properties before calling a server-operation.voidsetAnimationEnabled(boolean animationEnabled) Turn on or off GWTs animations for popups and dialogsvoidsetFocusTextEditor(boolean focusTextEditor) Sets whether text editors of text based annotations should be focused by the browser.voidsetIsAnnotationEditorWidgetUsed(boolean useAnnotationEditorWidget) Set whether a position editor widget is added to the per-annotation toolbar.voidsetIsBetterTextAnnoRenderingUsed(boolean useBetterTextAnnoRendering) Set whether the improved text annotation font scaling is used or not.voidsetIsCrossInstanceDragAndDropEnabled(boolean isCrossInstanceDragAndDropEnabled) Set whether the drag and drop across different instances is enabled or not.voidsetIsIconFontUsed(boolean useIconFont) Sets whether icon fonts should be used or not.voidsetIsShowPageCountOnTouchKnobWidget(boolean showPageCountOnTouchKnobWidget) Set whether theTouchKnobWidgetshould show a popup upon each document change, where the amount of pages is shown for a short period.voidsetIsTextContentStreaming(boolean isTextContentStreaming) TheTextService#getTextContent(AbstractInvocationContext, PageSegmentHandle, String)by default gets one result ofCollection<Block>from the server.voidsetMaxParallelTileRequests(int maxRequestCount) Sets the maximum number ofTilerequests that a client can have running on a jadice web toolkit server at the same time.voidsetMaxZoomFactor(float maxZoom) Sets the maximum allowed zoom value.voidsetMinZoomFactor(float minZoom) Sets the minimum allowed zoom value.voidsetMouseWheelSpeed(int mouseWheelSpeed) Alter the speed when using theMouseWheelScrollToolPreviously, this value was 10, which turned out to be too slow in the combination of using theMouseWheelScrollToolandViewerBuilder.setHasNativeScrollbars(boolean)with value false.voidsetPersistentViewId(boolean persistentViewId) voidsetPreserveRenderControlsOnDocumentChange(boolean keepDocumentControlsOnDocumentChange) Sets whether the document controls should be preserved on document change.voidsetQualityEnhancement(int qualityInPercent) Allows tuning the render quality for modern high-resolution displays and for high browser zoom levels (120% and more).voidsetRootPanelId(String rootPanelId) This ID is used whenever the GWT-RootPanel.get(String)-Method is used.voidsetUseAutomaticRenderControls(boolean useAutomaticRenderControls) Controls if by default the serialized render controls are set to the document properties before calling a server-operation.voidsetUseLigatureIconFont(boolean useLigatureIconFont) Sets whether the icon font used in JWV-compatible manner by using ligatures instead of classes.booleanWhether the icon font used in JWV-compatible manner by using ligatures instead of classes.
-
Method Details
-
setIsIconFontUsed
void setIsIconFontUsed(boolean useIconFont) Sets whether icon fonts should be used or not. If not theImageResources configured in theUIStyleare used.- Parameters:
useIconFont- true if icon fonts should be used when rendering images on toolbar buttons, context menus and other widgets
-
isIconFontUsed
boolean isIconFontUsed()Whether icon fonts should be used when rendering images on toolbar buttons. If not theImageResources configured in theUIStyleare used.- Returns:
- whether icon fonts should be used
-
setMaxParallelTileRequests
void setMaxParallelTileRequests(int maxRequestCount) Sets the maximum number ofTilerequests that a client can have running on a jadice web toolkit server at the same time.- Parameters:
maxRequestCount- the number of requests
-
getMaxParallelTileRequests
int getMaxParallelTileRequests()Gets the maximum number of concurrentTilerequests that a client can request on a jadice web toolkit server.- Returns:
- the number of allowed maximum parallel tile requests
-
getQualityEnhancement
int getQualityEnhancement()The render quality enhancement for modern high-resolution displays and for high browser zoom levels (120% and more). This variable allows enhancing the render quality between 0 (standard) and 100 percent (maximum quality).- Returns:
- adjustment percentage (0 is standard quality, but fast; 100 is maximum quality, but slow)
-
setQualityEnhancement
void setQualityEnhancement(int qualityInPercent) Allows tuning the render quality for modern high-resolution displays and for high browser zoom levels (120% and more). This variable allows enhancing the render quality between 0 (standard) and 100 percent (maximum quality).Some examples:
- qualityInPercent = 0: "standard render behaviour"
- qualityInPercent = 100: "full-resolution" rendering on high resolution devices. Be aware that this may slow down tile rendering and document display on the client!
- qualityInPercent = 30: seems like a good trade-off between quality and speed.
- Parameters:
qualityInPercent- adjustment percentage (0 is standard quality, but fast; 100 is maximum quality, but slow)
-
setMaxZoomFactor
void setMaxZoomFactor(float maxZoom) Sets the maximum allowed zoom value.- Parameters:
maxZoom- the maximum allowed zoom value
-
getMaxZoomFactor
Float getMaxZoomFactor()Returns the maximum allowed zoom value.- Returns:
- the maximum allowed zoom value
-
setMinZoomFactor
void setMinZoomFactor(float minZoom) Sets the minimum allowed zoom value.- Parameters:
minZoom- the minimum allowed zoom value
-
getMinZoomFactor
Float getMinZoomFactor()Returns the minimum allowed zoom value.- Returns:
- the minimum allowed zoom value
-
isFocusTextEditor
boolean isFocusTextEditor()Gets whether text editors of text based annotations should be focused by the browser.For more details about this setting, see the documentation of
setFocusTextEditor(boolean)- Returns:
- true if the browser scrolling should lead to jadice scrolling; false if the browser scrolling should be ignored
- See Also:
-
setFocusTextEditor
void setFocusTextEditor(boolean focusTextEditor) Sets whether text editors of text based annotations should be focused by the browser.This is only when using jadice scrollbars instead of native scrollbars.
Default:
trueA text editor needs the browsers focus to get input. When setting focus to the editor most browsers ensure that the text area is visible. It does this by browser scrolling. If the jadice scrollbars are used instead of the native scrollbars (this is default) the browser would scroll with the invisible scrollbars to make the editor visible if it is partly outside the visible area. There are two possibilities to handle this situation.
- Scroll the jadice scrollbars and reset the browser scrolling. This works in all browsers. But it can lead to some unexpected scrolling. Chrome for example centers the part of the editor containing text. IE just scrolls the whole editor visible.
- Reset the browser scrolling. This does not lead to unexpected scrolling but it can happen that the user inserts text and does not see the text. Besides it does not work in IE.
- Parameters:
focusTextEditor- true if the browser scrolling should lead to jadice scrolling; false if the browser scrolling should be ignored
-
isPreserveRenderControlsOnDocumentChange
boolean isPreserveRenderControlsOnDocumentChange()Returns whether the document controls should be preserved on document change.By Default the document controls are not kept on document change.
- Returns:
- whether the document controls should be kept on document change
-
setPreserveRenderControlsOnDocumentChange
void setPreserveRenderControlsOnDocumentChange(boolean keepDocumentControlsOnDocumentChange) Sets whether the document controls should be preserved on document change.By Default the document controls are not kept on document change.
- Parameters:
keepDocumentControlsOnDocumentChange-trueif the document controls should be kept on document change otherwisefalse
-
setIsAnnotationEditorWidgetUsed
void setIsAnnotationEditorWidgetUsed(boolean useAnnotationEditorWidget) Set whether a position editor widget is added to the per-annotation toolbar.- Parameters:
useAnnotationEditorWidget- true if the widget should be added.
-
isAnnotationEditorWidgetUsed
boolean isAnnotationEditorWidgetUsed()Whether a position editor widget is added to the per-annotation toolbar.- Returns:
- Is the widget added?
-
setIsBetterTextAnnoRenderingUsed
void setIsBetterTextAnnoRenderingUsed(boolean useBetterTextAnnoRendering) Set whether the improved text annotation font scaling is used or not.- Parameters:
useBetterTextAnnoRendering- true if the new font scaling should be used
-
isBetterTextAnnoRenderingUsed
boolean isBetterTextAnnoRenderingUsed()Whether the improved text annotation font scaling is used or not.- Returns:
- Is the new font scaling used?
-
setIsCrossInstanceDragAndDropEnabled
void setIsCrossInstanceDragAndDropEnabled(boolean isCrossInstanceDragAndDropEnabled) Set whether the drag and drop across different instances is enabled or not. Since Firefox doesn't provide information about the DND-target it can be safe to generally disable DND-move (copy still works) for Firefox.- Parameters:
isCrossInstanceDragAndDropEnabled- true if the DND should be used
-
isCrossInstanceDragAndDropEnabled
boolean isCrossInstanceDragAndDropEnabled()Whether the drag and drop across different instances is enabled or not.- Returns:
- true if DND should be used, false otherwise
-
useLigatureIconFont
boolean useLigatureIconFont()Whether the icon font used in JWV-compatible manner by using ligatures instead of classes.- Returns:
- true if the ligatures should be used.
-
setUseLigatureIconFont
void setUseLigatureIconFont(boolean useLigatureIconFont) Sets whether the icon font used in JWV-compatible manner by using ligatures instead of classes.- Parameters:
useLigatureIconFont- true if the DND should be used
-
setIsShowPageCountOnTouchKnobWidget
void setIsShowPageCountOnTouchKnobWidget(boolean showPageCountOnTouchKnobWidget) Set whether theTouchKnobWidgetshould show a popup upon each document change, where the amount of pages is shown for a short period. ATTENTION: you have to call the method before creating a viewer, otherwise the change won't be taken into account. For changing the time (via UIStyler/gss), how long the info is displayed, see the example in com.levigo.jadice.web.demo.touch.client.ui.style.TouchUIStyle#overlayInformationStyle()- Parameters:
showPageCountOnTouchKnobWidget- true if the popup should be shown upon a document change
-
isShowPageCountOnTouchKnobWidget
boolean isShowPageCountOnTouchKnobWidget() -
setIsTextContentStreaming
void setIsTextContentStreaming(boolean isTextContentStreaming) TheTextService#getTextContent(AbstractInvocationContext, PageSegmentHandle, String)by default gets one result ofCollection<Block>from the server. When activating CSP, an unresolved GWT issue can cause problems when the Collection exceeds 64KB, see the gwt issue. Therefore, setting thebooleanto true will fetch theblocksone by one and not as a whole collection, to stay below the 64KB.- Parameters:
isTextContentStreaming- whether to stream or not
-
isTextContentStreaming
boolean isTextContentStreaming() -
isAnimationEnabled
boolean isAnimationEnabled()Indicates if GWTs setAnimationEnabled is used whenever possible or not- Returns:
- true if animations should be used, false otherwise
-
setAnimationEnabled
void setAnimationEnabled(boolean animationEnabled) Turn on or off GWTs animations for popups and dialogs- Parameters:
animationEnabled- whether turn it on or off
-
isUseAutomaticRenderControls
boolean isUseAutomaticRenderControls()Indicates if by default the serialized render controls are set to the document properties before calling a server-operation.- Returns:
-
setUseAutomaticRenderControls
void setUseAutomaticRenderControls(boolean useAutomaticRenderControls) Controls if by default the serialized render controls are set to the document properties before calling a server-operation.- Parameters:
useAutomaticRenderControls-
-
getRootPanelId
String getRootPanelId()This ID is used whenever the GWT-RootPanel.get(String)-Method is used. By default, the id is null which then uses the HTML-Body-Element as Root-Container.- Returns:
- the id of the RootPanel or null for default
-
setRootPanelId
This ID is used whenever the GWT-RootPanel.get(String)-Method is used. By default, the id is null which then uses the HTML-Body-Element as Root-Container.- Parameters:
rootPanelId- the id of the RootPanel or null for default
-
setMouseWheelSpeed
void setMouseWheelSpeed(int mouseWheelSpeed) Alter the speed when using theMouseWheelScrollToolPreviously, this value was 10, which turned out to be too slow in the combination of using theMouseWheelScrollToolandViewerBuilder.setHasNativeScrollbars(boolean)with value false. So the standard value was raised, but if that still isn't fitting, you can alter it here.- Parameters:
mouseWheelSpeed- how fast should a movement on the mouse wheel scroll thePageView?
-
getMouseWheelSpeed
int getMouseWheelSpeed()See thesetMouseWheelSpeed(int)documentation for further info. -
isPersistentViewId
boolean isPersistentViewId() -
setPersistentViewId
void setPersistentViewId(boolean persistentViewId)
-