Class DefaultClientConfiguration
- All Implemented Interfaces:
ClientConfiguration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the maximum number of concurrentTile
requests that a client can request on a jadice web toolkit server.Returns the maximum allowed zoom value.Returns the minimum allowed zoom value.int
See theClientConfiguration.setMouseWheelSpeed(int)
documentation for further info.int
The 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.boolean
Indicates if GWTs setAnimationEnabled is used whenever possible or notboolean
Whether a position editor widget is added to the per-annotation toolbar.boolean
Whether the improved text annotation font scaling is used or not.boolean
Whether the drag and drop across different instances is enabled or not.boolean
Gets whether text editors of text based annotations should be focused by the browser.boolean
Whether icon fonts should be used when rendering images on toolbar buttons.boolean
Returns whether the document controls should be preserved on document change.boolean
boolean
boolean
Indicates if by default the serialized render controls are set to the document properties before calling a server-operation.void
setAnimationEnabled
(boolean animationEnabled) Turn on or off GWTs animations for popups and dialogsvoid
setFocusTextEditor
(boolean focusTextEditor) Sets whether text editors of text based annotations should be focused by the browser.void
setIsAnnotationEditorWidgetUsed
(boolean useAnnotationEditorWidget) Set whether a position editor widget is added to the per-annotation toolbar.void
setIsBetterTextAnnoRenderingUsed
(boolean useBetterTextAnnoRendering) Set whether the improved text annotation font scaling is used or not.void
setIsCrossInstanceDragAndDropEnabled
(boolean isCrossInstanceDragAndDropEnabled) Set whether the drag and drop across different instances is enabled or not.void
setIsIconFontUsed
(boolean useIconFont) Sets whether icon fonts should be used or not.void
setIsShowPageCountOnTouchKnobWidget
(boolean showPageCountOnTouchKnobWidget) Set whether theTouchKnobWidget
should show a popup upon each document change, where the amount of pages is shown for a short period.void
setIsTextContentStreaming
(boolean isTextContentStreaming) TheTextService#getTextContent(AbstractInvocationContext, PageSegmentHandle, String)
by default gets one result ofCollection<Block>
from the server.void
setMaxParallelTileRequests
(int maxRequestCount) Sets the maximum number ofTile
requests that a client can have running on a jadice web toolkit server at the same time.void
setMaxZoomFactor
(float maxZoom) Sets the maximum allowed zoom value.void
setMinZoomFactor
(float minZoom) Sets the minimum allowed zoom value.void
setMouseWheelSpeed
(int mouseWheelSpeed) Alter the speed when using theMouseWheelScrollTool
Previously, this value was 10, which turned out to be too slow in the combination of using theMouseWheelScrollTool
andViewerBuilder.setHasNativeScrollbars(boolean)
with value false.void
setPreserveRenderControlsOnDocumentChange
(boolean preserveRenderControlsOnDocumentChange) Sets whether the document controls should be preserved on document change.void
setQualityEnhancement
(int qualityInPercent) Allows tuning the render quality for modern high-resolution displays and for high browser zoom levels (120% and more).void
setRootPanelId
(String rootPanelId) This ID is used whenever the GWT-RootPanel.get(String)
-Method is used.void
setUseAutomaticRenderControls
(boolean useAutomaticRenderControls) Controls if by default the serialized render controls are set to the document properties before calling a server-operation.void
setUseLigatureIconFont
(boolean useLigatureIconFont) Sets whether the icon font used in JWV-compatible manner by using ligatures instead of classes.boolean
Whether 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:ClientConfiguration
Sets whether icon fonts should be used or not. If not theImageResource
s configured in theUIStyle
are used.- Specified by:
setIsIconFontUsed
in 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:ClientConfiguration
Whether icon fonts should be used when rendering images on toolbar buttons. If not theImageResource
s configured in theUIStyle
are used.- Specified by:
isIconFontUsed
in interfaceClientConfiguration
- Returns:
- whether icon fonts should be used
-
setMaxParallelTileRequests
public void setMaxParallelTileRequests(int maxRequestCount) Description copied from interface:ClientConfiguration
Sets the maximum number ofTile
requests that a client can have running on a jadice web toolkit server at the same time.- Specified by:
setMaxParallelTileRequests
in interfaceClientConfiguration
- Parameters:
maxRequestCount
- the number of requests
-
getMaxParallelTileRequests
public int getMaxParallelTileRequests()Description copied from interface:ClientConfiguration
Gets the maximum number of concurrentTile
requests that a client can request on a jadice web toolkit server.- Specified by:
getMaxParallelTileRequests
in interfaceClientConfiguration
- Returns:
- the number of allowed maximum parallel tile requests
-
getQualityEnhancement
public int getQualityEnhancement()Description copied from interface:ClientConfiguration
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).- Specified by:
getQualityEnhancement
in 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:ClientConfiguration
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.
- Specified by:
setQualityEnhancement
in 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:ClientConfiguration
Sets the maximum allowed zoom value.- Specified by:
setMaxZoomFactor
in interfaceClientConfiguration
- Parameters:
maxZoom
- the maximum allowed zoom value
-
getMaxZoomFactor
Description copied from interface:ClientConfiguration
Returns the maximum allowed zoom value.- Specified by:
getMaxZoomFactor
in interfaceClientConfiguration
- Returns:
- the maximum allowed zoom value
-
setMinZoomFactor
public void setMinZoomFactor(float minZoom) Description copied from interface:ClientConfiguration
Sets the minimum allowed zoom value.- Specified by:
setMinZoomFactor
in interfaceClientConfiguration
- Parameters:
minZoom
- the minimum allowed zoom value
-
getMinZoomFactor
Description copied from interface:ClientConfiguration
Returns the minimum allowed zoom value.- Specified by:
getMinZoomFactor
in interfaceClientConfiguration
- Returns:
- the minimum allowed zoom value
-
isFocusTextEditor
public boolean isFocusTextEditor()Description copied from interface:ClientConfiguration
Gets 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:
isFocusTextEditor
in 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:ClientConfiguration
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:
true
A 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:
setFocusTextEditor
in 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:ClientConfiguration
Returns whether the document controls should be preserved on document change.By Default the document controls are not kept on document change.
- Specified by:
isPreserveRenderControlsOnDocumentChange
in interfaceClientConfiguration
- Returns:
- whether the document controls should be kept on document change
-
setPreserveRenderControlsOnDocumentChange
public void setPreserveRenderControlsOnDocumentChange(boolean preserveRenderControlsOnDocumentChange) Description copied from interface:ClientConfiguration
Sets whether the document controls should be preserved on document change.By Default the document controls are not kept on document change.
- Specified by:
setPreserveRenderControlsOnDocumentChange
in interfaceClientConfiguration
- Parameters:
preserveRenderControlsOnDocumentChange
-true
if the document controls should be kept on document change otherwisefalse
-
setIsAnnotationEditorWidgetUsed
public void setIsAnnotationEditorWidgetUsed(boolean useAnnotationEditorWidget) Description copied from interface:ClientConfiguration
Set whether a position editor widget is added to the per-annotation toolbar.- Specified by:
setIsAnnotationEditorWidgetUsed
in interfaceClientConfiguration
- Parameters:
useAnnotationEditorWidget
- true if the widget should be added.
-
isAnnotationEditorWidgetUsed
public boolean isAnnotationEditorWidgetUsed()Description copied from interface:ClientConfiguration
Whether a position editor widget is added to the per-annotation toolbar.- Specified by:
isAnnotationEditorWidgetUsed
in interfaceClientConfiguration
- Returns:
- Is the widget added?
-
setIsBetterTextAnnoRenderingUsed
public void setIsBetterTextAnnoRenderingUsed(boolean useBetterTextAnnoRendering) Description copied from interface:ClientConfiguration
Set whether the improved text annotation font scaling is used or not.- Specified by:
setIsBetterTextAnnoRenderingUsed
in interfaceClientConfiguration
- Parameters:
useBetterTextAnnoRendering
- true if the new font scaling should be used
-
isBetterTextAnnoRenderingUsed
public boolean isBetterTextAnnoRenderingUsed()Description copied from interface:ClientConfiguration
Whether the improved text annotation font scaling is used or not.- Specified by:
isBetterTextAnnoRenderingUsed
in interfaceClientConfiguration
- Returns:
- Is the new font scaling used?
-
setIsCrossInstanceDragAndDropEnabled
public void setIsCrossInstanceDragAndDropEnabled(boolean isCrossInstanceDragAndDropEnabled) Description copied from interface:ClientConfiguration
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.- Specified by:
setIsCrossInstanceDragAndDropEnabled
in interfaceClientConfiguration
- Parameters:
isCrossInstanceDragAndDropEnabled
- true if the DND should be used
-
isCrossInstanceDragAndDropEnabled
public boolean isCrossInstanceDragAndDropEnabled()Description copied from interface:ClientConfiguration
Whether the drag and drop across different instances is enabled or not.- Specified by:
isCrossInstanceDragAndDropEnabled
in interfaceClientConfiguration
- Returns:
- true if DND should be used, false otherwise
-
setIsShowPageCountOnTouchKnobWidget
public void setIsShowPageCountOnTouchKnobWidget(boolean showPageCountOnTouchKnobWidget) Description copied from interface:ClientConfiguration
Set whether theTouchKnobWidget
should 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:
setIsShowPageCountOnTouchKnobWidget
in interfaceClientConfiguration
- Parameters:
showPageCountOnTouchKnobWidget
- true if the popup should be shown upon a document change
-
isShowPageCountOnTouchKnobWidget
public boolean isShowPageCountOnTouchKnobWidget()- Specified by:
isShowPageCountOnTouchKnobWidget
in interfaceClientConfiguration
-
useLigatureIconFont
public boolean useLigatureIconFont()Description copied from interface:ClientConfiguration
Whether the icon font used in JWV-compatible manner by using ligatures instead of classes.- Specified by:
useLigatureIconFont
in interfaceClientConfiguration
- Returns:
- true if the ligatures should be used.
-
setUseLigatureIconFont
public void setUseLigatureIconFont(boolean useLigatureIconFont) Description copied from interface:ClientConfiguration
Sets whether the icon font used in JWV-compatible manner by using ligatures instead of classes.- Specified by:
setUseLigatureIconFont
in interfaceClientConfiguration
- Parameters:
useLigatureIconFont
- true if the DND should be used
-
setIsTextContentStreaming
public void setIsTextContentStreaming(boolean isTextContentStreaming) Description copied from interface:ClientConfiguration
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 theboolean
to true will fetch theblocks
one by one and not as a whole collection, to stay below the 64KB.- Specified by:
setIsTextContentStreaming
in interfaceClientConfiguration
- Parameters:
isTextContentStreaming
- whether to stream or not
-
isTextContentStreaming
public boolean isTextContentStreaming()- Specified by:
isTextContentStreaming
in interfaceClientConfiguration
-
isUseAutomaticRenderControls
public boolean isUseAutomaticRenderControls()Description copied from interface:ClientConfiguration
Indicates if by default the serialized render controls are set to the document properties before calling a server-operation.- Specified by:
isUseAutomaticRenderControls
in interfaceClientConfiguration
- Returns:
-
setUseAutomaticRenderControls
public void setUseAutomaticRenderControls(boolean useAutomaticRenderControls) Description copied from interface:ClientConfiguration
Controls if by default the serialized render controls are set to the document properties before calling a server-operation.- Specified by:
setUseAutomaticRenderControls
in interfaceClientConfiguration
- Parameters:
useAutomaticRenderControls
-
-
isAnimationEnabled
public boolean isAnimationEnabled()Description copied from interface:ClientConfiguration
Indicates if GWTs setAnimationEnabled is used whenever possible or not- Specified by:
isAnimationEnabled
in interfaceClientConfiguration
- Returns:
- true if animations should be used, false otherwise
-
setAnimationEnabled
public void setAnimationEnabled(boolean animationEnabled) Description copied from interface:ClientConfiguration
Turn on or off GWTs animations for popups and dialogs- Specified by:
setAnimationEnabled
in interfaceClientConfiguration
- Parameters:
animationEnabled
- whether turn it on or off
-
getRootPanelId
Description copied from interface:ClientConfiguration
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.- Specified by:
getRootPanelId
in interfaceClientConfiguration
- Returns:
- the id of the RootPanel or null for default
-
setRootPanelId
Description copied from interface:ClientConfiguration
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.- Specified by:
setRootPanelId
in interfaceClientConfiguration
- Parameters:
rootPanelId
- the id of the RootPanel or null for default
-
setMouseWheelSpeed
public void setMouseWheelSpeed(int mouseWheelSpeed) Description copied from interface:ClientConfiguration
Alter the speed when using theMouseWheelScrollTool
Previously, this value was 10, which turned out to be too slow in the combination of using theMouseWheelScrollTool
andViewerBuilder.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:
setMouseWheelSpeed
in interfaceClientConfiguration
- Parameters:
mouseWheelSpeed
- how fast should a movement on the mouse wheel scroll thePageView
?
-
getMouseWheelSpeed
public int getMouseWheelSpeed()Description copied from interface:ClientConfiguration
See theClientConfiguration.setMouseWheelSpeed(int)
documentation for further info.- Specified by:
getMouseWheelSpeed
in interfaceClientConfiguration
-