public class DiagramConfiguration
extends java.lang.Object
implements java.lang.Cloneable
This class holds information to configure the workflow diagram. It is important to distingush between the nodeBorderInsets which define the empty border around an node and the nodeInsets which define the area around the node which separate the node from the channels. The latter determines the length of the horizontal run into and out of the node. The former determines the space between the arrows and the image display.
Constructor and Description |
---|
DiagramConfiguration() |
Modifier and Type | Method and Description |
---|---|
int |
getArrowHeight()
Gets the arrow height
|
java.awt.Color |
getBackground()
Gets the background color
|
java.awt.Color |
getCurrentNodeColor()
Gets the current node color
|
int |
getEmptyColumnWidth()
Gets the empty column width
|
int |
getEmptyRowHeight()
Gets the empty row height
|
java.awt.Font |
getFont()
Gets the text font
|
java.awt.Color |
getForeground()
Gets the foreground color
|
int |
getHorizontalLineSpacing()
Gets the horizontal line spacing
|
int |
getImageScaleFactor()
Gets the image scale factor as a percentage for the image
|
java.awt.Color |
getLineColor()
Gets the line color
|
java.awt.Color |
getNegativeLineColor()
Gets the negative line color
|
java.awt.Insets |
getNodeBorderInsets()
Gets the insets for the node border.
|
java.awt.Insets |
getNodeInsets()
Gets the insets around the node which space the node from the channels
|
java.awt.Color |
getSelectedBackground()
Gets the selected background color
|
java.awt.Color |
getSelectedForeground()
Gets the selected foreground color
|
java.awt.Color |
getSelectedLineColor()
Gets the selected line color
|
int |
getVerticalLineSpacing()
Gets the vertical line spacing
|
DiagramConfiguration |
scale(int scaleFactor)
Scales all the parts of the configuration by a percentage and returns a
new configuration object.
|
void |
setArrowHeight(int arrowHeight)
Sets the arrow height
|
void |
setBackground(java.awt.Color background)
Sets the background color
|
void |
setCurrentNodeColor(java.awt.Color currentNodeColor)
Sets the current node color
|
void |
setEmptyColumnWidth(int emptyColumnWidth)
Sets the empty column width
|
void |
setEmptyRowHeight(int emptyRowHeight)
Sets the empty row height
|
void |
setFont(java.awt.Font font)
Sets the text font
|
void |
setForeground(java.awt.Color foreground)
Sets the foreground color
|
void |
setHorizontalLineSpacing(int horizontalLineSpacing)
Sets the horizontal line spacing
|
void |
setImageScaleFactor(int imageScaleFactor)
Sets the image size - null is allowed and means no scaling
|
void |
setLineColor(java.awt.Color lineColor)
Sets the line color
|
void |
setNegativeLineColor(java.awt.Color negativeLineColor)
Sets the negative line color
|
void |
setNodeBorderInsets(java.awt.Insets nodeBorderInsets)
Sets the insets for the node border.
|
void |
setNodeInsets(java.awt.Insets nodeInsets)
Sets the insets around the node which space the node from the channels
|
void |
setSelectedBackground(java.awt.Color selectedBackground)
Sets the selected background color
|
void |
setSelectedForeground(java.awt.Color selectedForeground)
Sets the selected foreground color
|
void |
setSelectedLineColor(java.awt.Color selectedLineColor)
Sets the selected line color
|
void |
setVerticalLineSpacing(int verticalLineSpacing)
Sets the vertical line spacing
|
public java.awt.Color getLineColor()
public void setLineColor(java.awt.Color lineColor)
lineColor
- The line colorpublic java.awt.Color getSelectedLineColor()
public void setSelectedLineColor(java.awt.Color selectedLineColor)
selectedLineColor
- The selected line colorpublic java.awt.Color getNegativeLineColor()
public void setNegativeLineColor(java.awt.Color negativeLineColor)
negativeLineColor
- The negative line colorpublic java.awt.Color getForeground()
public void setForeground(java.awt.Color foreground)
foreground
- The foreground colorpublic java.awt.Color getBackground()
public void setBackground(java.awt.Color background)
background
- The background colorpublic java.awt.Color getSelectedForeground()
public void setSelectedForeground(java.awt.Color selectedForeground)
selectedForeground
- The selected foreground colorpublic java.awt.Color getSelectedBackground()
public void setSelectedBackground(java.awt.Color selectedBackground)
selectedBackground
- The selected background colorpublic java.awt.Color getCurrentNodeColor()
public void setCurrentNodeColor(java.awt.Color currentNodeColor)
currentNodeColor
- The current node colorpublic java.awt.Font getFont()
public void setFont(java.awt.Font font)
font
- The text fontpublic int getVerticalLineSpacing()
public void setVerticalLineSpacing(int verticalLineSpacing)
verticalLineSpacing
- The vertical line spacingpublic int getHorizontalLineSpacing()
public void setHorizontalLineSpacing(int horizontalLineSpacing)
horizontalLineSpacing
- The horizontal line spacingpublic int getArrowHeight()
public void setArrowHeight(int arrowHeight)
arrowHeight
- The arrow heightpublic java.awt.Insets getNodeInsets()
public void setNodeInsets(java.awt.Insets nodeInsets)
nodeInsets
- The node insetspublic void setNodeBorderInsets(java.awt.Insets nodeBorderInsets)
nodeBorderInsets
- The node border insetspublic java.awt.Insets getNodeBorderInsets()
public int getEmptyRowHeight()
public void setEmptyRowHeight(int emptyRowHeight)
emptyRowHeight
- The empty row heightpublic int getEmptyColumnWidth()
public void setEmptyColumnWidth(int emptyColumnWidth)
emptyRowHeight
- The empty column widthpublic int getImageScaleFactor()
The
- scale factorpublic void setImageScaleFactor(int imageScaleFactor)
imageSize
- The image sizepublic DiagramConfiguration scale(int scaleFactor)
scale
- The scale as a percentage