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
|
java.awt.Color |
getDeletedBackground()
Gets the color for tobedeleted items
|
int |
getEmptyColumnWidth()
Gets the empty column width
|
int |
getEmptyRowHeight()
Gets the empty row height
|
javax.swing.Icon |
getErrorIcon()
Gets the error icon
|
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 |
setDeletedBackground(java.awt.Color deletedColor) |
void |
setEmptyColumnWidth(int emptyColumnWidth)
Sets the empty column width
|
void |
setEmptyRowHeight(int emptyRowHeight)
Sets the empty row height
|
void |
setErrorIcon(javax.swing.Icon errorIcon)
Sets the error icon
|
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 scale factor
|
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 java.awt.Color getDeletedBackground()
deletedColor
- public void setDeletedBackground(java.awt.Color deletedColor)
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) throws java.lang.Exception
background
- The background colorjava.lang.Exception
public 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) throws java.lang.Exception
font
- The text fontjava.lang.Exception
public 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) throws java.lang.Exception
nodeInsets
- The node insetsjava.lang.Exception
public void setNodeBorderInsets(java.awt.Insets nodeBorderInsets)
nodeBorderInsets
- The node border insetspublic java.awt.Insets getNodeBorderInsets()
public int getEmptyRowHeight()
public void setEmptyRowHeight(int emptyRowHeight) throws java.lang.Exception
emptyRowHeight
- The empty row heightjava.lang.Exception
public int getEmptyColumnWidth()
public void setEmptyColumnWidth(int emptyColumnWidth) throws java.lang.Exception
emptyRowHeight
- The empty column widthjava.lang.Exception
public int getImageScaleFactor()
The
- scale factorpublic void setImageScaleFactor(int imageScaleFactor)
imageScaleFactor
- The image scale factorpublic javax.swing.Icon getErrorIcon()
public void setErrorIcon(javax.swing.Icon errorIcon) throws java.lang.Exception
errorIcon
- The error iconjava.lang.Exception
public DiagramConfiguration scale(int scaleFactor)
scale
- The scale as a percentage