Class Node.Builder

  • Enclosing class:
    Node

    public static class Node.Builder
    extends java.lang.Object
    • 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 when Node.shape is 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 when Node.shape is 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 when Node.shape is 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.
      • 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()