Interface TextPropertyProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getPriority()
      Returns the priority of the TextPropertyProvider.
      String getText​(org.kie.workbench.common.stunner.core.graph.Element<? extends org.kie.workbench.common.stunner.core.graph.content.definition.Definition> element)
      Gets the text on the initialised Element.
      void setText​(AbstractCanvasHandler canvasHandler, org.kie.workbench.common.stunner.core.client.command.CanvasCommandManager<AbstractCanvasHandler> commandManager, org.kie.workbench.common.stunner.core.graph.Element<? extends org.kie.workbench.common.stunner.core.graph.content.definition.Definition> element, String text)
      Sets the text on the initialised Element.
      boolean supports​(org.kie.workbench.common.stunner.core.graph.Element<? extends org.kie.workbench.common.stunner.core.graph.content.definition.Definition> element)
      Returns whether the TextPropertyProvider supports a given Element.
    • Method Detail

      • supports

        boolean supports​(org.kie.workbench.common.stunner.core.graph.Element<? extends org.kie.workbench.common.stunner.core.graph.content.definition.Definition> element)
        Returns whether the TextPropertyProvider supports a given Element.
        Parameters:
        element - The element to check.
        Returns:
        true if supported otherwise false.
      • getText

        String getText​(org.kie.workbench.common.stunner.core.graph.Element<? extends org.kie.workbench.common.stunner.core.graph.content.definition.Definition> element)
        Gets the text on the initialised Element. {@see TextPropertyProvider.initialiseForReading} which should be called first.
        Parameters:
        element - The element for which to get the caption.
        Returns:
        The text to be shown as the caption.
      • setText

        void setText​(AbstractCanvasHandler canvasHandler,
                     org.kie.workbench.common.stunner.core.client.command.CanvasCommandManager<AbstractCanvasHandler> commandManager,
                     org.kie.workbench.common.stunner.core.graph.Element<? extends org.kie.workbench.common.stunner.core.graph.content.definition.Definition> element,
                     String text)
        Sets the text on the initialised Element. {@see TextPropertyProvider.initialiseForWriting} which should be called first.
        Parameters:
        canvasHandler - Required by CommandManager when executing Command's to update the Element's property.
        commandManager - A CommandManager with which to execute update commands.
        element - The element for which to update the property represented by the caption.
        text - The text shown as the caption.