- java.lang.Object
-
- org.logicng.io.graphical.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGraphicalNodeStyle.ShapeThe shape of the node.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GraphicalNodeStylecircle(GraphicalColor strokeColor, GraphicalColor textColor, GraphicalColor backgroundColor)Constructs a new circle node style with the given values.static GraphicalNodeStyleellipse(GraphicalColor strokeColor, GraphicalColor textColor, GraphicalColor backgroundColor)Constructs a new ellipse node style with the given values.booleanequals(Object o)GraphicalColorgetBackgroundColor()Returns the background color of this node style.GraphicalNodeStyle.ShapegetShape()Returns the shape of this node style.GraphicalColorgetStrokeColor()Returns the stroke color of this node style.GraphicalColorgetTextColor()Returns the text color of this node style.inthashCode()booleanhasStyle()Returns whether this style has any value set.static GraphicalNodeStylenoStyle()Returns a special node style which does not set any style, so the framework's (dot/Mermaid.js) default theming is applied.static GraphicalNodeStylerectangle(GraphicalColor strokeColor, GraphicalColor textColor, GraphicalColor backgroundColor)Constructs a new rectangle node style with the given values.static GraphicalNodeStylestyle(GraphicalNodeStyle.Shape shape, GraphicalColor strokeColor, GraphicalColor textColor, GraphicalColor backgroundColor)Constructs a new node style with the given values.StringtoString()
-
-
-
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 nodestrokeColor- the color for the node strokestextColor- the color for the text of the nodebackgroundColor- 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 strokestextColor- the color for the text of the nodebackgroundColor- 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 strokestextColor- the color for the text of the nodebackgroundColor- 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 strokestextColor- the color for the text of the nodebackgroundColor- 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 toNO_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
-
-