Class 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 Detail

      • DefaultClientConfiguration

        public DefaultClientConfiguration()
    • Method Detail

      • 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
      • 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
      • 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.
      • 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