Commit f02dedd1 authored by Nico Mack's avatar Nico Mack

Added centred property to CoxcombSlice corona

parent d2a04ba4
......@@ -60,6 +60,7 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
protected String label;
protected boolean radialLayout;
protected boolean centered;
protected boolean blinkOnOutOfRange;
protected boolean faceIsTouchable;
......@@ -113,6 +114,7 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
this.label = builder.label;
this.radialLayout = builder.radialLayout;
this.centered = builder.centered;
this.innerRadius = builder.innerRadius;
this.lowerBoundRadius = Math.min(builder.lowerBoundRadius, builder.upperBoundRadius);
this.upperBoundRadius = Math.max(builder.lowerBoundRadius, builder.upperBoundRadius);
......@@ -148,6 +150,7 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
this.label = original.label;
this.radialLayout = original.radialLayout;
this.centered = original.centered;
this.innerRadius = original.innerRadius;
this.lowerBoundRadius = original.lowerBoundRadius;
this.upperBoundRadius = original.upperBoundRadius;
......@@ -235,7 +238,7 @@ public class CoxcombSlice extends ValueCorona implements InformationProvider<Obj
labelPath = rotate.createTransformedShape(centreLine);
}
TextStroke stroke = new TextStroke(label, textFont, false, true, false);
TextStroke stroke = new TextStroke(label, textFont, false, centered, false);
labelShape = stroke.createStrokedShape(labelPath);
this.setInformation(this.variable.getValue());
this.setSelected(this.isSelected);
......
......@@ -42,6 +42,7 @@ public abstract class BaseCoxcombSliceBuilder<B extends BaseCoxcombSliceBuilder<
public String label;
public boolean radialLayout;
public boolean centered;
public boolean blinkOnOutOfRange;
public boolean faceIsTouchable;
......@@ -129,6 +130,7 @@ public abstract class BaseCoxcombSliceBuilder<B extends BaseCoxcombSliceBuilder<
labelAngle = BootstrappingUtils.getContentAsDouble(rootElement, CpsNamespace.LABEL_ANGLE_NODE, BootstrappingUtils.OPTIONAL, Double.NaN, context);
radialLayout = BootstrappingUtils.getContentAsBoolean(rootElement, Externalization.RADIAL_LAYOUT_NODE, BootstrappingUtils.OPTIONAL, Boolean.FALSE, context);
centered = BootstrappingUtils.getContentAsBoolean(rootElement, Externalization.CENTRED_NODE, BootstrappingUtils.OPTIONAL, Boolean.TRUE, context);
cappedDisplay = BootstrappingUtils.getContentAsBoolean(rootElement, CpsNamespace.CAPPED_DISPLAY_NODE, BootstrappingUtils.OPTIONAL, Boolean.FALSE, context);
blinkOnOutOfRange = BootstrappingUtils.getContentAsBoolean(rootElement, CpsNamespace.BLINK_ON_OUT_OF_RANGE_NODE, BootstrappingUtils.OPTIONAL, Boolean.FALSE, context);
faceIsTouchable = BootstrappingUtils.getContentAsBoolean(rootElement, CpsNamespace.FACE_IS_TOUCHABLE_NODE, BootstrappingUtils.OPTIONAL, Boolean.FALSE, context);
......
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