-
- All Implemented Interfaces:
-
java.io.Serializable
public final class DocumentScannerConfiguration implements Serializable
A configuration class used to alter the default scan behaviour.
Refer to the documentation for more details.
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanallowCaptureModeSettingprivate BooleanautoCaptureprivate ScanFilterdefaultScanFilterprivate PageEditConfigurationpageEditConfigprivate Integerthemeprivate IntegeronboardingImageSourceprivate ColorConfigurationcolorConfigprivate Sourcesourceprivate List<File>sourceImagesprivate BooleanautoCropprivate BooleanmultiPageprivate BooleanpreCaptureFocusprivate TextConfigurationtextConfigprivate ButtonConfigurationbuttonConfigprivate BooleanconfirmPagesprivate BooleanallowPageEditing
-
Constructor Summary
Constructors Constructor Description DocumentScannerConfiguration()
-
Method Summary
Modifier and Type Method Description final BooleangetAllowCaptureModeSetting()If true, the toolbar will display an Item allowing the user to switch between auto capture and manual capture. final UnitsetAllowCaptureModeSetting(Boolean allowCaptureModeSetting)If true, the toolbar will display an Item allowing the user to switch between auto capture and manual capture. final BooleangetAutoCapture()final UnitsetAutoCapture(Boolean autoCapture)final ScanFiltergetDefaultScanFilter()final UnitsetDefaultScanFilter(ScanFilter defaultScanFilter)final PageEditConfigurationgetPageEditConfig()Configuration class used to alter the default page editing behaviour. final UnitsetPageEditConfig(PageEditConfiguration pageEditConfig)Configuration class used to alter the default page editing behaviour. final IntegergetTheme()Your custom theme if you like to change colors to match your branding. final UnitsetTheme(Integer theme)Your custom theme if you like to change colors to match your branding. final IntegergetOnboardingImageSource()Your custom image for the onboarding dialog that appears when scan is opened for the first time. final UnitsetOnboardingImageSource(Integer onboardingImageSource)Your custom image for the onboarding dialog that appears when scan is opened for the first time. final ColorConfigurationgetColorConfig()final UnitsetColorConfig(ColorConfiguration colorConfig)final SourcegetSource()Select the source for the document scanner. final UnitsetSource(Source source)Select the source for the document scanner. final List<File>getSourceImages()The source images for the document scanner if you have set the source to Source.IMAGE. final UnitsetSourceImages(List<File> sourceImages)The source images for the document scanner if you have set the source to Source.IMAGE. final BooleangetAutoCrop()If true, image gets automatically cropped if document was detected. final UnitsetAutoCrop(Boolean autoCrop)If true, image gets automatically cropped if document was detected. final BooleangetMultiPage()If true, scanning multi page documents is possible. final UnitsetMultiPage(Boolean multiPage)If true, scanning multi page documents is possible. final BooleangetPreCaptureFocus()If true, the camera will run a focus action right before taking the image. final UnitsetPreCaptureFocus(Boolean preCaptureFocus)If true, the camera will run a focus action right before taking the image. final TextConfigurationgetTextConfig()Configuration class used to alter the default text behaviour. final UnitsetTextConfig(TextConfiguration textConfig)Configuration class used to alter the default text behaviour. final ButtonConfigurationgetButtonConfig()Configuration class used to alter the default buttons. final UnitsetButtonConfig(ButtonConfiguration buttonConfig)Configuration class used to alter the default buttons. final BooleangetConfirmPages()If true, a list of all pages (thumbnails) will be displayed before the scan process can be finished. final UnitsetConfirmPages(Boolean confirmPages)If true, a list of all pages (thumbnails) will be displayed before the scan process can be finished. final BooleangetAllowPageEditing()If true, after the scan screen is finished, an editing screen with the captured images will be displayed. final UnitsetAllowPageEditing(Boolean allowPageEditing)If true, after the scan screen is finished, an editing screen with the captured images will be displayed. -
-
Method Detail
-
getAllowCaptureModeSetting
final Boolean getAllowCaptureModeSetting()
If true, the toolbar will display an Item allowing the user to switch between auto capture and manual capture. Defaults to false.
-
setAllowCaptureModeSetting
final Unit setAllowCaptureModeSetting(Boolean allowCaptureModeSetting)
If true, the toolbar will display an Item allowing the user to switch between auto capture and manual capture. Defaults to false.
-
getAutoCapture
final Boolean getAutoCapture()
-
setAutoCapture
final Unit setAutoCapture(Boolean autoCapture)
-
getDefaultScanFilter
final ScanFilter getDefaultScanFilter()
-
setDefaultScanFilter
final Unit setDefaultScanFilter(ScanFilter defaultScanFilter)
-
getPageEditConfig
final PageEditConfiguration getPageEditConfig()
Configuration class used to alter the default page editing behaviour.
-
setPageEditConfig
final Unit setPageEditConfig(PageEditConfiguration pageEditConfig)
Configuration class used to alter the default page editing behaviour.
-
getTheme
final Integer getTheme()
Your custom theme if you like to change colors to match your branding.
-
setTheme
final Unit setTheme(Integer theme)
Your custom theme if you like to change colors to match your branding.
-
getOnboardingImageSource
final Integer getOnboardingImageSource()
Your custom image for the onboarding dialog that appears when scan is opened for the first time.
-
setOnboardingImageSource
final Unit setOnboardingImageSource(Integer onboardingImageSource)
Your custom image for the onboarding dialog that appears when scan is opened for the first time.
-
getColorConfig
final ColorConfiguration getColorConfig()
-
setColorConfig
final Unit setColorConfig(ColorConfiguration colorConfig)
-
getSource
final Source getSource()
Select the source for the document scanner. Defaults to Source.CAMERA. See Source for possible values.
-
setSource
final Unit setSource(Source source)
Select the source for the document scanner. Defaults to Source.CAMERA. See Source for possible values.
-
getSourceImages
final List<File> getSourceImages()
The source images for the document scanner if you have set the source to Source.IMAGE.
-
setSourceImages
final Unit setSourceImages(List<File> sourceImages)
The source images for the document scanner if you have set the source to Source.IMAGE.
-
getAutoCrop
final Boolean getAutoCrop()
If true, image gets automatically cropped if document was detected. This applies only if source is Source.IMAGE or Source.GALLERY or Source.GALLERY_MULTIPLE. Defaults to true.
-
setAutoCrop
final Unit setAutoCrop(Boolean autoCrop)
If true, image gets automatically cropped if document was detected. This applies only if source is Source.IMAGE or Source.GALLERY or Source.GALLERY_MULTIPLE. Defaults to true.
-
getMultiPage
final Boolean getMultiPage()
If true, scanning multi page documents is possible. Set this to false if you need to scan single page documents. Defaults to true.
-
setMultiPage
final Unit setMultiPage(Boolean multiPage)
If true, scanning multi page documents is possible. Set this to false if you need to scan single page documents. Defaults to true.
-
getPreCaptureFocus
final Boolean getPreCaptureFocus()
If true, the camera will run a focus action right before taking the image. This improves the quality of the scanned images, but depending on the device, image capture might take a little bit longer. Defaults to true.
-
setPreCaptureFocus
final Unit setPreCaptureFocus(Boolean preCaptureFocus)
If true, the camera will run a focus action right before taking the image. This improves the quality of the scanned images, but depending on the device, image capture might take a little bit longer. Defaults to true.
-
getTextConfig
final TextConfiguration getTextConfig()
Configuration class used to alter the default text behaviour.
-
setTextConfig
final Unit setTextConfig(TextConfiguration textConfig)
Configuration class used to alter the default text behaviour.
-
getButtonConfig
final ButtonConfiguration getButtonConfig()
Configuration class used to alter the default buttons.
-
setButtonConfig
final Unit setButtonConfig(ButtonConfiguration buttonConfig)
Configuration class used to alter the default buttons.
-
getConfirmPages
final Boolean getConfirmPages()
If true, a list of all pages (thumbnails) will be displayed before the scan process can be finished. Defaults to false.
-
setConfirmPages
final Unit setConfirmPages(Boolean confirmPages)
If true, a list of all pages (thumbnails) will be displayed before the scan process can be finished. Defaults to false.
-
getAllowPageEditing
final Boolean getAllowPageEditing()
If true, after the scan screen is finished, an editing screen with the captured images will be displayed. On the editing screen, the user can crop manually, rotate the page, filter the page and much more. The editing screen can be configured by accessing the pageEditConfig. Defaults to true.
-
setAllowPageEditing
final Unit setAllowPageEditing(Boolean allowPageEditing)
If true, after the scan screen is finished, an editing screen with the captured images will be displayed. On the editing screen, the user can crop manually, rotate the page, filter the page and much more. The editing screen can be configured by accessing the pageEditConfig. Defaults to true.
-
-
-
-