Package com.structurizr.view
Class Styles
java.lang.Object
com.structurizr.view.Styles
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ElementStyle elementStyle) voidadd(RelationshipStyle relationshipStyle) addElementStyle(String tag) voidaddStylesFromTheme(com.structurizr.view.Theme theme) Adds the element/relationship styles from the given theme.voidRemoves all element styles.voidRemoves all relationship styles.findElementStyle(Element element) Finds the element style used to render the specified element, according to the following rules: 1.findElementStyle(String tag) Finds the element style for the given tag.findRelationshipStyle(Relationship relationship) Finds the relationship style used to render the specified relationship, according to the following rules: 1.Finds the relationship style for the given tag.
-
Constructor Details
-
Styles
public Styles()
-
-
Method Details
-
getElements
-
add
-
addElementStyle
-
clearElementStyles
public void clearElementStyles()Removes all element styles. -
clearRelationshipStyles
public void clearRelationshipStyles()Removes all relationship styles. -
getRelationships
-
add
-
addRelationshipStyle
-
findElementStyle
Finds the element style for the given tag. This method creates an empty style, and copies properties from any element styles (from the workspace and any themes) for the given tag.- Parameters:
tag- the tag (a String)- Returns:
- an ElementStyle instance
-
findRelationshipStyle
Finds the relationship style for the given tag. This method creates an empty style, and copies properties from any relationship styles (from the workspace and any themes) for the given tag.- Parameters:
tag- the tag (a String)- Returns:
- a RelationshipStyle instance
-
findElementStyle
Finds the element style used to render the specified element, according to the following rules: 1. Start with a default style. 2. Calculate set of tags associated with the element. 3. Find the style properties for each tag (themes first, followed by workspace styles)- Parameters:
element- an Element object- Returns:
- an ElementStyle object
-
findRelationshipStyle
Finds the relationship style used to render the specified relationship, according to the following rules: 1. Start with a default style. 2. Calculate set of tags associated with the relationship, and any linked relationship(s). 3. Find the style properties for each tag (themes first, followed by workspace styles)- Parameters:
relationship- a Relationship object- Returns:
- a RelationshipStyle object
-
addStylesFromTheme
public void addStylesFromTheme(com.structurizr.view.Theme theme) Adds the element/relationship styles from the given theme.- Parameters:
theme- a Theme object
-