Class PresentationElementRenderer

    • Constructor Detail

      • PresentationElementRenderer

        public PresentationElementRenderer()
    • Method Detail

      • beforeUpdate

        public void beforeUpdate​(PresentationElement presentationElement)
        Invoked right before presentation element update.
        Parameters:
        presentationElement - updating element.
      • afterUpdate

        public void afterUpdate​(PresentationElement presentationElement)
        Invoked right after presentation element update.
        Parameters:
        presentationElement - updating element.
      • propertiesChanged

        public void propertiesChanged​(PresentationElement presentationElement)
        Invoked when presentation element properties were changed.
        Parameters:
        presentationElement - properties of this element were updated.
      • getText

        public java.lang.String getText​(PresentationElement presentationElement,
                                        PresentationElementTextEnum textEnum)
        Provides the displayable text for the given presentation element. Override the method to display the custom text.
        Parameters:
        presentationElement - element to display text for.
        textEnum - describes the displayable text purpose (text is displayed as name, stereotypes, tags, or constraints).
        Returns:
        displayble text, or null to use the predefined text.
        See Also:
        PresentationElementTextEnum
      • getColor

        public java.awt.Color getColor​(PresentationElement presentationElement,
                                       PresentationElementColorEnum colorEnum)
        Provides the color used to draw presentation element. Override the method to use the custom color.
        Parameters:
        presentationElement - element to draw.
        colorEnum - describes the color purpose (color is used to draw lines, text, or fill shape).
        Returns:
        color, or null to use the predefined color.
        See Also:
        PresentationElementColorEnum
      • getFontProvider

        public FontProvider getFontProvider​(PresentationElement presentationElement)
        Returns the font provider. Provided font is used to display text. Override the method to use custom font.
        Parameters:
        presentationElement - presentation element to use font for.
        Returns:
        custom font provider, or null to use predefined font.
        See Also:
        FontProvider
      • getCenterlinePoint

        public java.awt.Point getCenterlinePoint​(PresentationElement presentationElement)
        Returns a point for centerline drawing. Override the method to use custom centerline point.
        Parameters:
        presentationElement - - element for which centerline point has to be retrieved.
        Returns:
        centerline point, or null to use predefined point.
      • updateText

        protected abstract void updateText​(PresentationElement presentationElement)
        Update the given presentation element text.
        Parameters:
        presentationElement -