Class DefaultClientConfiguration

java.lang.Object
com.levigo.jadice.web.client.config.DefaultClientConfiguration
All Implemented Interfaces:
ClientConfiguration

public class DefaultClientConfiguration extends Object implements ClientConfiguration
A default, "hard-coded" implementation of a class holding a bunch of properties used by the jadice web toolkit client.
  • 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 the ImageResources configured in the UIStyle are used.
      Specified by:
      setIsIconFontUsed in interface ClientConfiguration
      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 the ImageResources configured in the UIStyle are used.
      Specified by:
      isIconFontUsed in interface ClientConfiguration
      Returns:
      whether icon fonts should be used
    • setMaxParallelTileRequests

      public void setMaxParallelTileRequests(int maxRequestCount)
      Description copied from interface: ClientConfiguration
      Sets the maximum number of Tile requests that a client can have running on a jadice web toolkit server at the same time.
      Specified by:
      setMaxParallelTileRequests in interface ClientConfiguration
      Parameters:
      maxRequestCount - the number of requests
    • getMaxParallelTileRequests

      public int getMaxParallelTileRequests()
      Description copied from interface: ClientConfiguration
      Gets the maximum number of concurrent Tile requests that a client can request on a jadice web toolkit server.
      Specified by:
      getMaxParallelTileRequests in interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      Parameters:
      maxZoom - the maximum allowed zoom value
    • getMaxZoomFactor

      public Float getMaxZoomFactor()
      Description copied from interface: ClientConfiguration
      Returns the maximum allowed zoom value.
      Specified by:
      getMaxZoomFactor in interface ClientConfiguration
      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 interface ClientConfiguration
      Parameters:
      minZoom - the minimum allowed zoom value
    • getMinZoomFactor

      public Float getMinZoomFactor()
      Description copied from interface: ClientConfiguration
      Returns the minimum allowed zoom value.
      Specified by:
      getMinZoomFactor in interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      Parameters:
      preserveRenderControlsOnDocumentChange - true if the document controls should be kept on document change otherwise false
    • 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 interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      Returns:
      true if DND should be used, false otherwise
    • setIsShowPageCountOnTouchKnobWidget

      public void setIsShowPageCountOnTouchKnobWidget(boolean showPageCountOnTouchKnobWidget)
      Description copied from interface: ClientConfiguration
      Set whether the TouchKnobWidget 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 interface ClientConfiguration
      Parameters:
      showPageCountOnTouchKnobWidget - true if the popup should be shown upon a document change
    • isShowPageCountOnTouchKnobWidget

      public boolean isShowPageCountOnTouchKnobWidget()
      Specified by:
      isShowPageCountOnTouchKnobWidget in interface ClientConfiguration
    • 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 interface ClientConfiguration
      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 interface ClientConfiguration
      Parameters:
      useLigatureIconFont - true if the DND should be used
    • setIsTextContentStreaming

      public void setIsTextContentStreaming(boolean isTextContentStreaming)
      Description copied from interface: ClientConfiguration
      The TextService#getTextContent(AbstractInvocationContext, PageSegmentHandle, String) by default gets one result of Collection<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 the boolean to true will fetch the blocks one by one and not as a whole collection, to stay below the 64KB.
      Specified by:
      setIsTextContentStreaming in interface ClientConfiguration
      Parameters:
      isTextContentStreaming - whether to stream or not
    • isTextContentStreaming

      public boolean isTextContentStreaming()
      Specified by:
      isTextContentStreaming in interface ClientConfiguration
    • 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 interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      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 interface ClientConfiguration
      Parameters:
      animationEnabled - whether turn it on or off