|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.beandoc.output.SimpleDecorator
org.springframework.beandoc.output.GraphVizDecorator
public class GraphVizDecorator
GraphVizDecorator is a configurable Decorator implementation that adds attributes to the DOM used by DotFileTransformer in generating input files for GraphViz.
Field Summary | |
---|---|
protected static String |
ATTRIBUTE_COLOUR
|
protected static String |
ATTRIBUTE_GRAPH_BEANSHAPE
|
protected static String |
ATTRIBUTE_GRAPH_CONSOLIDATED
|
protected static String |
ATTRIBUTE_GRAPH_FONTNAME
|
protected static String |
ATTRIBUTE_GRAPH_FONTSIZE
|
protected static String |
ATTRIBUTE_GRAPH_IGNORE
|
protected static String |
ATTRIBUTE_GRAPH_LABELLOCATION
|
protected static String |
ATTRIBUTE_GRAPH_RANK
|
protected static String |
ATTRIBUTE_GRAPH_RATIO
|
protected static String |
ATTRIBUTE_GRAPH_SIZE
|
protected static String |
ATTRIBUTE_GRAPH_TYPE
|
Fields inherited from class org.springframework.beandoc.output.SimpleDecorator |
---|
logger |
Constructor Summary | |
---|---|
GraphVizDecorator()
|
Method Summary | |
---|---|
void |
addColourBeans(String pattern,
String colour)
Add a fill colour to the beans on a graph whose name, id's or classname match the supplied string. |
void |
addIgnoreBeans(String pattern)
Add a naming pattern of bean id's or bean names or classnames that should not be displayed on output. |
void |
addRankBeans(String pattern)
Add a naming pattern of bean id's or bean names or classnames that should be constrained to the same rank of a graph. |
protected void |
decorateElement(org.jdom.Element element)
Decorates root element with graph type attributes and each bean element as required with colour information. |
String |
getBeanShape()
Default shape used to describe bean nodes on the graph. |
Map |
getColourBeans()
Returns a Map keyed by bean name or class name that is
used to determine the fill colour for bean descriptions in the HTML
output andf on the graphing output. |
String |
getDefaultFillColour()
Fill colour used for beans on graphs and keyed in the HTML documentation if no other colour is specified through pattern matching. |
String |
getFontName()
The font name used on the graph nodes. |
int |
getFontSize()
Font size (pt) used for node labels on graph output |
float |
getGraphXSize()
The maximum length of the x-axis of the graph in inches. |
float |
getGraphYSize()
The maximum length of the y-axis of the graph in inches. |
List |
getIgnoreBeans()
A List of patterns representing bean names/ids or
classnames that should be excluded from the output. |
char |
getLabelLocation()
Label position denoting whether graph labels appear at the top or bottom of the graph. |
String |
getOutputType()
The type of output that the GraphViz 'dot' program should create from the intermediate .dot files. |
List |
getRankBeans()
A list of patterns of bean names or package names that determine how groups of similar beans are graphed. |
String |
getRatio()
A value denoting ratio of x and y axes on the graoh output. |
void |
setBeanShape(String shape)
The shape to draw bean nodes in. |
void |
setColourBeans(Map colours)
A Map keyed by bean names/ids or classnames that hold
colour attributes used to fill graph nodes or key the HTML output. |
void |
setDefaultFillColour(String colour)
Sets the fill colour used for beans on graphs and keyed in the HTML documentation if no other colour is specified through pattern matching. |
void |
setFontName(String font)
Set the font used in bean labels in graphing output. |
void |
setFontSize(int fontSize)
Set the font size used in bean labels in graphing output. |
void |
setGraphXSize(float x)
The maximum length of the x-axis of the graph in inches. |
void |
setGraphYSize(float y)
The maximum length of the y-axis of the graph in inches. |
void |
setIgnoreBeans(List ignoreBeans)
A List of patterns representing bean names/ids or
classnames that should be excluded from the output documents. |
void |
setLabelLocation(String labelLocation)
Determines whether graph titles will appear at the top or bottom of the graph. |
void |
setOutputType(String graphType)
Determines the format of the graphing output. |
void |
setRankBeans(List rankBeans)
A list of patterns of bean names or package names that determine how groups of similar beans are graphed. |
void |
setRatio(String ratio)
Sets the graph ratio. |
Methods inherited from class org.springframework.beandoc.output.SimpleDecorator |
---|
decorate, setFilter, setFilterNames |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String ATTRIBUTE_GRAPH_TYPE
protected static final String ATTRIBUTE_GRAPH_FONTNAME
protected static final String ATTRIBUTE_GRAPH_FONTSIZE
protected static final String ATTRIBUTE_GRAPH_SIZE
protected static final String ATTRIBUTE_GRAPH_RATIO
protected static final String ATTRIBUTE_GRAPH_BEANSHAPE
protected static final String ATTRIBUTE_GRAPH_LABELLOCATION
protected static final String ATTRIBUTE_GRAPH_CONSOLIDATED
protected static final String ATTRIBUTE_GRAPH_IGNORE
protected static final String ATTRIBUTE_GRAPH_RANK
protected static final String ATTRIBUTE_COLOUR
Constructor Detail |
---|
public GraphVizDecorator()
Method Detail |
---|
protected void decorateElement(org.jdom.Element element)
decorateElement
in class SimpleDecorator
SimpleDecorator.decorateElement(org.jdom.Element)
public void setDefaultFillColour(String colour)
colour
- a String
in the format "#AABBCC" - a
standard hex triplet for the RGB valuespublic void setColourBeans(Map colours)
Map
keyed by bean names/ids or classnames that hold
colour attributes used to fill graph nodes or key the HTML output. The
preferred way to modify colours is through the addColourBeans(java.lang.String, java.lang.String)
convenience method.
colours
- a Map
of node fill colours for graph
output. Also used to key the HTML documentation.addColourBeans(java.lang.String, java.lang.String)
public void addColourBeans(String pattern, String colour)
pattern
- a String representing a pattern to match based on RegEx
matching. A null value will be ignoredcolour
- the colour as an RGB HEX triplet to fill the bean with. May
not be nullpublic void setBeanShape(String shape)
false
Common options are;
shape
- the shape for bean nodes in generated graphs.public void setFontName(String font)
font
- the font to use, default is "helvetica" which should work on
most platformspublic void setFontSize(int fontSize)
fontSize
- the font point size, default is 10public void setLabelLocation(String labelLocation)
labelLocation
- a String representing Top ('t') or Bottom ('b').
Default is 't'.public void setRatio(String ratio)
ratio
- the ratio for graph output, default is "auto"setGraphXSize(float)
,
setGraphYSize(float)
public void setGraphXSize(float x)
x
- a float value specifying the length of the x-axis of the graphpublic void setGraphYSize(float y)
y
- a float value specifying the length of the y-axis of the graphpublic void setOutputType(String graphType)
graphType
- the output format for graphs. Default is png
which is a very efficient format in terms of file size and highly
recommended over gif and jpg if your viewer supports it. Most modern
browsers can display PNG files.public List getIgnoreBeans()
List
of patterns representing bean names/ids or
classnames that should be excluded from the output.
The returned underlying List
is modifiable and will, if
modified, affect subsequent calls to the ContextProcessor
's
process()
method if you are using the tool
programmatically. The preferred way to modify this list is through the
addIgnoreBeans(java.lang.String)
convenience method.
List
of patterns of bean names to be excluded
from graphsaddIgnoreBeans(String)
public void setIgnoreBeans(List ignoreBeans)
List
of patterns representing bean names/ids or
classnames that should be excluded from the output documents. The
preferred way to modify this list is through the addIgnoreBeans(java.lang.String)
convenience method.
ignoreBeans
- a List
of patterns of bean names to be
excluded from graphsaddIgnoreBeans(java.lang.String)
public void addIgnoreBeans(String pattern)
This method may be called any number of times to add different patterns to the list of ignored beans. Pattern may not be null (such a value will be ignored).
pattern
- a String representing a pattern to match. The pattern uses
RegEx matching. May not be nullpublic void setRankBeans(List rankBeans)
rankBeans
- the List of patterns of grouped beanspublic void addRankBeans(String pattern)
This method may be called any number of times to add different patterns to the list of ignored beans. Pattern may not be null (such a value will be ignored).
pattern
- a String representing a pattern to match. The pattern uses
RegEx matching. May not be nullpublic Map getColourBeans()
Map
keyed by bean name or class name that is
used to determine the fill colour for bean descriptions in the HTML
output andf on the graphing output.
getDefaultFillColour()
public String getOutputType()
setOutputType(java.lang.String)
for
some of the optional formats supported
setOutputType(java.lang.String)
public String getDefaultFillColour()
addColourBeans(String, String)
,
getColourBeans()
public String getBeanShape()
setBeanShape(java.lang.String)
for some of the options
setBeanShape(java.lang.String)
public String getFontName()
If you want to use a font that GraphViz can't find on your system, set a
FONTPATH
environment variable pointing to the location of
your font directories.
public int getFontSize()
public char getLabelLocation()
public String getRatio()
setGraphXSize(float)
and setGraphYSize(float)
to
determine final size and layout.
getGraphXSize()
,
getGraphYSize()
public float getGraphXSize()
setGraphXSize(float)
,
getGraphYSize()
,
setGraphYSize(float)
public float getGraphYSize()
setGraphYSize(float)
,
getGraphXSize()
,
setGraphXSize(float)
public List getRankBeans()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |