Class View
Defines the shared metadata, elements, and relationships for a rendered architecture view.
[DataContract]
public abstract class View
- Inheritance
-
View
- Derived
- Inherited Members
Fields
LayoutMergeStrategy
Selects the strategy used when copying layout information from another view instance.
public LayoutMergeStrategy LayoutMergeStrategy
Field Value
Properties
AutomaticLayout
Stores the automatic layout settings currently applied to the view.
[DataMember(Name = "automaticLayout", EmitDefaultValue = false)]
public AutomaticLayout AutomaticLayout { get; }
Property Value
Description
Describes the purpose of the view.
[DataMember(Name = "description", EmitDefaultValue = false)]
public string Description { get; set; }
Property Value
Dimensions
The dimensions of the view (in pixels).
[DataMember(Name = "dimensions", EmitDefaultValue = false)]
public Dimensions Dimensions { get; set; }
Property Value
Elements
The set of elements in this view.
[DataMember(Name = "elements", EmitDefaultValue = false)]
public ISet<ElementView> Elements { get; }
Property Value
Key
An identifier for this view.
[DataMember(Name = "key", EmitDefaultValue = false)]
public string Key { get; set; }
Property Value
Model
Resolves the model that owns the elements displayed by this view.
public virtual Model Model { get; set; }
Property Value
Remarks
The default setter intentionally ignores assigned values because most view types derive the model from their scope.
Name
Provides the generated name displayed for this view type.
public abstract string Name { get; }
Property Value
PaperSize
The paper size that should be used to render this view.
[DataMember(Name = "paperSize", EmitDefaultValue = false)]
public PaperSize PaperSize { get; set; }
Property Value
Relationships
The set of relationships in this view.
[DataMember(Name = "relationships", EmitDefaultValue = false)]
public virtual ISet<RelationshipView> Relationships { get; }
Property Value
SoftwareSystem
References the software system that defines the scope of this view when applicable.
public SoftwareSystem SoftwareSystem { get; set; }
Property Value
SoftwareSystemId
The ID of the software system this view is associated with.
[DataMember(Name = "softwareSystemId", EmitDefaultValue = false)]
public string SoftwareSystemId { get; set; }
Property Value
Title
The title for this view.
[DataMember(Name = "title", EmitDefaultValue = false)]
public string Title { get; set; }
Property Value
Methods
AddElement(Element, bool)
protected void AddElement(Element element, bool addRelationships)
Parameters
AddRelationship(Relationship)
protected RelationshipView AddRelationship(Relationship relationship)
Parameters
relationshipRelationship
Returns
CheckElementCanBeAdded(Element)
protected abstract void CheckElementCanBeAdded(Element element)
Parameters
elementElement
CopyLayoutInformationFrom(View)
Attempts to copy the visual layout information (e.g. x,y coordinates) of elements and relationships from the specified source view into this view.
public void CopyLayoutInformationFrom(View source)
Parameters
sourceViewthe source view
DisableAutomaticLayout()
Disables automatic layout for this view.
public void DisableAutomaticLayout()
EnableAutomaticLayout()
Enables automatic layout for this view, with some default settings.
public void EnableAutomaticLayout()
EnableAutomaticLayout(RankDirection, int, int, int, bool)
Enables the automatic layout for this view, with the specified settings.
public void EnableAutomaticLayout(RankDirection rankDirection, int rankSeparation, int nodeSeparation, int edgeSeparation, bool vertices)
Parameters
rankDirectionRankDirectionthe rank direction
rankSeparationintthe separation between ranks (in pixels, a positive integer)
nodeSeparationintthe separation between nodes within the same rank (in pixels, a positive integer)
edgeSeparationintthe separation between edges (in pixels, a positive integer)
verticesboolwhether vertices should be created during automatic layout
GetElementView(Element)
Gets the element view for the given element.
public ElementView GetElementView(Element element)
Parameters
elementElementthe Element to find the ElementView for
Returns
- ElementView
The matching ElementView.
Exceptions
- InvalidOperationException
Thrown when the element is not present in the view.
GetRelationshipView(Relationship)
Gets the relationship view for the given relationship.
public RelationshipView GetRelationshipView(Relationship relationship)
Parameters
relationshipRelationshipthe Relationship to find the RelationshipView for
Returns
- RelationshipView
The matching RelationshipView.
Exceptions
- InvalidOperationException
Thrown when the relationship is not present in the view.
Remove(Relationship)
Removes the supplied relationship from the view when it is present.
public void Remove(Relationship relationship)
Parameters
relationshipRelationshipThe relationship to remove.
RemoveElement(Element)
protected void RemoveElement(Element element)
Parameters
elementElement