Commit 602b2a6d authored by Nico Mack's avatar Nico Mack

Added labelGap property to ArcGraph corona

parent 04d09804
......@@ -55,6 +55,7 @@ public class ArcGraph extends ValueCorona {
protected Shape labelShape;
protected String labelFormat;
protected int labelGap;
protected Font textFont;
protected Stroke borderStroke;
protected int strokeWidth;
......@@ -106,6 +107,7 @@ public class ArcGraph extends ValueCorona {
this.bezelColour = builder.bezelColour;
this.labelShape = builder.labelShape;
this.labelFormat = builder.labelFormat;
this.labelGap = builder.labelGap;
this.textFont = builder.textFont;
this.strokeWidth = builder.strokeWidth;
this.rampingTime = builder.rampingTime;
......@@ -359,7 +361,7 @@ public class ArcGraph extends ValueCorona {
if ((labelShape != null) || (label.length() > 0)) {
Point labelOffset = this.getOffsetFromCenter();
translation.translate(labelOffset.x, labelOffset.y);
translation.translate(labelOffset.x + labelGap, labelOffset.y);
localCanvas.setTransform(translation);
}
......
......@@ -52,6 +52,7 @@ public class BaseArcGraphBuilder<B extends BaseArcGraphBuilder<B>> extends Value
public int strokeWidth;
public int landingLineLength;
public int leaderLineLength;
public int labelGap;
public Shape labelShape;
public String labelFormat;
public Font textFont;
......@@ -125,6 +126,7 @@ public class BaseArcGraphBuilder<B extends BaseArcGraphBuilder<B>> extends Value
labelShape = ShapeBootstrapper.getShape(rootElement.getChild(Externalization.LABEL_SHAPE_NODE), context, callback);
labelFormat = BootstrappingUtils.getContentAsString(rootElement, Externalization.LABEL_FORMAT_NODE, BootstrappingUtils.OPTIONAL, null);
labelGap = BootstrappingUtils.getContentAsInteger(rootElement, Externalization.LABEL_GAP_NODE, BootstrappingUtils.OPTIONAL, 0);
title = BootstrappingUtils.getContentAsString(rootElement, Externalization.TITLE_NODE, BootstrappingUtils.OPTIONAL, Externalization.EMPTY_STRING, context);
String fontName = BootstrappingUtils.getContentAsString(rootElement, Externalization.FONT_NODE, BootstrappingUtils.OPTIONAL, "Monospaced"); //$NON-NLS-1$
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment