Class BaseReshapeSettings
- java.lang.Object
-
- com.levigo.jadice.server.documentplatform.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 Summary
Constructors Constructor Description BaseReshapeSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BaseReshapeSettings
createSnapshot()
org.jadice.util.base.geometry.QuadrantRotation
getPageRotation(int pageIndex)
Get the rotation for a page at the givenpageIndex
.int[]
getPageSelection()
Shaping option for page range selection.boolean
hasCustomPageRotations()
Checks if there arecustom page rotations
specified.boolean
hasPageRotation(int pageIndex)
Checks whether a custompage rotation
has been specified for the givenpageIndex
.boolean
isImageRepackingAllowed()
Determine if it is allowed to repack the image.boolean
isStreamRenderingEnabled(String streamUUID)
Determine if a stream shall be rendered or not.void
setImageRepackingAllowed(boolean imageRepackingAllowed)
Determine whether image repacking shall be allowed or not.void
setPageRotation(int pageIndex, org.jadice.util.base.geometry.QuadrantRotation rotation)
Specify therotation
for a page, identified by index.void
setPageSelection(int[] pageSelection)
Shaping option for page range selection.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.
-
-
-
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 are0
-based.- Returns:
0
-based page selection ornull
-
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 are0
-based.- Parameters:
pageSelection
- the0
-based page selection ornull
to reset the selection (select all pages)
-
setPageRotation
public void setPageRotation(int pageIndex, org.jadice.util.base.geometry.QuadrantRotation rotation)
Specify therotation
for a page, identified by index. ThepageIndex
specified is the index after applying thepage selection
.Example:
with apage selection
of4,5,7
, and a page rotation forpageIndex=1
, will rotate the second page of the document. The second page is, based on thepage selection
, page 5 in the original document.- Parameters:
pageIndex
- the page index after applying thepage selection
rotation
- rotation to apply- Throws:
IllegalArgumentException
- if eitherpageIndex
is a negative value orrotation
isnull
- 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 givenpageIndex
. ThepageIndex
is relative to thepage selection
. If no explicitrotation
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 thedefault rotation
if no custom rotation has been specified - Since:
- jadice server 5.7.0.0
-
hasPageRotation
public boolean hasPageRotation(int pageIndex)
Checks whether a custompage rotation
has been specified for the givenpageIndex
.- Parameters:
pageIndex
- the index of the page to check for- Returns:
true
if apage rotation
has been specified.false
otherwise.- Since:
- jadice server 5.7.0.0
-
hasCustomPageRotations
public boolean hasCustomPageRotations()
Checks if there arecustom page rotations
specified. This method will check whether there have been anynon zero
page rotations
applied- Returns:
true
if there are any customized page rotations other thatQuadrantRotation.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 UUIDenabled
- iftrue
the stream will be rendered, iffalse
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, otherwisefalse
.
-
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, otherwisefalse
.
-
createSnapshot
public BaseReshapeSettings createSnapshot()
- Specified by:
createSnapshot
in interfacecom.levigo.jadice.document.MaybeSerializableProcessingSettings
- Specified by:
createSnapshot
in interfacecom.levigo.jadice.document.ProcessingSettings
-
-