Diagram style is at the top of the configuration food chain. It pulls together other configuration elements and packages them up to create a single, selectable way of viewing a class diagram controlling how each Java element and how each arrow/line is presented.
Attribute | Description | Required |
---|---|---|
name | identifier, must be unique | Yes |
superStyle | name of the diagram style which this diagram style extends | |
typesInSignaturesDisplayLevel | OMIT, UNQUALIFIED or QUALIFIED | No |
exceptionsDisplayLevel | OMIT, UNQUALIFIED or QUALIFIED | No |
showsTypeTitlesQualified | whether to show class/interface/enums titles qualified or unqualified. true or false | No |
description | shown in the diagram style picker dialog | No |
A type binding marries together a type selector and a type display style. In other words it controls which types to display and how to display them. There can be multiple type bindings specified within a diagram style, but for any one given type, whichever type binding's type selector matches first determines how that type is displayed.
Attribute | Description | Required |
---|---|---|
typeSelector | the name of the type selector which qualifies which types are included | Yes |
displayStyle | the name of the type display style which controls how qualifying types are displayed. Omit this attribute to hide qualifying types. | No |
styleSwitch | the name of a style switch used to activate/deactivate this binding | No |
switchQualifier | the value which the user of this diagram style needs to supply for the above style switch | If styleSwitch specified |
Similar to type binding, but instead applicable to methods.
Attribute | Description | Required |
---|---|---|
methodSelector | the name of the method selector which qualifies which methods are included | Yes |
displayStyle | the name of the method display style which controls how qualifying methods are displayed. Omit this attribute to hide qualifying methods. | No |
styleSwitch | the name of a style switch used to activate/deactivate this binding | No |
switchQualifier | the value which the user of this diagram style needs to supply for the above style switch | If styleSwitch specified |
Similar to type binding, but instead applicable to fields.
Attribute | Description | Required |
---|---|---|
fieldSelector | the name of the field selector which qualifies which fields are included | Yes |
displayStyle | the name of the field display style which controls how qualifying fields are displayed. Omit this attribute to hide qualifying fields. | No |
styleSwitch | the name of a style switch used to activate/deactivate this binding | No |
switchQualifier | the value which the user of this diagram style needs to supply for the above style switch | If styleSwitch specified |
A dependency line binding marries together two type selectors with zero or one line style. One of the type selectors applies to the head (to) end of the arrow, and the other applies to the tail (from) end. The line style, if specified, describes how to display the line. If no line style is specified then the line will be hidden.
Attribute | Description | Required |
---|---|---|
toSelector | the name of the type selector to which types at the head end (dependency) must match | Yes |
fromSelector | the name of the type selector to which types at the tail end (dependent) must match | Yes |
styleSwitch | the name of a style switch used to activate/deactivate this binding | No |
switchQualifier | the value which the user of this diagram style needs to supply for the above style switch | If styleSwitch specified |
An inheritance line binding marries together two type selectors with zero or one line style. One of the type selectors applies to the head (to) end of the arrow, and the other applies to the tail (from) end. The line style, if specified, describes how to display the line. If no line style is specified then the line will be hidden.
Attribute | Description | Required |
---|---|---|
toSelector | the name of the type selector to which supertypes (superclasses and superinterfaces) must match | Yes |
fromSelector | the name of the type selector to which subtypes (subclasses, subinterfaces and implementing classes) must match | Yes |
styleSwitch | the name of a style switch used to activate/deactivate this binding | No |
switchQualifier | the value which the user of this diagram style needs to supply for the above style switch | If styleSwitch specified |
A field line binding marries together one field selector, one type selector with zero or one line style. The type selector applies to the head (to) end of the arrow, and the field selector applies to the tail (from) end. The line style, if specified, describes how to display the line. If no line style is specified then the line will be hidden.
Attribute | Description | Required |
---|---|---|
toSelector | the name of the type selector to which field types must match | Yes |
fromSelector | the name of the field selector to which fields must match | Yes |
styleSwitch | the name of a style switch used to activate/deactivate this binding | No |
switchQualifier | the value which the user of this diagram style needs to supply for the above style switch | If styleSwitch specified |
A line style describes how to draw a line. Line styles are declared in place as needed.
Attribute | Description | Required |
---|---|---|
color | line color in the form #RRGGBB | Yes |
dotted | draw a dotted line - true or false, defaults to false | No |
fat | draw a fat line - true or false, defaults to false | No |
manhattan | draw a manhattan (orthogonal, using only horizontal and vertical parts) | No |
styleSwitch | the name of a style switch used to activate/deactivate this binding | No |
switchQualifier | the value which the user of this diagram style needs to supply for the above style switch | If styleSwitch specified |
<DiagramStyle name="blueAbstract" description="shows abstract classes in green" superStyle="defaultDiagramStyle"> <TypeBinding typeSelector="abstractTypes" displayStyle="blueTypeDisplayStyle"/> </DiagramStyle>
Declares a diagram style which displays abstract classes in blue. "abstractTypes" is a type selector declared elsewhere in the file. "blueTypeDisplayStyle" is a type display style declared elsewhere in the file.
<DiagramStyle
name="hideStaticFields"
description=""
superStyle="defaultDiagramStyle">
<FieldBinding
fieldSelector="staticFields"/> </DiagramStyle>
Declares a diagram style which hides static fields. Static fields are hidden because the binding includes no displayStyle attribute.
<DiagramStyle
name="highlightStaticFieldLines"
description=""
superStyle="defaultDiagramStyle">
<FieldLineBinding fromSelector="staticFields" toSelector="allTypes">
<LineStyle color="#ff0000"/>
</FieldLineBinding>
</DiagramStyle>
Declares a diagram style which shows field lines from static fields in red.
See the standard configuration for more examples of diagram styles.