Class DefaultClientConfiguration
- All Implemented Interfaces:
ClientConfiguration
-
Constructor Summary
Constructors -
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 theClientConfiguration.setMouseWheelSpeed(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 preserveRenderControlsOnDocumentChange) 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.
-
Constructor Details
-
DefaultClientConfiguration
public DefaultClientConfiguration()
-
-
Method Details
-
setIsIconFontUsed
public void setIsIconFontUsed(boolean useIconFont) Description copied from interface:ClientConfigurationSets whether icon fonts should be used or not. If not theImageResources configured in theUIStyleare used.- Specified by:
setIsIconFontUsedin interfaceClientConfiguration- Parameters:
useIconFont- true if icon fonts should be used when rendering images on toolbar buttons, context menus and other widgets
-
isIconFontUsed
public boolean isIconFontUsed()Description copied from interface:ClientConfigurationWhether icon fonts should be used when rendering images on toolbar buttons. If not theImageResources configured in theUIStyleare used.- Specified by:
isIconFontUsedin interfaceClientConfiguration- Returns:
- whether icon fonts should be used
-
setMaxParallelTileRequests
public void setMaxParallelTileRequests(int maxRequestCount) Description copied from interface:ClientConfigurationSets the maximum number ofTilerequests that a client can have running on a jadice web toolkit server at the same time.- Specified by:
setMaxParallelTileRequestsin interfaceClientConfiguration- Parameters:
maxRequestCount- the number of requests
-
getMaxParallelTileRequests
public int getMaxParallelTileRequests()Description copied from interface:ClientConfigurationGets the maximum number of concurrentTilerequests that a client can request on a jadice web toolkit server.- Specified by:
getMaxParallelTileRequestsin interfaceClientConfiguration- Returns:
- the number of allowed maximum parallel tile requests
-
getQualityEnhancement
public int getQualityEnhancement()Description copied from interface:ClientConfigurationThe 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).- Specified by:
getQualityEnhancementin interfaceClientConfiguration- Returns:
- adjustment percentage (0 is standard quality, but fast; 100 is maximum quality, but slow)
-
setQualityEnhancement
public void setQualityEnhancement(int qualityInPercent) Description copied from interface:ClientConfigurationAllows 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.
- Specified by:
setQualityEnhancementin interfaceClientConfiguration- Parameters:
qualityInPercent- adjustment percentage (0 is standard quality, but fast; 100 is maximum quality, but slow)
-
setMaxZoomFactor
public void setMaxZoomFactor(float maxZoom) Description copied from interface:ClientConfigurationSets the maximum allowed zoom value.- Specified by:
setMaxZoomFactorin interfaceClientConfiguration- Parameters:
maxZoom- the maximum allowed zoom value
-
getMaxZoomFactor
Description copied from interface:ClientConfigurationReturns the maximum allowed zoom value.- Specified by:
getMaxZoomFactorin interfaceClientConfiguration- Returns:
- the maximum allowed zoom value
-
setMinZoomFactor
public void setMinZoomFactor(float minZoom) Description copied from interface:ClientConfigurationSets the minimum allowed zoom value.- Specified by:
setMinZoomFactorin interfaceClientConfiguration- Parameters:
minZoom- the minimum allowed zoom value
-
getMinZoomFactor
Description copied from interface:ClientConfigurationReturns the minimum allowed zoom value.- Specified by:
getMinZoomFactorin interfaceClientConfiguration- Returns:
- the minimum allowed zoom value
-
isFocusTextEditor
public boolean isFocusTextEditor()Description copied from interface:ClientConfigurationGets whether text editors of text based annotations should be focused by the browser.For more details about this setting, see the documentation of
ClientConfiguration.setFocusTextEditor(boolean)- Specified by:
isFocusTextEditorin interfaceClientConfiguration- Returns:
- true if the browser scrolling should lead to jadice scrolling; false if the browser scrolling should be ignored
- See Also:
-
setFocusTextEditor
public void setFocusTextEditor(boolean focusTextEditor) Description copied from interface:ClientConfigurationSets 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.
- Specified by:
setFocusTextEditorin interfaceClientConfiguration- Parameters:
focusTextEditor- true if the browser scrolling should lead to jadice scrolling; false if the browser scrolling should be ignored
-
isPreserveRenderControlsOnDocumentChange
public boolean isPreserveRenderControlsOnDocumentChange()Description copied from interface:ClientConfigurationReturns whether the document controls should be preserved on document change.By Default the document controls are not kept on document change.
- Specified by:
isPreserveRenderControlsOnDocumentChangein interfaceClientConfiguration- Returns:
- whether the document controls should be kept on document change
-
setPreserveRenderControlsOnDocumentChange
public void setPreserveRenderControlsOnDocumentChange(boolean preserveRenderControlsOnDocumentChange) Description copied from interface:ClientConfigurationSets whether the document controls should be preserved on document change.By Default the document controls are not kept on document change.
- Specified by:
setPreserveRenderControlsOnDocumentChangein interfaceClientConfiguration- Parameters:
preserveRenderControlsOnDocumentChange-trueif the document controls should be kept on document change otherwisefalse
-
setIsAnnotationEditorWidgetUsed
public void setIsAnnotationEditorWidgetUsed(boolean useAnnotationEditorWidget) Description copied from interface:ClientConfigurationSet whether a position editor widget is added to the per-annotation toolbar.- Specified by:
setIsAnnotationEditorWidgetUsedin interfaceClientConfiguration- Parameters:
useAnnotationEditorWidget- true if the widget should be added.
-
isAnnotationEditorWidgetUsed
public boolean isAnnotationEditorWidgetUsed()Description copied from interface:ClientConfigurationWhether a position editor widget is added to the per-annotation toolbar.- Specified by:
isAnnotationEditorWidgetUsedin interfaceClientConfiguration- Returns:
- Is the widget added?
-
setIsBetterTextAnnoRenderingUsed
public void setIsBetterTextAnnoRenderingUsed(boolean useBetterTextAnnoRendering) Description copied from interface:ClientConfigurationSet whether the improved text annotation font scaling is used or not.- Specified by:
setIsBetterTextAnnoRenderingUsedin interfaceClientConfiguration- Parameters:
useBetterTextAnnoRendering- true if the new font scaling should be used
-
isBetterTextAnnoRenderingUsed
public boolean isBetterTextAnnoRenderingUsed()Description copied from interface:ClientConfigurationWhether the improved text annotation font scaling is used or not.- Specified by:
isBetterTextAnnoRenderingUsedin interfaceClientConfiguration- Returns:
- Is the new font scaling used?
-
setIsCrossInstanceDragAndDropEnabled
public void setIsCrossInstanceDragAndDropEnabled(boolean isCrossInstanceDragAndDropEnabled) Description copied from interface:ClientConfigurationSet 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.- Specified by:
setIsCrossInstanceDragAndDropEnabledin interfaceClientConfiguration- Parameters:
isCrossInstanceDragAndDropEnabled- true if the DND should be used
-
isCrossInstanceDragAndDropEnabled
public boolean isCrossInstanceDragAndDropEnabled()Description copied from interface:ClientConfigurationWhether the drag and drop across different instances is enabled or not.- Specified by:
isCrossInstanceDragAndDropEnabledin interfaceClientConfiguration- Returns:
- true if DND should be used, false otherwise
-
setIsShowPageCountOnTouchKnobWidget
public void setIsShowPageCountOnTouchKnobWidget(boolean showPageCountOnTouchKnobWidget) Description copied from interface:ClientConfigurationSet 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()- Specified by:
setIsShowPageCountOnTouchKnobWidgetin interfaceClientConfiguration- Parameters:
showPageCountOnTouchKnobWidget- true if the popup should be shown upon a document change
-
isShowPageCountOnTouchKnobWidget
public boolean isShowPageCountOnTouchKnobWidget()- Specified by:
isShowPageCountOnTouchKnobWidgetin interfaceClientConfiguration
-
useLigatureIconFont
public boolean useLigatureIconFont()Description copied from interface:ClientConfigurationWhether the icon font used in JWV-compatible manner by using ligatures instead of classes.- Specified by:
useLigatureIconFontin interfaceClientConfiguration- Returns:
- true if the ligatures should be used.
-
setUseLigatureIconFont
public void setUseLigatureIconFont(boolean useLigatureIconFont) Description copied from interface:ClientConfigurationSets whether the icon font used in JWV-compatible manner by using ligatures instead of classes.- Specified by:
setUseLigatureIconFontin interfaceClientConfiguration- Parameters:
useLigatureIconFont- true if the DND should be used
-
setIsTextContentStreaming
public void setIsTextContentStreaming(boolean isTextContentStreaming) Description copied from interface:ClientConfigurationTheTextService#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.- Specified by:
setIsTextContentStreamingin interfaceClientConfiguration- Parameters:
isTextContentStreaming- whether to stream or not
-
isTextContentStreaming
public boolean isTextContentStreaming()- Specified by:
isTextContentStreamingin interfaceClientConfiguration
-
isUseAutomaticRenderControls
public boolean isUseAutomaticRenderControls()Description copied from interface:ClientConfigurationIndicates if by default the serialized render controls are set to the document properties before calling a server-operation.- Specified by:
isUseAutomaticRenderControlsin interfaceClientConfiguration- Returns:
-
setUseAutomaticRenderControls
public void setUseAutomaticRenderControls(boolean useAutomaticRenderControls) Description copied from interface:ClientConfigurationControls if by default the serialized render controls are set to the document properties before calling a server-operation.- Specified by:
setUseAutomaticRenderControlsin interfaceClientConfiguration- Parameters:
useAutomaticRenderControls-
-
isAnimationEnabled
public boolean isAnimationEnabled()Description copied from interface:ClientConfigurationIndicates if GWTs setAnimationEnabled is used whenever possible or not- Specified by:
isAnimationEnabledin interfaceClientConfiguration- Returns:
- true if animations should be used, false otherwise
-
setAnimationEnabled
public void setAnimationEnabled(boolean animationEnabled) Description copied from interface:ClientConfigurationTurn on or off GWTs animations for popups and dialogs- Specified by:
setAnimationEnabledin interfaceClientConfiguration- Parameters:
animationEnabled- whether turn it on or off
-
getRootPanelId
Description copied from interface:ClientConfigurationThis 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.- Specified by:
getRootPanelIdin interfaceClientConfiguration- Returns:
- the id of the RootPanel or null for default
-
setRootPanelId
Description copied from interface:ClientConfigurationThis 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.- Specified by:
setRootPanelIdin interfaceClientConfiguration- Parameters:
rootPanelId- the id of the RootPanel or null for default
-
setMouseWheelSpeed
public void setMouseWheelSpeed(int mouseWheelSpeed) Description copied from interface:ClientConfigurationAlter 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.- Specified by:
setMouseWheelSpeedin interfaceClientConfiguration- Parameters:
mouseWheelSpeed- how fast should a movement on the mouse wheel scroll thePageView?
-
getMouseWheelSpeed
public int getMouseWheelSpeed()Description copied from interface:ClientConfigurationSee theClientConfiguration.setMouseWheelSpeed(int)documentation for further info.- Specified by:
getMouseWheelSpeedin interfaceClientConfiguration
-
isPersistentViewId
public boolean isPersistentViewId()- Specified by:
isPersistentViewIdin interfaceClientConfiguration
-
setPersistentViewId
public void setPersistentViewId(boolean persistentViewId) - Specified by:
setPersistentViewIdin interfaceClientConfiguration
-