public ElementStyle addElementStyle(String tag) { ElementStyle elementStyle = null; if (tag != null) { elementStyle = new ElementStyle(); elementStyle.setTag(tag); add(elementStyle); } return elementStyle; }
public RelationshipStyle addRelationshipStyle(String tag) { RelationshipStyle relationshipStyle = null; if (tag != null) { relationshipStyle = new RelationshipStyle(); relationshipStyle.setTag(tag); add(relationshipStyle); } return relationshipStyle; }
protected RelationshipView addRelationship(Relationship relationship, String description, String order) { RelationshipView relationshipView = addRelationship(relationship); if (relationshipView != null) { relationshipView.setDescription(description); relationshipView.setOrder(order); } return relationshipView; }
protected String backgroundOf(View view, Element element) { return view.getViewSet().getConfiguration().getStyles().findElementStyle(element).getBackground(); }
void copyLayoutInformationFrom(RelationshipView source) { if (source != null) { setVertices(source.getVertices()); setPosition(source.getPosition()); setRouting(source.getRouting()); } }
private void hydrateView(View view) { view.setViewSet(this); for (ElementView elementView : view.getElements()) { elementView.setElement(model.getElement(elementView.getId())); } for (RelationshipView relationshipView : view.getRelationships()) { relationshipView.setRelationship(model.getRelationship(relationshipView.getId())); } }
/** * Adds all people, software systems and containers that belong to the software system in scope. */ @Override public void addAllElements() { addAllSoftwareSystems(); addAllPeople(); addAllContainers(); }
private ElementView findElementView(ElementView sourceElementView) { for (ElementView elementView : getElements()) { if (elementView.getElement().equals(sourceElementView.getElement())) { return elementView; } } return null; }
/** * <p>Adds all {@link com.structurizr.model.Container}s of the given {@link ContainerView} as well as all external influencers, that is all * persons and all other software systems with incoming or outgoing dependencies.</p> * <p>Additionally, all relationships of external dependencies are omitted to keep the diagram clean</p> */ public final void addAllContainersAndInfluencers() { // first add all containers of the underlying software system this.addAllContainers(); addAllInfluencers(); }
public ElementStyle(String tag, Integer width, Integer height, String background, String color, Integer fontSize, Shape shape) { this.tag = tag; this.width = width; this.height = height; setBackground(background); setColor(color); this.fontSize = fontSize; this.shape = shape; }
/** * Adds all software systems and all people to this view. */ @Override public void addAllElements() { addAllSoftwareSystems(); addAllPeople(); }
void endParallelSequence(boolean endAllParallelSequencesAndContinueNumbering) { if (endAllParallelSequencesAndContinueNumbering) { int sequence = this.counter.getSequence(); this.counter = this.counter.getParent(); this.counter.setSequence(sequence); } else { this.counter = this.counter.getParent(); } }
/** * Adds an individual container to this view, including relationships to/from that container. * * @param container the Container to add */ public void add(Container container) { add(container, true); }
ParallelSequenceCounter(SequenceCounter parent) { super(parent); setSequence(parent.getSequence()); }
public String getBaseViewKey() { if (view != null) { return view.getKey(); } else { return this.baseViewKey; } }
/** * Adds an individual container (belonging to any software system) to this view, including relationships to/from that container. * * @param container the Container to add */ public void add(Container container) { add(container, true); }
/** * Removes an individual component from this view. * * @param component the Component to remove */ public void remove(Component component) { removeElement(component); }
/** * Adds an individual container (belonging to any software system) to this view. * * @param container the Container to add * @param addRelationships whether to add relationships to/from the container */ public void add(Container container, boolean addRelationships) { addElement(container, addRelationships); }
/** * Removes an individual container from this view. * * @param container the Container to remove */ public void remove(Container container) { removeElement(container); }