public interface CommentLayerComponentController<T extends CommentLayerComponent>
CommentLayerComponent| Modifier and Type | Method and Description |
|---|---|
void |
addCommentIcon(T commentLayerComponent,
int x_Position,
int y_Position)
Appends new comment icon on the
commentLayercomponent at the x,y position. |
boolean |
canCreateComment()
Checks if current user can create new comment instances.
|
boolean |
canDeleteComment(CommentModel comment)
Evaluates if current user is eligible to delete the target comment instance.
|
boolean |
canEditComment(CommentModel comment)
Evaluates if current user can edit a comment behind the comment icon on the comment layer component.
|
boolean |
canMoveCommentIcon(CommentIcon icon)
Evaluates if current user can move given comment on the comment layer.
|
boolean |
canReplyToComment(CommentModel comment)
Evaluates if current user can reply to a comment behind the comment icon on the comment layer component.
|
void |
changeCommentLayerMode(CommentLayerContext context,
java.lang.String mode)
Changes the mode of all comment layer components in the context.
|
void |
changeCommentLayerMode(T component,
java.lang.String mode)
Changes the mode of the comment layer component.
|
void |
changeCommentLayerToDefaultMode(CommentLayerContext context)
Changes the mode of all comment layer components in the context to default mode.
|
void |
changeCommentLayerToDefaultMode(T component)
Changes the mode of the target comment layer component to default mode.
|
Menupopup |
createContextMenu(T component)
Creates context menu component for the right-click actions on the comment layer
|
Menupopup |
createIconContextMenu(T commentLayerComponent,
CommentIcon icon)
Creates context menu component for the right-click actions on the icons on comment layer
|
void |
deleteCommentFromCommentLayer(T component,
CommentIcon icon)
Removes the given icon from the target comment layer component.
|
void |
drawCommentLayerOverArea(HtmlBasedComponent parent,
T commentLayerComponent)
Draws the comment layer over the given parent
html component. |
void |
editCommentPopup(CommentLayerAwareModel model,
AbstractCommentModel abstractCommentModel)
Method for rendering popup for reply edit.
|
CommentIcon |
getCommentIconForComment(T component,
CommentModel comment)
Returns CommentIcon component for the given
CommentModel which is placed on the given
CommentLayerComponent; |
double[] |
getWidthAndHeight(CommentLayerComponent component,
double scaleFactor)
Return comment layer dimensions according to the given scale factor.
|
void |
moveCommentIcon(CommentLayerComponent commentLayerComponent,
CommentIcon icon,
int x_Position,
int y_Position)
Moves the target comment icon on the comment layer component to the target position (x, y).
|
CommentIcon |
refreshCommentIcon(CommentIcon icon)
Refreshes the instance of comment icon.
|
void |
refreshContextList(CommentLayerAwareModel commentLayerAwareModel,
boolean refreshItems)
Tries to perform refresh of the
ContextAreaCommentTreeComponent |
void |
replyComment(CommentLayerAwareModel model,
AbstractCommentModel abstractCommentModel)
Renders reply popup for the
AbstractCommentModel instance. |
void |
selectCommentIcon(T commentLayerComponent,
CommentIcon icon)
Marks the target icon as selected on the given comment layer component.
|
void changeCommentLayerMode(T component, java.lang.String mode)
component - CommentLayerComponentmode - - Please use one of the out-of-the-box modes or any other, customized mode.java.lang.IllegalArgumentException - if either component or mode is nullvoid changeCommentLayerMode(CommentLayerContext context, java.lang.String mode)
context - - CommentLayerContextmode - - Please use one of the out-of-the-box modes or any other, customized mode.void changeCommentLayerToDefaultMode(CommentLayerContext context)
context - - CommentLayerContextvoid changeCommentLayerToDefaultMode(T component)
component - CommentLayerComponentjava.lang.IllegalArgumentException - if either component or mode is nullvoid addCommentIcon(T commentLayerComponent, int x_Position, int y_Position)
commentLayercomponent at the x,y position. Calling this method
will create:
CommentLayerComponentModel.getCommentTarget() )CommentMetadataModel ) with the comment layer target item ( i.
e Page preview in print cockpit CommentLayerComponentModel.getCommentLayerTarget()).commentLayerComponent - - componentx_Position - - x position (left)y_Position - - y position (top)java.lang.IllegalArgumentException - if commentLayerComponent is null or either x or y is negative.void deleteCommentFromCommentLayer(T component, CommentIcon icon)
component - - Comment layer componenticon - - icon to removejava.lang.IllegalArgumentException - if either component or icon is nulljava.lang.IllegalStateException - if the target icon is not a child of the given comment layer component.void drawCommentLayerOverArea(HtmlBasedComponent parent,
T commentLayerComponent)
html component. Comment icons corresponding to the
current state of the model will also be drawn on the layer. The comments are found from the data base according to
the :
CommentLayerComponentModel.getCommentTarget() andCommentLayerComponentModel.getCommentLayerTarget()parent - - comment layer targetcommentLayerComponent - - comment layer to drawjava.lang.IllegalArgumentException - if either parent or commentLayerComponent is nullvoid selectCommentIcon(T commentLayerComponent, CommentIcon icon)
CommentIconModel.isSelected() is set to true and also currently selected icon is unselected.commentLayerComponent - - parent comment CommentLayerComponent component.icon - - icon to select.Menupopup createContextMenu(T component)
component - - comment layer componentjava.lang.IllegalArgumentException - if component is nullMenupopup createIconContextMenu(T commentLayerComponent, CommentIcon icon)
icon - - icon from a comment layer componentjava.lang.IllegalArgumentException - if icon or comment layer component is nullCommentIcon getCommentIconForComment(T component, CommentModel comment)
CommentModel which is placed on the given
CommentLayerComponent;CommentIcon or null if no such icon was found.boolean canEditComment(CommentModel comment)
boolean canReplyToComment(CommentModel comment)
CommentPermissionCheckStrategy, which can be customized per
project installation.comment - - target CommentModelboolean canCreateComment()
boolean canDeleteComment(CommentModel comment)
CommentPermissionCheckStrategy, which can be customized per project installation.comment - - target CommentModelboolean canMoveCommentIcon(CommentIcon icon)
icon - - target CommentIconvoid moveCommentIcon(CommentLayerComponent commentLayerComponent, CommentIcon icon, int x_Position, int y_Position)
commentLayerComponent - - CommentLayerComponenticon - - CommentIcon to be movedx_Position - - target x position (HtmlBasedComponent#setLeft(String))y_Position - - target x position (HtmlBasedComponent#setTop(String))void replyComment(CommentLayerAwareModel model, AbstractCommentModel abstractCommentModel)
AbstractCommentModel instance.model - - model of the active comment layerabstractCommentModel - - instance to replyCommentIcon refreshCommentIcon(CommentIcon icon)
CommentModel
instance residing in the CommentIconModel.icon - - CommentIcon to refreshCommentIconvoid editCommentPopup(CommentLayerAwareModel model, AbstractCommentModel abstractCommentModel)
model - - CommentLayerAwareModelabstractCommentModel - - AbstractCommentModel to editdouble[] getWidthAndHeight(CommentLayerComponent component, double scaleFactor)
component - - Comment layerscaleFactor - -target scale factorjava.lang.IllegalArgumentException - if component is null or scaleFactor is less or equal zero.void refreshContextList(CommentLayerAwareModel commentLayerAwareModel, boolean refreshItems)
ContextAreaCommentTreeComponentCopyright © 2018 SAP SE. All Rights Reserved.