Interface WebeditStatusNoteBuilder
@NonExtendable
public interface WebeditStatusNoteBuilder
Builder for a
WebeditStatusNote
.
WebeditStatusNote
note =context
.createNote
() .title
("Translation missing") .text
("This page is not translated yet.") .icon
(context
.requireSpecialist
(ImageAgent.TYPE
).getImageFromUrl
("module/translate.png")) .color
(WebeditColor.VANILLA
) .visibleOnLoad
(true) .addItem
(new TranslateActionItem()) .create
();
- Since:
- 5.2.516
- See Also:
-
Method Summary
Modifier and TypeMethodDescription@NotNull WebeditStatusNoteBuilder
addItem
(@NotNull WebeditStatusNoteItem item) Adds a item eligible for display in the status note's contextual setting.@NotNull WebeditStatusNoteBuilder
color
(@Nullable WebeditColor color) Sets the color associated with the status note to create.@NotNull WebeditStatusNote
create()
Creates a newWebeditStatusNote
based on the previously configured settings.@NotNull WebeditStatusNoteBuilder
Sets the icon associated with the status note to create.@NotNull WebeditStatusNoteBuilder
setItems
(@NotNull Collection<? extends WebeditStatusNoteItem> items) Sets the items eligible for display in the status note's contextual setting.@NotNull WebeditStatusNoteBuilder
Sets the text of the status note to create.@NotNull WebeditStatusNoteBuilder
Sets the title of the status note to create.@NotNull WebeditStatusNoteBuilder
visibleOnLoad
(boolean visibleOnLoad) Sets the initial visibility of the status note after the preview has been loaded.
-
Method Details
-
color
Sets the color associated with the status note to create.- Parameters:
color
- The color of the status information, ornull
.- Returns:
- This builder instance.
- Since:
- 5.2.516
-
icon
Sets the icon associated with the status note to create. UseImageAgent
to create anImage
instance.- Parameters:
icon
- The icon of the status information, ornull
.- Returns:
- This builder instance.
- Since:
- 5.2.516
-
title
Sets the title of the status note to create.- Parameters:
title
- The title of the status information.- Returns:
- This builder instance.
- Since:
- 5.2.516
-
text
Sets the text of the status note to create.- Parameters:
text
- The text of the status information, ornull
.- Returns:
- This builder instance.
- Since:
- 5.2.516
-
visibleOnLoad
Sets the initial visibility of the status note after the preview has been loaded. By default the status note will not be visible on preview load.- Parameters:
visibleOnLoad
- The initial visibility of the status information.- Returns:
- This builder instance.
- Since:
- 5.2.516
-
addItem
Adds a item eligible for display in the status note's contextual setting. Actions specified here will be displayed in the status note's UI.- Parameters:
item
- The item to be added- Returns:
- This builder instance.
- Since:
- 5.2.516
-
setItems
@NotNull @NotNull WebeditStatusNoteBuilder setItems(@NotNull @NotNull Collection<? extends WebeditStatusNoteItem> items) Sets the items eligible for display in the status note's contextual setting. Actions specified here will be displayed in the status note's UI.- Parameters:
items
- The items to be set- Returns:
- This builder instance.
- Since:
- 5.2.516
-
create
Creates a newWebeditStatusNote
based on the previously configured settings.- Returns:
- The new
WebeditStatusNote
instance. - Since:
- 5.2.516
-