DiagramDefaults
has the following general parameters:autosized
: The autosized propertypadWidth
: The width pad for the autosized property. It will be the width of the node box compare to the width of the textpadHeight
: The height pad for the autosized property. It will be the height of the node box compare to the height of the textDiagramDefaults
has the following parameters on edges:arrowSource
: The type for the edge arrows. The value is one of the enumeration states in the ArrowType interfacearrowTarget
: The type for the edge arrows. The value is one of the enumeration states in the ArrowType interfaceedgeLabelAutoRotate
: True if the edge labels should autorotateedgeLabelAutoFlip
: True if the edge labels should flipedgeFontSize
: The font size for edgesedgeFontStyle
: The font style for edges. The value is one of the enumeration states in the LabelStyle interfaceedgeLabelPosition
: The edge label position. The value is one of the enumeration states in the EdgeLabelPosition interfaceedgeHasLabelDistance
: True if by default the edges have a label distanceedgeLabelDistance
: The edge label distanceedgeLabelAnchorX
: The edge label X anchoredgeLabelAnchorY
: The edge label Y anchoredgeColor
: The edge coloredgeBorderWidth
: The edge border widthedgeType
: The edge type. The value is one of the enumeration states in the EdgeType interfaceedgeSmoothed
: True if the edges must have the smooth styleDiagramDefaults
has the following parameters on regular nodes:nodeFontSize
: The font size for nodesnodeFontStyle
: The font style for nodes. The value is one of the enumeration states in the LabelStyle interfacenodeFillColor
: The node fill colornodeBorderColor
: The node border colornodeBorderWidth
: The node border widthnodeBorderLineStyle
: The node border line style. The value is one of the enumeration states in the LineStyle interfacenodeWidth
: The node width[1]
autosized
property is set to false, else the node sizes will be automatically fitted to match their contentnodeHeight
: The node height[1]
autosized
property is set to false, else the node sizes will be automatically fitted to match their contentnodeDropShadow
: The node drop shadow (by default this is null, meaning that nodes have no drop shadow by default)DiagramDefaults
has the following parameters on group nodes:groupNodeFontSize
: The font size for group nodesgroupNodeFontStyle
: The font style for group nodes. The value is one of the enumeration states in the LabelStyle interfacegroupNodeOpenedSizeType
: The group node size typegroupNodePadding
: The group node padding used to compute its sizegroupNodeFillColor
: The group node fill colorgroupNodeBorderColor
: The group node border colorgroupNodeBorderWidth
: The group node border widthgroupNodeBorderLineStyle
: The group node border line style. The value is one of the enumeration states in the LineStyle interfacegroupNodeOpenedWidth
: The group node width for the opened stategroupNodeOpenedHeight
: The group node height for the opened stategroupNodeClosedWidth
: The group node width for the closed stategroupNodeClosedHeight
: The group node height for the closed stategroupDefaultRealizedState
: The group node group realized state (true for opened, false for closed)closedGroupInnerGraphDisplayEnabled
: True if a small icon of the group content must be shown for the closed stateGraphmlFactory factory = GraphmlFactory.getInstance(); GraphmlDiagram diagram = factory.newDiagram(); DiagramDefaults defaults = diagram.getDefaults(); defaults.edgeLabelAutoRotate = true; // the DiagramDefaults.GLOBAL has not changedModifying the DiagramDefaults.GLOBAL static instance defaults will apply for all the following diagram creation. For example:
DiagramDefaults.GLOBAL.edgeLabelAutoRotate = true GraphmlFactory factory = GraphmlFactory.getInstance(); GraphmlDiagram diagram = factory.newDiagram(); DiagramDefaults defaults = diagram.getDefaults(); // defaults.edgeLabelAutoRotate is true
GraphmlFactory factory = GraphmlFactory.getInstance(); GraphmlDiagram diagram = factory.newDiagram(); DiagramDefaults defaults = diagram.getDefaults(); defaults.nodeFillColor = "#FFFFFF";
GraphmlFactory factory = GraphmlFactory.getInstance(); GraphmlDiagram diagram = factory.newDiagram(); DiagramDefaults defaults = diagram.getDefaults(); defaults.edgeLabelAutoRotate = true; defaults.edgeLabelAutoFlip = true;
GraphmlFactory factory = GraphmlFactory.getInstance(); GraphmlDiagram diagram = factory.newDiagram(); DiagramDefaults defaults = diagram.getDefaults(); defaults.autosized = true; defaults.padWidth = 15; defaults.padHeight = 15;
Copyright 2021 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence