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