Package de.xima.fc.common.graphdot
Class AttributeListBuilder<A extends IGraphDotAttributeList,Self extends AttributeListBuilder<A,Self>>
- java.lang.Object
-
- de.xima.fc.common.graphdot.AttributeListBuilder<A,Self>
-
- Type Parameters:
A- Type of the attribute list that can be built.Self- Type of the builder sub class.
- Direct Known Subclasses:
AttributeListBuilder.BuilderEdge,AttributeListBuilder.BuilderGraph,AttributeListBuilder.BuilderNode,AttributeListBuilder.BuilderSubGraph
public abstract class AttributeListBuilder<A extends IGraphDotAttributeList,Self extends AttributeListBuilder<A,Self>> extends Object
Type safe builder for a list of graphviz dot graph attributes.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAttributeListBuilder.AttributeArrowHeadThearrowheadattribute.static classAttributeListBuilder.AttributeArrowSizeThearrowsizeattribute.static classAttributeListBuilder.AttributeArrowTailThearrowtailattribute.static classAttributeListBuilder.AttributeBgColorThebgcolorattribute.static classAttributeListBuilder.AttributeClassTheclassattribute.static classAttributeListBuilder.AttributeClusterTheclusterattribute.static classAttributeListBuilder.AttributeClusterRankTheclusterrankattribute.static classAttributeListBuilder.AttributeColorThecolorattribute.static classAttributeListBuilder.AttributeConstraintTheconstraintattribute.static classAttributeListBuilder.AttributeDirectionThedirattribute.static classAttributeListBuilder.AttributeEdgeStyleThestyleattribute for edges.static classAttributeListBuilder.AttributeEdgeTooltipTheedgetooltipattribute.static classAttributeListBuilder.AttributeExteriorLabelPositionThexlpattribute.static classAttributeListBuilder.AttributeExternalLabelThexlabelattribute.static classAttributeListBuilder.AttributeFillColorThefillcolorattribute.static classAttributeListBuilder.AttributeFontColorThefontcolorattribute.static classAttributeListBuilder.AttributeFontNameThefontnameattribute.static classAttributeListBuilder.AttributeFontSizeThefontsizeattribute.static classAttributeListBuilder.AttributeGraphRootTherootattribute for graphs.static classAttributeListBuilder.AttributeHeadLabelTheheadlabelattribute.static classAttributeListBuilder.AttributeHeadTooltipTheheadtooltipattribute.static classAttributeListBuilder.AttributeHeightThewithattribute.static classAttributeListBuilder.AttributeLabelThelabelattribute.static classAttributeListBuilder.AttributeLabelCenterPositionThelpattribute.static classAttributeListBuilder.AttributeLabelFontColorThelabelfontcolorattribute.static classAttributeListBuilder.AttributeLabelLocationThelabellocattribute.static classAttributeListBuilder.AttributeLabelTooltipThelabeltooltipattribute.static classAttributeListBuilder.AttributeMarginThemarginattribute.static classAttributeListBuilder.AttributeNodeRootTherootattribute for nodes.static classAttributeListBuilder.AttributeNodeSeparationThenodsepattribute.static classAttributeListBuilder.AttributeNodeStyleThestyleattribute for nodes.static classAttributeListBuilder.AttributeOrderingTheorderingattribute.static classAttributeListBuilder.AttributePenColorThepencolorattribute.static classAttributeListBuilder.AttributePenWidthThepenwithattribute.static classAttributeListBuilder.AttributePeripheriesTheperipheriesattribute.static classAttributeListBuilder.AttributeRankDirectionTherankdirattribute.static classAttributeListBuilder.AttributeRankSeparationTheranksepattribute.static classAttributeListBuilder.AttributeShapeTheshapeattribute.static classAttributeListBuilder.AttributeShowBoxesTheshowboxesattribute.static classAttributeListBuilder.AttributeSubGraphStyleThestyleattribute for sub graphs.static classAttributeListBuilder.AttributeTailLabelThetaillabelattribute.static classAttributeListBuilder.AttributeTailTooltipThetailtooltipattribute.static classAttributeListBuilder.AttributeTooltipThetooltipattribute.static classAttributeListBuilder.AttributeTrueColorThetruecolorattribute.static classAttributeListBuilder.AttributeWidthThewithattribute.static classAttributeListBuilder.BuilderEdgeA builder for anEdgeAttributeList.static classAttributeListBuilder.BuilderGraphA builder for anGraphAttributeList.static classAttributeListBuilder.BuilderNodeA builder for anNodeAttributeList.static classAttributeListBuilder.BuilderSubGraphA builder for anSubGraphAttributeList.static interfaceAttributeListBuilder.IMixinColor<A extends AttributeListBuilder.ITypedAttribute<Color>>Mixin for attributes that accept a single color.static interfaceAttributeListBuilder.IMixinColorList<A extends AttributeListBuilder.ITypedAttribute<ColorList>>Mixin for attributes that accept a color list.static interfaceAttributeListBuilder.IMixinLabelString<A extends AttributeListBuilder.ITypedAttribute<LabelString>>Mixin for attributes that accept a label string.static interfaceAttributeListBuilder.IMixinLength<L extends Length,A extends AttributeListBuilder.ITypedAttribute<L>>Mixin for attributes that accept a length with some unit.static interfaceAttributeListBuilder.IMixinLengthInches<A extends AttributeListBuilder.ITypedAttribute<Length.Inches>>Mixin for attributes that accept a length with the unit inches.static interfaceAttributeListBuilder.IMixinLengthList<L extends Length,A extends AttributeListBuilder.ITypedAttribute<LengthList<L>>>Mixin for attributes that accept a length with the some unit.static interfaceAttributeListBuilder.IMixinLengthListInches<A extends AttributeListBuilder.ITypedAttribute<LengthList<Length.Inches>>>Mixin for attributes that accept a length with the unit inches.static interfaceAttributeListBuilder.IMixinLengthPoints<A extends AttributeListBuilder.ITypedAttribute<Length.Points>>Mixin for attributes that accept a length with the unit pints.static interfaceAttributeListBuilder.IMixinPoint<A extends AttributeListBuilder.ITypedAttribute<Point>>Mixin for attributes that accept a point.static interfaceAttributeListBuilder.IMixinStyleList<X extends IStyle,A extends AttributeListBuilder.ITypedAttribute<StyleList<X>>>Mixin for attributes that accept a style list.static interfaceAttributeListBuilder.ITypedAttribute<T>A named attribute for a dot graph.static interfaceAttributeListBuilder.ITypedAttributeDescriptor<T,A extends AttributeListBuilder.ITypedAttribute<T>>Models the type of a graphviz element attribute.static classAttributeListBuilder.StandardAttributeList of pre-definedAttributeListBuilder.TypedAttributes.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttributeListBuilder(Function<List<? extends Map.Entry<? extends CharSequence,Object>>,A> ctor)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Selfattr(EStandardAttribute attribute, Object value)Sets a custom attribute.Selfattr(String name, Object value)Sets a custom attribute.Abuild()Builds a POJO attribute list model with the current attributes.List<? extends Map.Entry<? extends CharSequence,Object>>buildList()Builds a new attribute list with the current settings.static AttributeListBuilder.BuilderEdgeedge()static AttributeListBuilder.BuilderGraphgraph()static AttributeListBuilder.BuilderNodenode()protected abstract Selfself()static AttributeListBuilder.BuilderSubGraphsubGraph()
-
-
-
Method Detail
-
attr
public final Self attr(EStandardAttribute attribute, Object value)
Sets a custom attribute.- Parameters:
attribute- Type of the attribute.value- Value of the attribute.- Returns:
- This builder instance for chaining method calls.
-
attr
public final Self attr(String name, Object value)
Sets a custom attribute.- Parameters:
name- Name of the attribute.value- Value of the attribute.- Returns:
- This builder instance for chaining method calls.
-
build
public final A build()
Builds a POJO attribute list model with the current attributes.- Returns:
- A new attribute list.
-
buildList
public final List<? extends Map.Entry<? extends CharSequence,Object>> buildList()
Builds a new attribute list with the current settings.- Returns:
- A new attribute map with the current settings.
-
self
protected abstract Self self()
-
edge
public static AttributeListBuilder.BuilderEdge edge()
- Returns:
- A new builder for a set of edge attributes.
-
graph
public static AttributeListBuilder.BuilderGraph graph()
- Returns:
- A new builder for a set of graph attributes.
-
node
public static AttributeListBuilder.BuilderNode node()
- Returns:
- A new builder for a set of node attributes.
-
subGraph
public static AttributeListBuilder.BuilderSubGraph subGraph()
- Returns:
- A new builder for a set of sub graph attributes.
-
-