Dear users, Please note that, from Monday, August 16, 2019, RSA keys shorter than 2048bit will no longer be accepted for security reasons. Please update your keys as needed before this date. If you need assistance with regard to this process, please contact sia@list.lu

Thank you for your understanding.

Commit e37ab3ca authored by Nico Mack's avatar Nico Mack

ArcRangeGraph now inherits from SelectableCorona

parent 5f75cf08
......@@ -398,11 +398,11 @@ public class ArcRangeGraph extends ValueRangeCorona {
if (fillColour != null) {
if (positiveArc != null) {
localCanvas.setPaint(fillColour.getSecondColor());
localCanvas.setPaint((relative) ? fillColour.getSecondColor() : fillColour.getColor());
localCanvas.fill(positiveArc);
}
if (negativeArc != null) {
localCanvas.setPaint(fillColour.getFirstColor());
localCanvas.setPaint((relative) ? fillColour.getFirstColor() : fillColour.getColor());
localCanvas.fill(negativeArc);
}
}
......@@ -411,11 +411,11 @@ public class ArcRangeGraph extends ValueRangeCorona {
if (borderStroke != null)
localCanvas.setStroke(borderStroke);
if (positiveArc != null) {
localCanvas.setPaint(strokeColour.getSecondColor());
localCanvas.setPaint((relative) ? strokeColour.getSecondColor() : strokeColour.getColor());
localCanvas.draw(positiveArc);
}
if (negativeArc != null) {
localCanvas.setPaint(strokeColour.getFirstColor());
localCanvas.setPaint((relative) ? strokeColour.getFirstColor() : strokeColour.getColor());
localCanvas.draw(negativeArc);
}
}
......
......@@ -19,9 +19,8 @@ import java.awt.Graphics2D;
// * Class Definition and Members *
// ***************************************************************************
public class ValueCorona extends Corona implements InformationReceiver<Object> {
public class ValueCorona extends SelectableCorona implements InformationReceiver<Object> {
protected NumericalVariable variable;
protected boolean selected;
// ---------------------------------------------------------------------------
// ***************************************************************************
......@@ -32,7 +31,6 @@ public class ValueCorona extends Corona implements InformationReceiver<Object> {
public ValueCorona(ValueCoronaBuilder<?> builder) {
super(builder);
this.variable = builder.variable;
this.selected = false;
}
// ---------------------------------------------------------------------------
......@@ -40,7 +38,6 @@ public class ValueCorona extends Corona implements InformationReceiver<Object> {
public ValueCorona(ValueCorona original) {
super(original);
this.variable = (original.variable != null) ? original.variable.clone() : null;
this.selected = false;
}
// ---------------------------------------------------------------------------
......@@ -69,17 +66,6 @@ public class ValueCorona extends Corona implements InformationReceiver<Object> {
@Override
public void paint(Graphics2D canvas) {}
// ---------------------------------------------------------------------------
public boolean isSelected() {
return this.selected;
}
// ---------------------------------------------------------------------------
public void setSelected(boolean selectIt) {
this.selected = selectIt;
}
// ---------------------------------------------------------------------------
......
......@@ -27,10 +27,9 @@ import java.util.Map;
// * Class Definition and Members *
// ***************************************************************************
public class ValueRangeCorona extends Corona implements InformationReceiver<ValueRange>, VariableBased {
public class ValueRangeCorona extends SelectableCorona implements InformationReceiver<ValueRange>, VariableBased {
protected NumericalVariable lowerBoundVariable;
protected NumericalVariable upperBoundVariable;
protected boolean selected;
// ***************************************************************************
// * Constants *
......@@ -48,7 +47,6 @@ public class ValueRangeCorona extends Corona implements InformationReceiver<Valu
super(builder);
this.lowerBoundVariable = builder.lowerBoundVariable;
this.upperBoundVariable = builder.upperBoundVariable;
this.selected = false;
}
// ---------------------------------------------------------------------------
......@@ -57,7 +55,6 @@ public class ValueRangeCorona extends Corona implements InformationReceiver<Valu
super(original);
this.lowerBoundVariable = (original.lowerBoundVariable != null) ? original.lowerBoundVariable.clone() : null;
this.upperBoundVariable = (original.upperBoundVariable != null) ? original.upperBoundVariable.clone() : null;
this.selected = false;
}
// ---------------------------------------------------------------------------
......@@ -101,18 +98,6 @@ public class ValueRangeCorona extends Corona implements InformationReceiver<Valu
// ---------------------------------------------------------------------------
public boolean isSelected() {
return this.selected;
}
// ---------------------------------------------------------------------------
public void setSelected(boolean selectIt) {
this.selected = selectIt;
}
// ---------------------------------------------------------------------------
@Override
public void setInformation(ValueRange information) {
if (information != null) {
......
......@@ -24,7 +24,7 @@ import org.jdom2.Element;
// * Class Definition and Members *
// ***************************************************************************
public abstract class BaseValueCoronaBuilder<B extends BaseValueCoronaBuilder<B>> extends CoronaBuilder<B> {
public abstract class BaseValueCoronaBuilder<B extends BaseValueCoronaBuilder<B>> extends BaseSelectableCoronaBuilder<B> {
public NumericalVariable variable;
// ***************************************************************************
......
......@@ -24,7 +24,7 @@ import org.jdom2.Element;
// * Class Definition and Members *
// ***************************************************************************
public abstract class BaseValueRangeCoronaBuilder<B extends BaseValueRangeCoronaBuilder<B>> extends CoronaBuilder<B> {
public abstract class BaseValueRangeCoronaBuilder<B extends BaseValueRangeCoronaBuilder<B>> extends BaseSelectableCoronaBuilder<B> {
public NumericalVariable lowerBoundVariable;
public NumericalVariable upperBoundVariable;
......@@ -52,7 +52,7 @@ public abstract class BaseValueRangeCoronaBuilder<B extends BaseValueRangeCorona
// ---------------------------------------------------------------------------
protected BaseValueRangeCoronaBuilder(Element rootElement, BootstrapContext context, BootstrapCallback callback) throws BuildException {
super(rootElement);
super(rootElement, context, callback);
this.buildFromBootstrap(rootElement, context, callback);
}
......
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