private Dimension calcDimensionOfSocket(BlockConnector socket) {
		Dimension finalDimension = new Dimension(0, 0);
		long curBlockID = socket.getBlockID();
		while (curBlockID != Block.NULL) {
			Block curBlock = workspace.getEnv().getBlock(curBlockID);
			// System.out.println("evaluating block :" +
			// curBlock.getBlockLabel());
			RenderableBlock curRenderableBlock = workspace.getEnv()
					.getRenderableBlock(curBlockID);
			Dimension curRBSize = curRenderableBlock.getBlockSize();

			// add height
			finalDimension.height += curRBSize.height;
			// subtract after plug
			if (curBlock.hasAfterConnector()) {
				finalDimension.height -= BlockConnectorShape.CONTROL_PLUG_HEIGHT;
			}
			// set largest width by iterating through to sockets and getting
			// the max width ONLY if curBlockID == connectedToBlockID
			int width = curRBSize.width;

			if (curBlock.getNumSockets() > 0 && !curBlock.isInfix()) {
				int maxSocWidth = getMaxWidthOfSockets(curBlockID);
				// need to add the placeholder width within bottom sockets if
				// maxSocWidth is zero
				if (maxSocWidth == 0) {
					// Adjust for zoom
					width += 2 * BlockShape.BOTTOM_SOCKET_SIDE_SPACER
							* curRenderableBlock.getZoom();
				}

				if (maxSocWidth > 0) {
					// need to minus the data plug width, otherwise it is
					// counted twice
					maxSocWidth -= BlockConnectorShape.NORMAL_DATA_PLUG_WIDTH;

					// Adjust for zoom
					width += maxSocWidth * curRenderableBlock.getZoom();
				}
			}

			if (width > finalDimension.width) {
				finalDimension.width = width;
			}

			// move down the afters
			curBlockID = workspace.getEnv().getBlock(curBlockID)
					.getAfterBlockID();
		}
		return finalDimension;
	}