Class SettingsOptions
-
- All Implemented Interfaces:
-
java.io.Serializable
public class SettingsOptions implements Serializable
Data class that represents the options to be shown in the SettingsDialog. Generally you wouldn't need to deal with this class, as it's automatically created by the internal PdfUi implementation from values of the active PdfConfiguration.
-
-
Field Summary
Fields Modifier and Type Field Description private PageScrollDirection
scrollDirection
private PageScrollMode
scrollMode
private PageLayoutMode
layoutMode
private ThemeMode
themeMode
private Long
screenTimeoutMillis
private final EnumSet<SettingsMenuItemType>
visibleItems
private Boolean
snapToPoint
private Boolean
snapToSelf
private Boolean
showSmartGuides
-
Constructor Summary
Constructors Constructor Description SettingsOptions(PageScrollDirection scrollDirection, PageScrollMode scrollMode, PageLayoutMode layoutMode, ThemeMode themeMode, Long screenTimeoutMillis, EnumSet<SettingsMenuItemType> visibleItems, Boolean snapToPoint, Boolean snapToSelf, Boolean showSmartGuides)
-
Method Summary
Modifier and Type Method Description final PageScrollDirection
getScrollDirection()
Set page scroll direction. final Unit
setScrollDirection(PageScrollDirection scrollDirection)
Set page scroll direction. final PageScrollMode
getScrollMode()
Continuous or paginated scrolling. final Unit
setScrollMode(PageScrollMode scrollMode)
Continuous or paginated scrolling. final PageLayoutMode
getLayoutMode()
Continuous or paginated scrolling. final Unit
setLayoutMode(PageLayoutMode layoutMode)
Continuous or paginated scrolling. final ThemeMode
getThemeMode()
Default or night theme. final Unit
setThemeMode(ThemeMode themeMode)
Default or night theme. final Long
getScreenTimeoutMillis()
Specifies the duration that needs to pass without user interaction until the screen is turned off. final Unit
setScreenTimeoutMillis(Long screenTimeoutMillis)
Specifies the duration that needs to pass without user interaction until the screen is turned off. final EnumSet<SettingsMenuItemType>
getVisibleItems()
Items that should be visible in the settings dialog. final Boolean
getSnapToPoint()
Enables snapping to page graphics for measurement tools. final Unit
setSnapToPoint(Boolean snapToPoint)
Enables snapping to page graphics for measurement tools. final Boolean
getSnapToSelf()
Enables snapping to itself at the end of shape drawing. final Unit
setSnapToSelf(Boolean snapToSelf)
Enables snapping to itself at the end of shape drawing. final Boolean
getShowSmartGuides()
Enables smart guides for predefined angles. final Unit
setShowSmartGuides(Boolean showSmartGuides)
Enables smart guides for predefined angles. final SettingsOptions
copy()
final Boolean
compare(SettingsOptions other)
String
toString()
-
-
Constructor Detail
-
SettingsOptions
SettingsOptions(PageScrollDirection scrollDirection, PageScrollMode scrollMode, PageLayoutMode layoutMode, ThemeMode themeMode, Long screenTimeoutMillis, EnumSet<SettingsMenuItemType> visibleItems, Boolean snapToPoint, Boolean snapToSelf, Boolean showSmartGuides)
-
-
Method Detail
-
getScrollDirection
final PageScrollDirection getScrollDirection()
Set page scroll direction. See PdfConfiguration.getScrollDirection
-
setScrollDirection
final Unit setScrollDirection(PageScrollDirection scrollDirection)
Set page scroll direction. See PdfConfiguration.getScrollDirection
-
getScrollMode
final PageScrollMode getScrollMode()
Continuous or paginated scrolling. See PdfConfiguration.getScrollMode
-
setScrollMode
final Unit setScrollMode(PageScrollMode scrollMode)
Continuous or paginated scrolling. See PdfConfiguration.getScrollMode
-
getLayoutMode
final PageLayoutMode getLayoutMode()
Continuous or paginated scrolling. See PdfConfiguration.getLayoutMode
-
setLayoutMode
final Unit setLayoutMode(PageLayoutMode layoutMode)
Continuous or paginated scrolling. See PdfConfiguration.getLayoutMode
-
getThemeMode
final ThemeMode getThemeMode()
Default or night theme. See PdfConfiguration.getThemeMode
-
setThemeMode
final Unit setThemeMode(ThemeMode themeMode)
Default or night theme. See PdfConfiguration.getThemeMode
-
getScreenTimeoutMillis
final Long getScreenTimeoutMillis()
Specifies the duration that needs to pass without user interaction until the screen is turned off. Use PdfUi.TIMEOUT_DEFAULT for the system default timeout and PdfUi.TIMEOUT_INFINITE to deactivate automatic screen off. Please notice, that this setting only works out of the box only if you're using PdfActivity (or a derived class from it). In case you're using PdfUiFragment you can forward Activity.onUserInteraction from your activity class.
@Override fun onUserInteraction() { super.onUserInteraction(); pdfUiFragment.implementation.onUserInteraction(); }
-
setScreenTimeoutMillis
final Unit setScreenTimeoutMillis(Long screenTimeoutMillis)
Specifies the duration that needs to pass without user interaction until the screen is turned off. Use PdfUi.TIMEOUT_DEFAULT for the system default timeout and PdfUi.TIMEOUT_INFINITE to deactivate automatic screen off. Please notice, that this setting only works out of the box only if you're using PdfActivity (or a derived class from it). In case you're using PdfUiFragment you can forward Activity.onUserInteraction from your activity class.
@Override fun onUserInteraction() { super.onUserInteraction(); pdfUiFragment.implementation.onUserInteraction(); }
-
getVisibleItems
final EnumSet<SettingsMenuItemType> getVisibleItems()
Items that should be visible in the settings dialog. See PdfActivityConfiguration.getSettingsMenuItemShown. Providing an empty set results in the same behavior as PdfActivityConfiguration.Builder.hideSettingsMenu and will remove the settings dialog item from the main options menu.
-
getSnapToPoint
final Boolean getSnapToPoint()
Enables snapping to page graphics for measurement tools.
-
setSnapToPoint
final Unit setSnapToPoint(Boolean snapToPoint)
Enables snapping to page graphics for measurement tools.
-
getSnapToSelf
final Boolean getSnapToSelf()
Enables snapping to itself at the end of shape drawing.
-
setSnapToSelf
final Unit setSnapToSelf(Boolean snapToSelf)
Enables snapping to itself at the end of shape drawing.
-
getShowSmartGuides
final Boolean getShowSmartGuides()
Enables smart guides for predefined angles.
-
setShowSmartGuides
final Unit setShowSmartGuides(Boolean showSmartGuides)
Enables smart guides for predefined angles.
-
copy
final SettingsOptions copy()
-
compare
final Boolean compare(SettingsOptions other)
-
-
-
-