java.lang.Object | |
↳ | com.pspdfkit.document.OutlineElement.Builder |
Builder for OutlineElement
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builder(String title)
Creates the builder with default properties.
| |||||||||||
Builder(PdfDocument document, String title, int targetPageIndex)
Creates the builder for outline element that represents element in a table of contents.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
OutlineElement |
build()
Builds the outline element with data set on this builder.
| ||||||||||
OutlineElement.Builder |
setAction(Action action)
Sets action that will be executed when clicking on this outline element.
| ||||||||||
OutlineElement.Builder |
setChildren(List<OutlineElement> children)
Sets element children - outline elements are organized in a tree-like fashion.
| ||||||||||
OutlineElement.Builder |
setColor(int textColor)
Sets outline element text color.
| ||||||||||
OutlineElement.Builder |
setExpanded(boolean isExpanded)
Expands/collapses the outline element.
| ||||||||||
OutlineElement.Builder |
setPageLabel(String pageLabel)
Sets page label of the target page if one exists and outline action is
GoToAction | ||||||||||
OutlineElement.Builder |
setStyle(int textStyle)
Sets outline element text style.
| ||||||||||
OutlineElement.Builder |
setTitle(String title)
Sets outline title.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates the builder with default properties.
title | Outline element title. |
---|
Creates the builder for outline element that represents element in a table of contents.
Builder will be prefilled with resolved label for the target page and an action (GoToAction
for switching to targetPageIndex
.
document | Document used for resolving target page label. |
---|---|
title | Outline element title. |
targetPageIndex | Target page index. |
Builds the outline element with data set on this builder.
OutlineElement
.
Sets action that will be executed when clicking on this outline element.
action | Action tied to this outline element, may be null .
|
---|
Sets element children - outline elements are organized in a tree-like fashion.
children | Children of this outline element. |
---|
Sets outline element text color.
textColor | Color of the outline title text. |
---|
Expands/collapses the outline element.
isExpanded | true if the outline element is expanded, false
otherwise.
|
---|
Sets page label of the target page if one exists and outline action is GoToAction
pageLabel | Page label if applicable, null otherwise.
|
---|
Sets outline element text style.
textStyle | Style of the element, may be one of android.graphics.Typeface
class constants: NORMAL , BOLD , ITALIC or BOLD_ITALIC ,
|
---|
Sets outline title.
title | Human readable outline title. |
---|