Commit fa44bf40 authored by Nico Mack's avatar Nico Mack

TextColour attribute of ArcGraph is now optional. Required to hide label

when not needed.
parent 298dd40d
......@@ -51,7 +51,7 @@ import java.util.Map.Entry;
* @version 2.5.0
*/
public class DisplayWidget extends BaseWidget implements InputChangeListener {
public class DisplayWidget extends StatefulWidget implements InputChangeListener {
HashMap<String, NumericalVariable> variables;
Multimap<String, ValueCorona> dispatcher;
......
......@@ -3,7 +3,6 @@ package lu.list.itis.dkd.tui.widget;
import lu.list.itis.dkd.tui.adapter.TangibleObject;
import lu.list.itis.dkd.tui.utility.Point;
import lu.list.itis.dkd.tui.widget.builder.SelectorWidgetBuilder;
import lu.list.itis.dkd.tui.widget.corona.FadingCorona;
import lu.list.itis.dkd.tui.widget.corona.IndexedCorona;
import lu.list.itis.dkd.tui.widget.state.StateManager;
......@@ -12,7 +11,6 @@ import com.google.common.base.Preconditions;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
// ***************************************************************************
// * Class Definition and Members *
......@@ -215,13 +213,6 @@ public class SelectorWidget extends ValueWidget {
StateManager manager = states.get(widgetId);
boolean fadeIn = manager.isMoving() || manager.isRotating();
if (fadeIn) {
Stream<FadingCorona> autoFading = this.getCoronas(FadingCorona.class).stream().filter(corona -> corona.fadesWithHandle());
autoFading.forEach(corona -> corona.fadeIn());
}
if (manager.isRotating()) {
if (position != currentPosition) {
this.selectPosition(position);
......
......@@ -23,7 +23,7 @@ import java.util.Vector;
// * Class Definition and Members *
// ***************************************************************************
public abstract class BaseDisplayWidgetBuilder<B extends BaseDisplayWidgetBuilder<B>> extends BaseBuilder<B> {
public abstract class BaseDisplayWidgetBuilder<B extends BaseDisplayWidgetBuilder<B>> extends BaseStatefulBuilder<B> {
public Collection<Variable<?>> variables;
// ***************************************************************************
......
......@@ -101,7 +101,7 @@ public class ArcGraphBuilder extends ValueCoronaBuilder<ArcGraphBuilder> {
strokeWidth = BootstrappingUtils.getContentAsInteger(rootElement, Externalization.STROKE_WIDTH_NODE, BootstrappingUtils.OPTIONAL, 1, context);
fillColour = buildColorPair(rootElement.getChild(Externalization.FILL_COLOUR_ELEMENT), BootstrappingUtils.MANDATORY, context);
textColour = buildColorPair(rootElement.getChild(Externalization.TEXT_COLOUR_ELEMENT), BootstrappingUtils.MANDATORY, context);
textColour = buildColorPair(rootElement.getChild(Externalization.TEXT_COLOUR_ELEMENT), BootstrappingUtils.OPTIONAL, null);
strokeColour = buildColorPair(rootElement.getChild(Externalization.STROKE_COLOUR_ELEMENT), BootstrappingUtils.MANDATORY, context);
labelColour = buildColorPair(rootElement.getChild(Externalization.LABEL_COLOUR_ELEMENT), BootstrappingUtils.MANDATORY, context);
faceColour = buildColorPair(rootElement.getChild(Externalization.FACE_COLOUR_ELEMENT), BootstrappingUtils.OPTIONAL, 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