Class Node.Builder
- java.lang.Object
-
- com.hybris.cockpitng.components.visjs.network.data.Node.Builder
-
- Enclosing class:
- Node
public static class Node.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Nodebuild()Node.BuilderwithBorderWidth(java.lang.Integer borderWidth)Indicates width of a node.Node.BuilderwithBorderWidthSelected(java.lang.Integer borderWidthSelected)Indicates width of selected node.Node.BuilderwithBrokenImage(java.lang.String brokenImage)Indicates URL to image when url provided for 'image' or 'circularImage' is broken.Node.BuilderwithChosen(ChosenNode chosen)Indicates whether selecting or hovering on a node should change the node and/or it's label.Node.BuilderwithColor(NodeColor color)Represents configuration for color of node.Node.BuilderwithData(java.io.Serializable data)Node.BuilderwithFixed(Fixed fixed)Options for fixing node position while physics simulation.Node.BuilderwithFont(Font font)Represents options for label's font.Node.BuilderwithGroup(java.lang.String group)Indicates node's group.Node.BuilderwithHeightConstraint(HeightConstraint heightConstraint)Represents options for height of a node.Node.BuilderwithHidden(java.lang.Boolean hidden)Indicates whether node is hidden.Node.BuilderwithIcon(Icon icon)Represents options for icon.Node.BuilderwithId(java.lang.String id)Indicates id of nodes.Node.BuilderwithImage(Image image)Represents image and circular image when These options are taken into account whenNode.shapeis set to 'image' or "circularImage".Node.BuilderwithLabel(java.lang.String label)Node's label.Node.BuilderwithLabelHighlightBold(java.lang.Boolean labelHighlightBold)Indicates whether label should become bold when node is selected.Node.BuilderwithLevel(java.lang.Integer level)Indicates level of node.Node.BuilderwithMargin(Margin margin)Represents margins of labels.Node.BuilderwithMass(java.lang.Integer mass)Indicates mass of node.Node.BuilderwithPhysics(java.lang.Boolean physics)Indicates whether node should be member of physics simulation.Node.BuilderwithScaling(Scaling scaling)Represents option for scaling edges and nodes according to their properties.Node.BuilderwithShadow(Shadow shadow)Represents options for casting a shadow of node and edge.Node.BuilderwithShape(java.lang.String shape)Indicates shape of node.Node.BuilderwithShapeProperties(ShapeProperties shapeProperties)Represents configuration for specific shapes.Node.BuilderwithSize(java.lang.Integer size)Indicates size of node.Node.BuilderwithTitle(java.lang.String title)Indicates title of node.Node.BuilderwithValue(java.lang.Integer value)Indicates value which is used for scaling.Node.BuilderwithWidthConstraint(WidthConstraint widthConstraint)Represents width of a node.Node.BuilderwithX(java.lang.Integer x)Indicates initial x position of node.Node.BuilderwithY(java.lang.Integer y)Indicates initial y position of node.
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(Node origin)
-
-
Method Detail
-
withBorderWidth
public Node.Builder withBorderWidth(java.lang.Integer borderWidth)
Indicates width of a node. Default value is 1.
-
withBorderWidthSelected
public Node.Builder withBorderWidthSelected(java.lang.Integer borderWidthSelected)
Indicates width of selected node. Default value is 2.
-
withBrokenImage
public Node.Builder withBrokenImage(java.lang.String brokenImage)
Indicates URL to image when url provided for 'image' or 'circularImage' is broken.
-
withChosen
public Node.Builder withChosen(ChosenNode chosen)
Indicates whether selecting or hovering on a node should change the node and/or it's label. If the option is not provided, no change will be applied.
-
withColor
public Node.Builder withColor(NodeColor color)
Represents configuration for color of node.
-
withFixed
public Node.Builder withFixed(Fixed fixed)
Options for fixing node position while physics simulation.
-
withFont
public Node.Builder withFont(Font font)
Represents options for label's font.
-
withGroup
public Node.Builder withGroup(java.lang.String group)
Indicates node's group. Default value is null.
-
withHeightConstraint
public Node.Builder withHeightConstraint(HeightConstraint heightConstraint)
Represents options for height of a node.
-
withHidden
public Node.Builder withHidden(java.lang.Boolean hidden)
Indicates whether node is hidden. Default value is false.
-
withIcon
public Node.Builder withIcon(Icon icon)
Represents options for icon. These options are taken into account whenNode.shapeis set to 'icon'.
-
withId
public Node.Builder withId(java.lang.String id)
Indicates id of nodes. Id should be unique.
-
withImage
public Node.Builder withImage(Image image)
Represents image and circular image when These options are taken into account whenNode.shapeis set to 'image' or "circularImage".
-
withLabel
public Node.Builder withLabel(java.lang.String label)
Node's label. Default value is null.
-
withLabelHighlightBold
public Node.Builder withLabelHighlightBold(java.lang.Boolean labelHighlightBold)
Indicates whether label should become bold when node is selected. Default value is true.
-
withLevel
public Node.Builder withLevel(java.lang.Integer level)
Indicates level of node. The value is taking into account only for hierarchical layout. Default value is null.
-
withMargin
public Node.Builder withMargin(Margin margin)
Represents margins of labels. These options are only taken into account whenNode.shapeis set to box, circle, database, icon or text.
-
withMass
public Node.Builder withMass(java.lang.Integer mass)
Indicates mass of node. Used in BarnesHut algorithm. Increasing the mass will increase repulsion of node. Default value is 1.
-
withPhysics
public Node.Builder withPhysics(java.lang.Boolean physics)
Indicates whether node should be member of physics simulation. Default value is true.
-
withScaling
public Node.Builder withScaling(Scaling scaling)
Represents option for scaling edges and nodes according to their properties.
-
withShadow
public Node.Builder withShadow(Shadow shadow)
Represents options for casting a shadow of node and edge.
-
withShape
public Node.Builder withShape(java.lang.String shape)
Indicates shape of node. Possible values are: ellipse, circle, database, box, text, image, circularImage, diamond, dot, star, triangle, triangleDown, square, icon. Default value is ellipse.
-
withShapeProperties
public Node.Builder withShapeProperties(ShapeProperties shapeProperties)
Represents configuration for specific shapes.
-
withSize
public Node.Builder withSize(java.lang.Integer size)
Indicates size of node. Default value is 25.
-
withTitle
public Node.Builder withTitle(java.lang.String title)
Indicates title of node. The value can be plain text or HTML.
-
withValue
public Node.Builder withValue(java.lang.Integer value)
Indicates value which is used for scaling. Default value is null.
-
withWidthConstraint
public Node.Builder withWidthConstraint(WidthConstraint widthConstraint)
Represents width of a node.
-
withX
public Node.Builder withX(java.lang.Integer x)
Indicates initial x position of node. Default value is null.
-
withY
public Node.Builder withY(java.lang.Integer y)
Indicates initial y position of node. Default value is null.
-
withData
public Node.Builder withData(java.io.Serializable data)
-
build
public Node build()
-
-