| java.lang.Object | ||
| ↳ | AndroidViewModel | |
| ↳ | com.pdftron.pdf.widget.toolbar.component.AnnotationToolbarViewModel | |
View model in charge of handling the annotation toolbar's state
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| class | AnnotationToolbarViewModel.DisabledButtonTypes | Wraps our list of disabled ToolbarButtonType so that it's observable when changes happen. |
|||||||||
| class | AnnotationToolbarViewModel.DisabledToolModes | Wraps our list of disabled ToolManager.ToolMode so that
it's observable when changes happen. |
|||||||||
| class | AnnotationToolbarViewModel.ObservableAnnotationToolbarBuilder | Wraps AnnotationToolbarBuilder so it's observable when changes happen. | |||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AnnotationToolbarViewModel(Application application) | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
observeBuilderState(LifecycleOwner owner, Observe when the {link AnnotationToolbarBuilder} is changed.
| ||||||||||
| void |
observeDisabledToolModesState(LifecycleOwner owner, Observe when the set of disabled
ToolManager.ToolModes change. | ||||||||||
| void |
observeHiddenButtonTypesState(LifecycleOwner owner, Observe when the set of disabled
ToolbarButtonTypes change. | ||||||||||
| void |
setAnnotationToolbarBuilder(AnnotationToolbarBuilder builder)
Sets the
AnnotationToolbarBuilder associated with the annotation toolbar | ||||||||||
| void |
setToolModeFilter(Set<ToolManager.ToolMode> disabledToolModesSet)
Sets the set of
ToolManager.ToolMode that should be
disabled in the annotation toolbar. | ||||||||||
| void |
setToolbarButtonVisibility(ToolbarButtonType buttonType, boolean visibility)
Sets the visibility of toolbar buttons with given
ToolbarButtonType | ||||||||||
| void | updateState() | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Observe when the {link AnnotationToolbarBuilder} is changed.
| owner | The LifecycleOwner which controls the observer |
|---|---|
| observer | The observer that will receive the events |
Observe when the set of disabled ToolManager.ToolModes change.
| owner | The LifecycleOwner which controls the observer |
|---|---|
| observer | The observer that will receive the events |
Observe when the set of disabled ToolbarButtonTypes change.
| owner | The LifecycleOwner which controls the observer |
|---|---|
| observer | The observer that will receive the events |
Sets the AnnotationToolbarBuilder associated with the annotation toolbar
| builder | to set |
|---|
Sets the set of ToolManager.ToolMode that should be
disabled in the annotation toolbar.
| disabledToolModesSet | the set of ToolManager.ToolMode to disable
|
|---|
Sets the visibility of toolbar buttons with given ToolbarButtonType
| buttonType | the button type too set visibility |
|---|---|
| visibility | true if buttons should be visible, false otherwise |