com.spss.psapi.transform

Interface Comment

  • All Superinterfaces:
    PropertiedObject


    public interface Comment
    extends PropertiedObject
    This represents a comment in a stream. A comment can either be linked to nodes within a stream or exposes the annotation text of the stream.
    Since:
    PSAPI 18.1
    Author:
    Julian Clinton
    • Method Detail

      • getID

        java.lang.String getID()
        Returns the ID of this object. A new ID is created each time a new comment is created. The ID is persisted with the comment when it is saved as part of a stream so that when the stream is opened, the comment IDs are preserved.
        Returns:
        the ID of this object
      • getProcessorDiagram

        ProcessorDiagram getProcessorDiagram()
        Returns the ProcessorDiagram that owns this comment.
        Returns:
        the ProcessorDiagram that owns this comment
      • getText

        java.lang.String getText()
        Returns the comment text.
        Returns:
        the comment text
      • setText

        void setText(java.lang.String text)
        Sets the comment text.
        Parameters:
        text - the comment text
      • getXPosition

        int getXPosition()
        Returns the x position offset of the comment in the ProcessorDiagram.
        Returns:
        the x position
      • getYPosition

        int getYPosition()
        Returns the y position offset of the comment in the ProcessorDiagram.
        Returns:
        the y position
      • setXYPosition

        void setXYPosition(int x,
                         int y)
        Sets the position of the comment in the ProcessorDiagram.
        Parameters:
        x - the x offset
        y - the y offset
      • getWidth

        int getWidth()
        Returns the width of the comment in pixels.
        Returns:
        the width of the comment
      • getHeight

        int getHeight()
        Returns the height of the comment in pixels.
        Returns:
        the height of the comment
      • setSize

        void setSize(int width,
                   int height)
        Sets the size of the comment.
        Parameters:
        width - the width in pixels
        height - the height in pixels
      • isUseCustomColors

        boolean isUseCustomColors()
        Returns true if the comment is using custom colors i.e. those defined by the properties background_color and foreground_color.
        Returns:
        true if the comment is using custom colors
      • setUseCustomColors

        void setUseCustomColors(boolean value)
        Sets whether the comment is using custom colors i.e. those defined by the properties background_color and foreground_color.
        Parameters:
        value - whether to use custom colors
      • getFGColor

        java.lang.String getFGColor()
        Returns the foreground color as a string of the form "#rrggbb".
        Returns:
        the foreground color
        See Also:
        setFGColor(String)
      • setFGColor

        void setFGColor(java.lang.String rgb)
        Sets the foreground color using a string of the form "#rrggbb". This also sets the setting use custom colors. If the string is not valid then no changes are made.
        Parameters:
        rgb - a string of the form "#rrggbb"
        See Also:
        getFGColor(), setUseCustomColors(boolean)
      • getBGColor

        java.lang.String getBGColor()
        Returns the background color as a string of the form "#rrggbb".
        Returns:
        the background color
      • setBGColor

        void setBGColor(java.lang.String rgb)
        Sets the background color using a string of the form "#rrggbb". This also sets the setting use custom colors. If the string is not valid then no changes are made.
        Parameters:
        rgb - a string of the form "#rrggbb"
        See Also:
        getBGColor(), setUseCustomColors(boolean)
      • isAnnotation

        boolean isAnnotation()
        Returns true if this comment is displaying the annotation of the diagram or stream.
        Returns:
        true if this comment is displaying the annotation of the diagram or stream
      • getAssociatedIDs

        java.util.List<java.lang.String> getAssociatedIDs()
        Returns the list of node IDs that this comment is associated with.
        Returns:
        the list of node IDs that this comment is associated with
      • isAssociated

        boolean isAssociated(java.lang.String nodeId)
        Returns true if this comment is associated with the specified node ID.
        Parameters:
        nodeId - the node ID
        Returns:
        true if this comment is associated with the specified node ID
      • addAssociatedIDs

        void addAssociatedIDs(java.util.List<java.lang.String> nodeIds)
        Adds the supplied node IDs to the set of associated nodes. The nodes associated with the IDs must have the same parent diagram as the comment.
        Parameters:
        nodeIds - the node IDs to be added
        Since:
        PSAPI 18.1
      • removeAssociatedIDs

        void removeAssociatedIDs(java.util.List<java.lang.String> nodeIds)
        Removed the supplied node IDs from the set of associated nodes.
        Parameters:
        nodeIds - the node IDs to be removed
        Since:
        PSAPI 18.1

(C) Copyright IBM Corp. 1994, 2015. All Rights Reserved.