src/main/java/com/mxgraph/shape/mxCurveLabelShape.java
protected void calculationLabelPosition(Map<String, Object> style,
			String label)
	{
		double curveLength = curve.getCurveLength(mxCurve.LABEL_CURVE);
		double availableLabelSpace = curveLength - labelPosition.startBuffer
				- labelPosition.endBuffer;
		labelPosition.startBuffer = Math.max(labelPosition.startBuffer,
				labelPosition.startBuffer + availableLabelSpace / 2 - labelSize
						/ 2);
		labelPosition.endBuffer = Math.max(labelPosition.endBuffer,
				labelPosition.endBuffer + availableLabelSpace / 2 - labelSize
						/ 2);
	}
/**
	 * Hook method to override how the label is positioned on the curve
	 * @param style the style of the curve
	 * @param label the string label to be displayed on the curve
	 */
Hook method to override how the label is positioned on the curve
@param style the style of the curve
@param label the string label to be displayed on the curve
Hook method to override how the label is positioned on the curve @param style the style of the curve @param label the string label to be displayed on the curve
protected void calculationLabelPosition(Map<String, Object> style,
			String label)
	{
		double curveLength = curve.getCurveLength(mxCurve.LABEL_CURVE);
		double availableLabelSpace = curveLength - labelPosition.startBuffer
				- labelPosition.endBuffer;
		labelPosition.startBuffer = Math.max(labelPosition.startBuffer,
				labelPosition.startBuffer + availableLabelSpace / 2 - labelSize
						/ 2);
		labelPosition.endBuffer = Math.max(labelPosition.endBuffer,
				labelPosition.endBuffer + availableLabelSpace / 2 - labelSize
						/ 2);
	}
protected void calculationLabelPosition ( Map < String , Object > style , String label ) { double curveLength = curve . getCurveLength ( mxCurve . LABEL_CURVE ) ; double availableLabelSpace = curveLength - labelPosition . startBuffer - labelPosition . endBuffer ; labelPosition . startBuffer = Math . max ( labelPosition . startBuffer , labelPosition . startBuffer + availableLabelSpace / 2 - labelSize / 2 ) ; labelPosition . endBuffer = Math . max ( labelPosition . endBuffer , labelPosition . endBuffer + availableLabelSpace / 2 - labelSize / 2 ) ; }
Hook method to override how the label is positioned on the curve
 @param style the style of the curve
 @param label the string label to be displayed on the curve
Hook method to override how the label is positioned on the curve @param style the style of the curve @param label the string label to be displayed on the curve