java.lang.Object | |
↳ | com.pspdfkit.annotations.stamps.StampPickerItem.Builder |
Builder for creating custom stamps from PredefinedStampType
or custom String
stamp type.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
StampPickerItem |
build()
Build stamp item that can be used in
setAvailableStampPickerItems(List) . | ||||||||||
StampPickerItem.Builder |
withAppearanceStreamGenerator(AppearanceStreamGenerator appearanceStreamGenerator)
Sets appearance stream generator that replaces default stamp appearance.
| ||||||||||
StampPickerItem.Builder |
withDateTimeSubtitle(boolean addDate, boolean addTime)
Method for conveniently setting stamp subtitle to date, time or date-time string.
| ||||||||||
StampPickerItem.Builder |
withSize(float pdfWidth, float pdfHeight)
Sets default stamp width and height in pdf points.
| ||||||||||
StampPickerItem.Builder |
withSize(float pdfSize)
Sets default stamp size in pdf points.
| ||||||||||
StampPickerItem.Builder |
withSubtitle(String subtitle)
Sets text displayed in second line of the stamp.
| ||||||||||
StampPickerItem.Builder |
withTextColor(Integer textColor)
Sets text color of the stamp.
| ||||||||||
StampPickerItem.Builder |
withTitle(String title)
Sets custom text that replaces the default stamp text.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Build stamp item that can be used in setAvailableStampPickerItems(List)
.
Sets appearance stream generator that replaces default stamp appearance.
appearanceStreamGenerator | Generator for appearance stream that should replace
stamp's default appearance. Generator is expected to be Parcelable or an
exception will be thrown.
|
---|
Method for conveniently setting stamp subtitle to date, time or date-time string.
This method uses localized date-time formats DateFormat#getDateFormat(Context)
and DateFormat#getTimeFormat(Context)
. If both addDate
and addTime
flags are enabled created date-time string uses above formats separated by ", ".
If you want further control over stamp subtitle use withSubtitle(String)
to
set any string as stamp subtitle.
addDate | Add date portion to date-time string. |
---|---|
addTime | Add time portion to date-time string. |
Sets default stamp width and height in pdf points.
pdfWidth | Required stamp width in pdf points. |
---|---|
pdfHeight | Required stamp height in pdf points. |
Sets default stamp size in pdf points. This is equivalent to calling withSize(float, float)
with the same width and height parameters.
pdfSize | Required stamp width and height in pdf points. |
---|
Sets text displayed in second line of the stamp.
subtitle | Text displayed in second line of the stamp or null if second line
should not be displayed. |
---|
Sets text color of the stamp. Stamp's background color is calculated from this color to ensure that stamp text is visible.
textColor | Text color used for stamps title and subtitle. |
---|
Sets custom text that replaces the default stamp text.
title | Title or null to clear title to display default stamp text. |
---|