Add a new knot.
@param x the knot position
@param color the color
@see #removeKnot
8346
public void addKnot(int x, int color) {
		int[] nx = new int[numKnots+1];
		int[] ny = new int[numKnots+1];
		System.arraycopy(xKnots, 0, nx, 0, numKnots);
		System.arraycopy(yKnots, 0, ny, 0, numKnots);
		xKnots = nx;
		yKnots = ny;
		xKnots[numKnots] = x;
		yKnots[numKnots] = color;
		numKnots++;
		sortKnots();
		rebuildGradient();
	}
55198
public void setColor(Color color) {
		if (color == null) {
			return;
		}
		
		currentColor = new Color(color);
		predraw();
		currentColor.bind();
		postdraw();
	}
24477
public void setCustomBarGraphColor(final Color COLOR) {
        getModel().setCustomValueColorObject(new CustomColorDef(COLOR));
        init(getInnerBounds().width, getInnerBounds().width);
        repaint(getInnerBounds());
    }
363877
public void setNeedleBorderColor(final Color COLOR) {
        if (null == needleBorderColor) {
            _needleBorderColor = null == COLOR ? Color.TRANSPARENT : COLOR;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            needleBorderColor.set(COLOR);
        }
    }
1215695
public final void addRing(double xy[]) {
		for (int i = 2; i < xy.length; i += 2) {
			addEdge(xy[i-2], xy[i - 1], xy[i], xy[i + 1]);
		}
	}
491379
public synchronized void add(double x) {
		final double oldA = a;
		a += (x - a) / ++size;
		q += (x - a) * (x - oldA);
		min = Math.min(min, x);
		max = Math.max(max, x);
	}
118720
public void setIconColor(@ColorInt int color){
        mEmptyIconColor = color;
        if (mEmptyIconColor != -1) {
            mIcon.setColorFilter(mEmptyIconColor, PorterDuff.Mode.SRC_IN);
        } else {
            mIcon.clearColorFilter();
        }
    }
1260234
function addRelToGraph(node){
    var children = [];
    for (var prop in node){
        if(node.hasOwnProperty(prop)){
            if (typeof node[prop] === 'object') {

                var linkedNodes = node[prop];
                // same for links
                if (colorsByLinkType[prop] == null) {
                    colorsByLinkType[prop] = getRandomColor();
                }
                
                for (var i = 0; i < linkedNodes.length; i++) {
                    //find node by id in the array (using jQuery)
                    const linkedNode = linkedNodes[i];
                    var nodeResult = getNodeFromId(linkedNode);
                    gChildrenNodes.push(nodeResult);
                    children.push(nodeResult);
                    //if the node is displayed, we add a link otherwise we will need to add it later
                    if (contains(gNodesDisplayed, nodeResult)){
                        g.addLink(node._id, nodeResult._id, prop);
                    } else {
                        nodesToBeLinked[nodeResult._id] = delayLinkCreation(node._id, nodeResult._id, prop);
                    }


                }
            }
        }
    }
    gNodesWithChildren[node._id] = children;
}
197972
public void setLinkColor(String color) throws HelloSignException {
        if (white_labeling_options == null) {
            white_labeling_options = new WhiteLabelingOptions();
        }
        white_labeling_options.setLinkColor(color);
    }
1136624
public void addNode(RNode newNode) {
        graph.add(newNode);
        graphBitSet.set(graph.size() - 1);
    }
135007
public void add(double[] x) {
        if (root == null) {
            root = new Node();
            root.add(new Leaf(x));
            root.update(x);
        } else {
            root.add(x);
        }
    }
1266823
public void set(XEvent o) {
		list.remove(position);
		list.add(position, o);
	}
1313334
private void updateForeground(Color color) {
        StyledDocument doc = (StyledDocument)getComponent().getDocument();
        Style style = doc.getStyle(StyleContext.DEFAULT_STYLE);

        if (style == null) {
            return;
        }

        if (color == null) {
            style.removeAttribute(StyleConstants.Foreground);
        } else {
            StyleConstants.setForeground(style, color);
        }
    }
460586
public void setKnotPosition(int n, int x) {
		xKnots[n] = PixelUtils.clamp(x);
		sortKnots();
		rebuildGradient();
	}
677397
public void setEdgeColor(Color color) {
        if (edgeColor == null) edgeColor = new RGBColor(0.0, 0.0, 0.0);
        setGradation(true);
        this.edgeColor = color;
    }
973399
public boolean add(XEvent event) {
		try {
			events.append(event);
		} catch (IOException e) {
			e.printStackTrace();
			return false;
		}
		return true;
	}
1246061
public function addRectangle($x1, $y1, $x2, $y2, $colors = [0, 0, 0])
    {
        $color = imagecolorallocate($this->image(), $colors[0],  $colors[1],  $colors[2]);
        imagerectangle ( $this->image() , $x1 , $y1 , $x2 , $y2 ,  $color );
    }