public Wire(Circuit c, Color col, boolean orientation, int px1, int py1, int px2, int py2, Wire previous) {
		this.circuit = c;

		this.prev = previous;
		if (this.prev != null) {
			this.color = this.prev.color;
			px1 = this.prev.x2;
			py1 = this.prev.y2;
			this.prev.next = this;
		} else {
			this.color = col;
		}

		this.Horizontal = orientation;
		if (this.Horizontal) {
			py2 = py1;
			this.height = 8;
			this.yloc = py1;

			if (px2 > px1) {
				this.width = 8 + px2 - px1;
				this.xloc = px1;
			} else {
				this.width = 8 + px1 - px2;
				this.xloc = px2;
			}
		} else {
			px2 = px1;
			this.width = 8;
			this.xloc = px1;

			if (py2 > py1) {
				this.height = 8 + py2 - py1;
				this.yloc = py1;
			} else {
				this.height = 8 + py1 - py2;
				this.yloc = py2;
			}
		}

		this.setLocation(this.xloc, this.yloc);
		this.x1 = px1;
		this.x2 = px2;
		this.y1 = py1;
		this.y2 = py2;
		this.setSize(this.width, this.height);

		if (this.color != null) {
			this.maincolor = this.color;
			this.selectedcolor = new Color(255 - this.color.getRed(), 255 - this.color.getGreen(), 255 - this.color.getBlue());
		}
	}