Skip navigation links
de.hybris.platform.cockpit.components.mvc.commentlayer

Class CommentLayerComponent

    • Method Detail

      • refresh

        public void refresh(CommentLayerComponentModel model)
        Refreshes the component according to the current state in the model. Besides the width and height, it also sets the listeners according to the given state in the model. Refresh is propagated further to the contained components:
        • comment icons
        • canvas
        Parameters:
        model - - the state representation
      • refreshCanvas

        protected void refreshCanvas()
        Refreshes (if the comment layer component is in edit mode) or clears the canvas component.
      • refresh

        public void refresh()
        Refreshes the component according to the current state in the model. Besides the width and height, it also sets the listeners according to the current state in the model. Refresh is propagated further to the contained components:
        • comment icons
        • canvas
      • resize

        public void resize(double scaleFactor)
        Resizes the component according to the given scale factor. the dimensions are changed in the model, so the actual view will nor be changed until refresh() is called.
      • getIconComponents

        public java.util.List<CommentIcon> getIconComponents()
        Returns all comment icons components that are currently contained by this comment layer.
        Returns:
        List of CommentIcons
      • addIconComponent

        public boolean addIconComponent(CommentIcon icon)
        Adds new comment icon component to the comment layer.
        Parameters:
        icon - CommentIcon
      • removeIcon

        public boolean removeIcon(CommentIcon icon)
        Removes icon comment component from the comment layer.
        Parameters:
        icon - - icon to remove
      • containsComment

        public boolean containsComment(CommentModel commentModel)
        Returns true if this component contains given comment or false otherwise.
        Parameters:
        commentModel - comment to search for
      • getCommentIcon

        public CommentIcon getCommentIcon(java.lang.String id)
        Returns CommentIcon contained in this component and having target component id.
        Parameters:
        id - - commentIcon Id
      • getCanvas

        public Canvas getCanvas()
        Returns:
        the canvas element
      • appendCanvas

        public void appendCanvas(Canvas canvas)
        Appends canvas element to this comment layer component. It should be drawn over the component.
        Parameters:
        canvas - Canvas
      • getParent

        public HtmlBasedComponent getParent()
        Returns:
        the parent
      • getIconContextMenu

        protected Menupopup getIconContextMenu(CommentIcon icon)
      • setListeners

        protected void setListeners()

Copyright © 2018 SAP SE. All Rights Reserved.