Assembly: yWorks.yFilesNET.Viewer (in yWorks.yFilesNET.Viewer.dll) Version: 4.1.0.1 (4.1.0.1)
Syntax
| C# |
|---|
[ObfuscationAttribute(ApplyToMembers = true, Exclude = true, StripAfterObfuscation = false)] public abstract class AbstractStyleRenderer<TModelItem, TModelStyle, TStyle> : IBoundsProvider, IVisibilityTest, IMarqueeTestable, IHitTestable, IPaintable, ILookup, IStyleRenderer<TModelItem, TStyle>, IModelItemInstaller<TModelItem> where TModelItem : class, IModelItem where TModelStyle : class, IVisualStyle<TModelItem> where TStyle : class, TModelStyle |
| Visual Basic |
|---|
<ObfuscationAttribute(ApplyToMembers := True, Exclude := True, _ StripAfterObfuscation := False)> _ Public MustInherit Class AbstractStyleRenderer(Of TModelItem As {Class, IModelItem}, TModelStyle As {Class, IVisualStyle(Of TModelItem)}, TStyle As {Class, TModelStyle}) _ Implements IBoundsProvider, IVisibilityTest, IMarqueeTestable, IHitTestable, _ IPaintable, ILookup, IStyleRenderer(Of TModelItem, TStyle), _ IModelItemInstaller(Of TModelItem) |
Type Parameters
- TModelItem
- the type of item this renderer works on (e.g. INode)
- TModelStyle
- the basic class of the style that is associated with this kind of item (e.g. INodeStyle)
- TStyle
- the specific style interface used by style instances that return this renderer (e.g. MyCustomNodeStyle)
Remarks
This class itself implements the IBoundsProvider, IHitTestable, IMarqueeTestable, and most importantly the IPaintable interfaces. When queried for these interfaces, it will call the Configure()()()() method and return itself according to the flyweight design pattern.
The parameterization makes it possible to reuse this class for all kinds of items and their respective styles. The TStyle parameter is useful for subclasses that deal with a subset of visual styles.
As an example the following type declaration would make sense
for a new style called MyFunnyNodeStyle : INodeStyle:
CopyC#public class MyFunnyNodeStyleRenderer : AbstractStyleRenderer<INode, INodeStyle, MyFunnyNodeStyle> { ...
Inheritance Hierarchy
yWorks.yFiles.UI.Drawing..::..AbstractStyleRenderer<(Of <(<'TModelItem, TModelStyle, TStyle>)>)>
yWorks.yFiles.UI.Drawing..::..AbstractEdgeStyleRenderer<(Of <(<'TStyle>)>)>
yWorks.yFiles.UI.Drawing..::..AbstractLabelStyleRenderer<(Of <(<'TStyle>)>)>
yWorks.yFiles.UI.Drawing..::..AbstractNodeStyleRenderer<(Of <(<'TStyle>)>)>
yWorks.yFiles.UI.Drawing..::..IconLabelStyleRenderer
yWorks.yFiles.UI.Drawing..::..SimplePortStyleRenderer