Interface ClientConfiguration

All Known Implementing Classes:
DefaultClientConfiguration

public interface ClientConfiguration
Holds the set of global jadice web toolkit client configuration properties.

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 Type
    Method
    Description
    int
    Gets the maximum number of concurrent Tile 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
    The render quality enhancement for modern high-resolution displays and for high browser zoom levels (120% and more).
    boolean
    Indicates if GWTs setAnimationEnabled is used whenever possible or not
    boolean
    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 dialogs
    void
    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 the TouchKnobWidget should show a popup upon each document change, where the amount of pages is shown for a short period.
    void
    setIsTextContentStreaming(boolean isTextContentStreaming)
    The TextService#getTextContent(AbstractInvocationContext, PageSegmentHandle, String) by default gets one result of Collection<Block> from the server.
    void
    setMaxParallelTileRequests(int maxRequestCount)
    Sets the maximum number of Tile 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
    setPreserveRenderControlsOnDocumentChange(boolean keepDocumentControlsOnDocumentChange)
    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
    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.
  • Method Details

    • setIsIconFontUsed

      void setIsIconFontUsed(boolean useIconFont)
      Sets whether icon fonts should be used or not. If not the ImageResources configured in the UIStyle are 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 the ImageResources configured in the UIStyle are used.
      Returns:
      whether icon fonts should be used
    • setMaxParallelTileRequests

      void setMaxParallelTileRequests(int maxRequestCount)
      Sets the maximum number of Tile requests 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 concurrent Tile requests 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: 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.
      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 - true if the document controls should be kept on document change otherwise false
    • 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 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()
      Parameters:
      showPageCountOnTouchKnobWidget - true if the popup should be shown upon a document change
    • isShowPageCountOnTouchKnobWidget

      boolean isShowPageCountOnTouchKnobWidget()
    • setIsTextContentStreaming

      void setIsTextContentStreaming(boolean isTextContentStreaming)
      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.
      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 -