Module logicng

Class GraphicalNodeStyle


  • public class GraphicalNodeStyle
    extends Object
    The style of a node in a graphical representation of a formula, BDD, or graph. The style consists of the shape, and the stroke, text, and background color.
    Since:
    2.4.0
    Version:
    2.4.0
    • Method Detail

      • noStyle

        public static GraphicalNodeStyle noStyle()
        Returns a special node style which does not set any style, so the framework's (dot/Mermaid.js) default theming is applied.
        Returns:
        special node style which does not set any style
      • style

        public static GraphicalNodeStyle style​(GraphicalNodeStyle.Shape shape,
                                               GraphicalColor strokeColor,
                                               GraphicalColor textColor,
                                               GraphicalColor backgroundColor)
        Constructs a new node style with the given values.
        Parameters:
        shape - the shape of the node
        strokeColor - the color for the node strokes
        textColor - the color for the text of the node
        backgroundColor - the color for the background of the node
        Returns:
        the new node style
      • circle

        public static GraphicalNodeStyle circle​(GraphicalColor strokeColor,
                                                GraphicalColor textColor,
                                                GraphicalColor backgroundColor)
        Constructs a new circle node style with the given values.
        Parameters:
        strokeColor - the color for the node strokes
        textColor - the color for the text of the node
        backgroundColor - the color for the background of the node
        Returns:
        the new node style
      • ellipse

        public static GraphicalNodeStyle ellipse​(GraphicalColor strokeColor,
                                                 GraphicalColor textColor,
                                                 GraphicalColor backgroundColor)
        Constructs a new ellipse node style with the given values.
        Parameters:
        strokeColor - the color for the node strokes
        textColor - the color for the text of the node
        backgroundColor - the color for the background of the node
        Returns:
        the new node style
      • rectangle

        public static GraphicalNodeStyle rectangle​(GraphicalColor strokeColor,
                                                   GraphicalColor textColor,
                                                   GraphicalColor backgroundColor)
        Constructs a new rectangle node style with the given values.
        Parameters:
        strokeColor - the color for the node strokes
        textColor - the color for the text of the node
        backgroundColor - the color for the background of the node
        Returns:
        the new node style
      • hasStyle

        public boolean hasStyle()
        Returns whether this style has any value set. If not it is equivalent to NO_NODE_STYLE.
        Returns:
        whether this style has any value set
      • getShape

        public GraphicalNodeStyle.Shape getShape()
        Returns the shape of this node style.
        Returns:
        the shape of this node style
      • getStrokeColor

        public GraphicalColor getStrokeColor()
        Returns the stroke color of this node style.
        Returns:
        the stroke color of this node style
      • getTextColor

        public GraphicalColor getTextColor()
        Returns the text color of this node style.
        Returns:
        the text color of this node style
      • getBackgroundColor

        public GraphicalColor getBackgroundColor()
        Returns the background color of this node style.
        Returns:
        the background color of this node style
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object