Aufgabe 4 angepasst.
This commit is contained in:
parent
dce3387032
commit
242d035756
|
@ -118,6 +118,11 @@ public class MainWindowController {
|
||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
results.setText(valueHandler.getResultBound());
|
results.setText(valueHandler.getResultBound());
|
||||||
|
if(valueHandler.areValuesOk()){
|
||||||
|
results.setBorder(new Border(new BorderStroke(Color.GREEN, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(1))));
|
||||||
|
}else {
|
||||||
|
results.setBorder(new Border(new BorderStroke(Color.RED, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(1))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package ch.zhaw.prog2.fxmlcalculator;
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.TextArea;
|
import javafx.scene.control.TextArea;
|
||||||
|
import javafx.scene.layout.*;
|
||||||
|
import javafx.scene.paint.Color;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,6 +32,11 @@ public class ResultWindowController {
|
||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
results.setText(valueHandler.getResultBound());
|
results.setText(valueHandler.getResultBound());
|
||||||
|
if(valueHandler.areValuesOk()){
|
||||||
|
results.setBorder(new Border(new BorderStroke(Color.GREEN, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(1))));
|
||||||
|
}else {
|
||||||
|
results.setBorder(new Border(new BorderStroke(Color.RED, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(1))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue