Class BaseReshapeSettings

  • All Implemented Interfaces:
    com.levigo.jadice.document.MaybeSerializableProcessingSettings, com.levigo.jadice.document.ProcessingSettings, Serializable

    public class BaseReshapeSettings
    extends Object
    implements com.levigo.jadice.document.ProcessingSettings
    See Also:
    Serialized Form
    • Constructor Detail

      • BaseReshapeSettings

        public BaseReshapeSettings()
    • Method Detail

      • getPageSelection

        public int[] getPageSelection()
        Shaping option for page range selection. The value should be an array of int which are the page numbers to convert. The page number expected page numbers are 0 -based.
        Returns:
        0-based page selection or null
      • setPageSelection

        public void setPageSelection​(int[] pageSelection)
        Shaping option for page range selection. The value should be an array of int which are the page numbers to convert. The page number expected page numbers are 0 -based.
        Parameters:
        pageSelection - the 0-based page selection or null to reset the selection (select all pages)
      • setPageRotation

        public void setPageRotation​(int pageIndex,
                                    org.jadice.util.base.geometry.QuadrantRotation rotation)
        Specify the rotation for a page, identified by index. The pageIndex specified is the index after applying the page selection.

        Example:
        with a page selection of 4,5,7, and a page rotation for pageIndex=1, will rotate the second page of the document. The second page is, based on the page selection, page 5 in the original document.

        Parameters:
        pageIndex - the page index after applying the page selection
        rotation - rotation to apply
        Throws:
        IllegalArgumentException - if either pageIndex is a negative value or rotation is null
        Since:
        jadice server 5.7.0.0
      • getPageRotation

        public org.jadice.util.base.geometry.QuadrantRotation getPageRotation​(int pageIndex)
        Get the rotation for a page at the given pageIndex. The pageIndex is relative to the page selection. If no explicit rotation has been specified, the default value will be returned (QuadrantRotation.ROT_000).
        Parameters:
        pageIndex - the index of the page to receive the
        Returns:
        the specified rotation or the default rotation if no custom rotation has been specified
        Since:
        jadice server 5.7.0.0
      • hasPageRotation

        public boolean hasPageRotation​(int pageIndex)
        Checks whether a custom page rotation has been specified for the given pageIndex.
        Parameters:
        pageIndex - the index of the page to check for
        Returns:
        true if a page rotation has been specified. false otherwise.
        Since:
        jadice server 5.7.0.0
      • hasCustomPageRotations

        public boolean hasCustomPageRotations()
        Checks if there are custom page rotations specified. This method will check whether there have been any non zero page rotations applied
        Returns:
        true if there are any customized page rotations other that QuadrantRotation.ROT_000
        Since:
        jadice server 5.7.0.0
      • setStreamRenderingEnabled

        public void setStreamRenderingEnabled​(String streamUUID,
                                              boolean enabled)
        If a stream shall be loaded into a jadice document but not be rendered, it can be disabled specifying its UUID. The purpose of this method is to retrieve the page format.
        Parameters:
        streamUUID - The stream's UUID
        enabled - if true the stream will be rendered, if false it will not be rendered.
        See Also:
        StreamDescriptor.getUUID()
      • isStreamRenderingEnabled

        public boolean isStreamRenderingEnabled​(String streamUUID)
        Determine if a stream shall be rendered or not.
        Parameters:
        streamUUID - The streams UUID
        Returns:
        true if the stream shall be rendered, false if not rendered (but loaded)
      • isImageRepackingAllowed

        public boolean isImageRepackingAllowed()
        Determine if it is allowed to repack the image.
        Returns:
        true if it is allowed to repack the image, otherwise false.
      • setImageRepackingAllowed

        public void setImageRepackingAllowed​(boolean imageRepackingAllowed)
        Determine whether image repacking shall be allowed or not.
        Parameters:
        imageRepackingAllowed - true if it is allowed to repack the image, otherwise false.
      • createSnapshot

        public BaseReshapeSettings createSnapshot()
        Specified by:
        createSnapshot in interface com.levigo.jadice.document.MaybeSerializableProcessingSettings
        Specified by:
        createSnapshot in interface com.levigo.jadice.document.ProcessingSettings