private int getAlignedX(Container target) {
		int left = 0;
		boolean ltr = target.getComponentOrientation().isLeftToRight();
		int width = preferredLayoutSize(target).width;
		switch(align) {
			case FlowLayout.LEFT:
				left += ltr ? 0 : target.getSize().width - width;
				break;
			case FlowLayout.CENTER:
				left += (target.getSize().width - width) / 2;
				break;
			case FlowLayout.RIGHT:
				left += ltr ? target.getSize().width - width : 0;
				break;
			case FlowLayout.LEADING:
				break;
			case FlowLayout.TRAILING:
				left += target.getSize().width - width;
				break;
		}
		return left;
	}