Class Edge.Builder

  • Enclosing class:
    Edge

    public static class Edge.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder​(Node fromNode,
                       Node toNode)
      • Builder

        public Builder​(Edge origin,
                       Node fromNode,
                       Node toNode)
      • Builder

        public Builder​(Edge origin)
    • Method Detail

      • withArrows

        public Edge.Builder withArrows​(Arrows arrows)
        Represents options for arrowhead. By using this class you can indicate position of arrowhead on the edge
      • withArrowStrikethrough

        public Edge.Builder withArrowStrikethrough​(java.lang.Boolean arrowStrikethrough)
        Indicates whether edge should stop at an arrow. Default value is true.
      • withChosen

        public Edge.Builder withChosen​(ChosenEdge chosen)
        Indicates whether selecting or hovering on an edge should change the edge and/or it's label. If the option is not provided, no change will be applied.
      • withColor

        public Edge.Builder withColor​(EdgeColor color)
        Represents configuration for color of edge.
      • withDashes

        public Edge.Builder withDashes​(java.lang.String dashes)
        true, false or array with format [gap length, dash length ...]. Default value is false.
      • withFont

        public Edge.Builder withFont​(Font font)
        Represents options for label's font.
      • withHidden

        public Edge.Builder withHidden​(java.lang.Boolean hidden)
        Indicates whether edge should be hidden. Default value is false.
      • withHoverWidth

        public Edge.Builder withHoverWidth​(java.lang.String hoverWidth)
        Number of javaScript's function. Indicates edge width when mouse is over the edge. Function should have the following signature: function(width). Default value is 0.5
      • withId

        public Edge.Builder withId​(java.lang.String id)
        Id of edge. The id should be unique.
      • withLabel

        public Edge.Builder withLabel​(java.lang.String label)
        Label of an edge. Default value is null.
      • withLabelHighlightBold

        public Edge.Builder withLabelHighlightBold​(java.lang.Boolean labelHighlightBold)
        Indicates whether label should become bold when node is selected. Default value is true.
      • withLength

        public Edge.Builder withLength​(java.lang.Integer length)
        Indicates length of edge. Default value is null.
      • withPhysics

        public Edge.Builder withPhysics​(java.lang.Boolean physics)
        Indicates whether edge should be taken into account while physics simulation. Default value is true.
      • withScaling

        public Edge.Builder withScaling​(Scaling scaling)
        Represents option for scaling edges and nodes according to their properties.
      • withSelectionWidth

        public Edge.Builder withSelectionWidth​(java.lang.String selectionWidth)
        Integer or javaScript's function. Indicates width of edge when edge is selected. Function should have the following signature: function(width). Default value is 1.
      • withSelfReferenceSize

        public Edge.Builder withSelfReferenceSize​(java.lang.Integer selfReferenceSize)
        Indicates radius of circle when 'from' and 'to' points to the same node.
      • withShadow

        public Edge.Builder withShadow​(Shadow shadow)
        Represents options for casting a shadow of node and edge.
      • withSmooth

        public Edge.Builder withSmooth​(Smooth smooth)
        Indicates whether edge should be drawn as a quadratic bezier curve. Performance of these edges are worse, but they look better.
      • withTitle

        public Edge.Builder withTitle​(java.lang.String title)
        Title of edge. Default value is null.
      • withValue

        public Edge.Builder withValue​(java.lang.Integer value)
        Indicates value which is used for scaling. Default value is null.
      • withWidth

        public Edge.Builder withWidth​(java.lang.Integer width)
        Indicates width of an edge. Default value is 1.
      • withWidthConstraint

        public Edge.Builder withWidthConstraint​(java.lang.Integer widthConstraint)
        If value is provided then the maximum width of an edge is set to this value. Default value is null.
      • withData

        public Edge.Builder withData​(java.io.Serializable data)
      • build

        public Edge build()