Gui updated beim zweiten Aufruf nicht mehr

Grizu66

Mitglied
Hallo liebe Community,

ich habe da ein Problem an dem nun schon einige Tage sitze. und es geht hier um eine Analyse App. Die funktioniert auch schon soweit wie sie es momentan soll.
jedoch habe ich das Problem das GUI sich beim zweiten Aufruf nicht mehr updated. Sprich nur die Steuerelemente. Aufgerufen wird die zweite Stage von der Primary stage:
1623915473754.png
hieröffnet sich dann ein Dialog in dem ich ein Datenfile auswählen kann. In diesem file sind einzelne xml strings hinterlegt:
1623915569270.png
Beim ersten Aufruf geht alles seinen normalen Gang:
1623915631619.png
Wenn ich das fenster jetzt schliesse und erneut aufrufe, reagieren die Steuerelemente nicht mehr sprich werden nicht upgedatet.
1623915731920.png


Ich kann aber nachvollziehen das der gesamte xml Parser durchlaufen wird, auch die Auswertung erfolgt. Schlussendlich werden auch die Daten in ein Excelsheet
geschrieben. Das funktioniert auch beim zweiten Aufruf. Nur die Steuerelemente aktualisieren sich nicht.

Hat da vielleicht jemand eine Idee?

Hier mal die Klasse die die zweite stage aufruft:

[CODE lang="java" title="Pere Form Klasse"]package performanceMonitoring;

import java.io.IOException;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import javafx.stage.WindowEvent;

public class PerformanceForm {

public AnchorPane root = new AnchorPane();



public void performanceForm () throws IOException {
root.setMaxWidth(600);
root.setMaxWidth(900);

Parent root = FXMLLoader.load(getClass().getResource("Performance.fxml"));
Scene scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("performance.css").toExternalForm());
Stage stage = new Stage(StageStyle.DECORATED);
stage.setTitle("");
stage.getIcons().add(new Image ("/img/ET.png"));
stage.setMaxHeight(1050);
stage.setMaxWidth(1920);
stage.setMaximized(true);
stage.setTitle("System Performance");
stage.centerOnScreen();
stage.setScene(scene);
stage.show();
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
public void handle(WindowEvent we) {

stage.close();
}
});
}



}
[/CODE]

Hier ist mal die gesamte Controller Klasse:

[CODE lang="java" title="Controller Klasse"]package performanceMonitoring;

import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.sql.SQLException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import application.ErrorHandling;
import application.Main;
import dbHandle.Systems;
import dbHandle.TABLE_Systems;
import javafx.application.Platform;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.concurrent.Task;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.chart.Axis;
import javafx.scene.chart.BarChart;
import javafx.scene.chart.CategoryAxis;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.StackedBarChart;
import javafx.scene.chart.XYChart;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.TabPane;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;

public class PerformanceController {

@FXML Button btn_Home = new Button();
@FXML Button btn_Hardware = new Button();
@FXML Button btn_LFT = new Button();
@FXML Button btn_Volume = new Button();
@FXML Button btn_Scale = new Button();
@FXML Button btn_Gap = new Button();
@FXML Button btn_Barcode = new Button();
@FXML Button btn_VolumePerformance = new Button();
@FXML Button btn_VolumePosition= new Button();
@FXML Button btn_VolumeSize= new Button();


@FXML Label lbl_Site = new Label();
@FXML Label lbl_SystemID = new Label();
@FXML Label lbl_SystemName = new Label();
@FXML Label lbl_DatabaseName = new Label();
@FXML Label lbl_Progress = new Label();
@FXML Label lbl_VolumeCubic = new Label();
@FXML Label lbl_VolumeUnshaped = new Label();
@FXML Label lbl_VolumeNoShape = new Label();
@FXML Label lbl_VolumeOutsideFront = new Label();
@FXML Label lbl_VolumeOutsideBack = new Label();
@FXML Label lbl_VolumeOutsideLeft = new Label();
@FXML Label lbl_VolumeOutsideRight = new Label();
@FXML Label lbl_VolumeInside = new Label();
@FXML Label lbl_VolumeoutsideFrontBack = new Label();
@FXML Label lbl_VolumeoutsideLeftRight = new Label();
@FXML Label lbl_VolumeoutsideBottom = new Label();
@FXML Label lbl_VolumeoutsideNoObject = new Label();

@FXML ListView<String> lv_PerformanceWarnings = new ListView<String>();

@FXML ProgressBar pb_loadObjects = new ProgressBar();

@FXML AnchorPane ap_Objects = new AnchorPane();
@FXML TabPane tp_Performance = new TabPane();
@FXML TabPane tp_Volume = new TabPane();

@FXML Axis<String> speed_xAxis = new CategoryAxis();
@FXML Axis<Number> speed_yAxis = new NumberAxis();
@FXML LineChart<String, Number> lc_SpeedChart = new LineChart<String, Number>(speed_xAxis, speed_yAxis);


@FXML CategoryAxis barcodeCounter_xAxis = new CategoryAxis();
@FXML Axis<Number> barcodeCounter_yAxis = new NumberAxis();
@FXML BarChart<String, Number> bc_BarcodeCounter = new BarChart<String, Number>(barcodeCounter_xAxis, barcodeCounter_yAxis);


@FXML CategoryAxis objects1_xAxis = new CategoryAxis();
@FXML Axis<Number> objects1_yAxis = new NumberAxis();
@FXML StackedBarChart<String, Number> bc_Objects1 = new StackedBarChart<String, Number>(objects1_xAxis, objects1_yAxis);

@FXML CategoryAxis performance_xAxis = new CategoryAxis();
@FXML NumberAxis performance_yAxis = new NumberAxis();
@SuppressWarnings({ "unchecked", "rawtypes" })
@FXML StackedBarChart<String, Double> bc_Performance = new StackedBarChart(performance_xAxis, performance_yAxis);

public static String siteName = null;
public static String system_ID = null;
public static String system_Name = null;
public static String filename = null;

private static String sTimestamp = null;
private static Integer numberObjects = 0;
private static Integer validVolumeObjects = 0;
private static Integer validLFTObjects = 0;
private static Integer invalidLFTObjects = 0;
private static Integer lftRead= 0;
private static Integer validVMS = 0;
private static Integer invalidVMS = 0;
private static Integer validScale = 0;
private static Integer invalidScale = 0;
private static Integer cubicItem = 0;
private static Integer unshapedItem = 0;
private static Integer noshapeItem = 0;
private static Integer outsideFront = 0;
private static Integer outsideBack = 0;
private static Integer outsideleft = 0;
private static Integer outsideRight = 0;
private static Integer inside = 0;
private static Integer outsideFrontBack = 0;
private static Integer noItemDuringTrigger = 0;
private static Integer outsideLeftRight = 0;
private static Integer outsideBottom = 0;
private static Integer invalidScaleObject = 0;
private static Integer validScaleObject = 0;
private static Integer barcodeGoodRead = 0;
private static Integer barcodeCounter = 0;
private static Integer barcodeCounterValid = 0;
private static Integer barcodeInvalid = 0;

private static ObservableList<SortSpeed> sortSpeedList = FXCollections.observableArrayList();

private static DecimalFormat df = new DecimalFormat("0.00");


public static IntegerProperty evaluateLogfile = new SimpleIntegerProperty(0);



XYChart.Series<String, Number> speedObjects = new XYChart.Series<String, Number>();
XYChart.Series<String, Number> barcodeObjects = new XYChart.Series<String, Number>();
XYChart.Series<String, Number> allObjects = new XYChart.Series<String, Number>();
XYChart.Series<String, Number> invalidObjects = new XYChart.Series<String, Number>();

XYChart.Series<String, Double> performanceRead = new XYChart.Series<String, Double>();
XYChart.Series<String, Double> performanceNoread = new XYChart.Series<String, Double>();



//----------------------------------------------------------------------------------------------------------------

@SuppressWarnings({ "unchecked" })
@FXML
private void initialize() throws IOException{
fillheader();

pb_loadObjects.setStyle("-fx-accent: #ffffff;");

//speed chart
speedObjects.setName("Sort Speed");
speed_xAxis.setLabel("Objects");
speed_yAxis.setLabel("Sort Speed mm/s");

//speedObjects.getData().add(new XYChart.Data<String, Number>("0", 500));
//lc_SpeedChart.autosize();
lc_SpeedChart.setAnimated(false);
lc_SpeedChart.setTitle("Sort Speed Analyse");
lc_SpeedChart.getData().addAll(speedObjects);

// Performance Chart
performance_yAxis.setLabel("%");
performanceRead.setName("Valid reads");
performanceNoread.setName("Noread");

performanceRead.getData().add(new XYChart.Data<String, Double>("Barcode", 40.0));
performanceRead.getData().add(new XYChart.Data<String, Double>("LFT", 40.0));
performanceRead.getData().add(new XYChart.Data<String, Double>("LFT Valid", 40.0));
performanceRead.getData().add(new XYChart.Data<String, Double>("Volume", 40.0));
performanceRead.getData().add(new XYChart.Data<String, Double>("Volume Valid", 40.0));
performanceRead.getData().add(new XYChart.Data<String, Double>("Scale", 40.0));
performanceRead.getData().add(new XYChart.Data<String, Double>("Scale Valid", 40.0));

performanceNoread.getData().add(new XYChart.Data<String, Double>("Barcode", 20.0));
performanceNoread.getData().add(new XYChart.Data<String, Double>("LFT", 20.0));
performanceNoread.getData().add(new XYChart.Data<String, Double>("LFT Valid", 20.0));
performanceNoread.getData().add(new XYChart.Data<String, Double>("Volume", 20.0));
performanceNoread.getData().add(new XYChart.Data<String, Double>("Volume Valid", 20.0));
performanceNoread.getData().add(new XYChart.Data<String, Double>("Scale", 20.0));
performanceNoread.getData().add(new XYChart.Data<String, Double>("Scale Valid", 20.0));

bc_Performance.setAnimated(false);
bc_Performance.setTitle("System Performance");
bc_Performance .getData().addAll(performanceRead, performanceNoread);

// objects Chart
allObjects.setName("Valid Objects");
invalidObjects.setName("Out of Specification");

allObjects.getData().add(new XYChart.Data<String, Number>("Objects", 40));
allObjects.getData().add(new XYChart.Data<String, Number>("Valid", 20));
allObjects.getData().add(new XYChart.Data<String, Number>("LFT", 20));
allObjects.getData().add(new XYChart.Data<String, Number>("VMS", 20));
allObjects.getData().add(new XYChart.Data<String, Number>("Scale", 20));


invalidObjects.getData().add(new XYChart.Data<String, Number>("Objects", 0));
invalidObjects.getData().add(new XYChart.Data<String, Number>("Valid", 20));
invalidObjects.getData().add(new XYChart.Data<String, Number>("LFT", 20));
invalidObjects.getData().add(new XYChart.Data<String, Number>("VMS", 20));
invalidObjects.getData().add(new XYChart.Data<String, Number>("Scale", 20));

bc_Objects1.setAnimated(false);
bc_Objects1.setTitle("Object Evaluation");
bc_Objects1 .getData().addAll(allObjects, invalidObjects);

// Barcode Counter Chart
barcodeObjects.setName("Barcode Count");

barcodeObjects.getData().add(new XYChart.Data<String, Number>("Objects", 0));
barcodeObjects.getData().add(new XYChart.Data<String, Number>("Good Read", 0));
barcodeObjects.getData().add(new XYChart.Data<String, Number>("Code Counter (cc)", 0));
barcodeObjects.getData().add(new XYChart.Data<String, Number>("Valid Code Counter (vcc)", 0));
barcodeObjects.getData().add(new XYChart.Data<String, Number>("Invalid Codes", 0));

bc_BarcodeCounter.setAnimated(false);
bc_BarcodeCounter.setTitle("Barcode Counter");
bc_BarcodeCounter.getData().addAll(barcodeObjects);


evaluateLogfile.addListener( new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {

if(evaluateLogfile.getValue() > 0) {
try {
xmlParser(filename, system_ID);
} catch (IOException | SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
evaluateLogfile.setValue(0);
}
} );
}



private void fillheader() {
lbl_Site.setText(siteName);
lbl_SystemID.setText(system_ID);
lbl_SystemName.setText(system_Name);
lbl_DatabaseName.setText(Main.DB_SITE_CONNECTION_STRING);

}

@SuppressWarnings("unchecked")
public void objectPerformance(Integer volume, Integer volumeNoread, Integer volumeNoreadValid, String systemID
) throws IOException, SQLException {

ObservableList<Systems> customSystems = FXCollections.observableArrayList();
customSystems.clear();
customSystems.addAll(TABLE_Systems.getSystembyID(systemID));


Platform.runLater(new Runnable() {
@Override
public void run() {


if(customSystems.get(0).getVol().toString().equals("true")){

double rate = 100.0/numberObjects * volume;
double noRate = 100.0/numberObjects * volumeNoread;
double volumeRate = 100.0/validVolumeObjects * volume;
double noVolumeRate = 100.0/validVolumeObjects * volumeNoreadValid;

performanceRead.getData().add(createVolumeValid("Volume", rate, volume));
performanceRead.getData().add(createVolumeValid("Volume Valid", volumeRate, volume));

performanceNoread.getData().add(createVolumeValid("Volume", noRate, volumeNoread));
performanceNoread.getData().add(createVolumeValid("Volume Valid", noVolumeRate, volumeNoreadValid));
}

bc_Performance.getData().clear();
bc_Performance.layout();
bc_Performance.getData().addAll(performanceRead, performanceNoread);

}
});
}


@SuppressWarnings({ "unchecked", "rawtypes" })
private XYChart.Data createVolumeValid(String objecttype, Double value, Integer objects) {
XYChart.Data data = new XYChart.Data(objecttype, value);

String text = df.format(value) + "%";

StackPane node = new StackPane();
Label label = new Label(text);
label.setFont(new Font("Arial", 12));
label.setTextFill(Color.web("#ffffff"));
Label label1 = new Label(objects.toString());
label1.setFont(new Font("Arial", 12));
label1.setTextFill(Color.web("#ffffff"));
VBox group = new VBox(label, label1);
group.setAlignment(Pos.CENTER);
StackPane.setAlignment(group, Pos.CENTER);
StackPane.setMargin(group, new Insets(20, 0, 5, 0));
node.getChildren().add(group);
data.setNode(node);

return data;
}



@SuppressWarnings("unchecked")
public void barcodeCounterChart(Integer objects, Integer gr, Integer cc, Integer vcc, Integer icc) throws IOException{


Platform.runLater(new Runnable() {
@Override
public void run() {
barcodeObjects.getData().add(createCodeCounter("Objects", objects));
barcodeObjects.getData().add(createCodeCounter("Good Read", gr));
barcodeObjects.getData().add(createCodeCounter("Code Counter (cc)", cc));
barcodeObjects.getData().add(createCodeCounter("Valid Code Counter (vcc)", vcc));
barcodeObjects.getData().add(createCodeCounter("Invalid Codes", icc));

bc_BarcodeCounter.getData().clear();
bc_BarcodeCounter.layout();
bc_BarcodeCounter.getData().addAll(barcodeObjects);
}
});
}

@SuppressWarnings({ "unchecked", "rawtypes" })
private XYChart.Data createCodeCounter(String objecttype, Integer value) {
XYChart.Data data = new XYChart.Data(objecttype, value);

double objects = 100.0/numberObjects * value;
String s = df.format(objects) + "%";
String text = value.toString();


StackPane node = new StackPane();
Label label = new Label(text);
label.setFont(new Font("Arial", 12));
label.setTextFill(Color.web("#ffffff"));
Label label1 = new Label(s);
label1.setFont(new Font("Arial", 12));
label1.setTextFill(Color.web("#ffffff"));
VBox group = new VBox(label, label1);
group.setAlignment(Pos.CENTER);
StackPane.setAlignment(group, Pos.BOTTOM_CENTER);
StackPane.setMargin(group, new Insets(20, 0, 5, 0));
node.getChildren().add(group);
data.setNode(node);

return data;
}


@SuppressWarnings("unchecked")
public void objectsChart(Integer objects, Integer valid, Integer invalid, Integer lft, Integer validLFT, Integer vms, Integer validVMS, Integer scale,
Integer validScale, String systemID) throws IOException, SQLException {

ObservableList<Systems> customSystems = FXCollections.observableArrayList();
customSystems.clear();
customSystems.addAll(TABLE_Systems.getSystembyID(systemID));

Platform.runLater(new Runnable() {
@Override
public void run() {
allObjects.getData().add(createData("Objects", objects));
allObjects.getData().add(createData("Valid", valid));

invalidObjects.getData().add((new XYChart.Data<String, Number>("Objects", 0)));
invalidObjects.getData().add(createData("Valid", invalid));

if(customSystems.get(0).getLFT().toString().equals("true")){
allObjects.getData().add(createData("LFT", lft));
invalidObjects.getData().add(createData("LFT", validLFT));
}

if(customSystems.get(0).getVol().toString().equals("true")){
allObjects.getData().add(createData("VMS", vms));
invalidObjects.getData().add(createData("VMS", validVMS));
}


if(customSystems.get(0).getWeight().toString().equals("true")){
allObjects.getData().add(createData("Scale", scale));
invalidObjects.getData().add(createData("Scale", validScale));
}

bc_Objects1.getData().clear();
bc_Objects1.layout();
bc_Objects1.getData().addAll(allObjects, invalidObjects);

}
});
}



@SuppressWarnings({ "unchecked", "rawtypes" })
private XYChart.Data createData(String objecttype, Integer value) {
XYChart.Data data = new XYChart.Data(objecttype, value);

double objects = 100.0/numberObjects * value;
String s = df.format(objects) + "%";
String text = value.toString();


StackPane node = new StackPane();
Label label = new Label(text);
label.setFont(new Font("Arial", 12));
label.setTextFill(Color.web("#ffffff"));
Label label1 = new Label(s);
label1.setFont(new Font("Arial", 12));
label1.setTextFill(Color.web("#ffffff"));
VBox group = new VBox(label, label1);
group.setAlignment(Pos.CENTER);
StackPane.setAlignment(group, Pos.BOTTOM_CENTER);
StackPane.setMargin(group, new Insets(20, 0, 5, 0));
node.getChildren().add(group);
data.setNode(node);

return data;
}

// Speed Chart
@SuppressWarnings("unchecked")
public void speedChart() throws IOException{

Integer lineCount = sortSpeedList.size();
Integer step = 1;
Integer value = 0;

if(lineCount > 100) {
step = 30;
}else if(lineCount > 1000) {
step = 30;
}else if(lineCount > 3000) {
step = 50;
}else if(lineCount > 5000) {
step = 100;
}

for (Integer b = 0; b < sortSpeedList.size(); b++) {
String s = sortSpeedList.get(b).getObject();
Integer i = sortSpeedList.get(b).getSpeed();

if(b.equals(value)){
value = value + step;
Platform.runLater(new Runnable() {
@Override
public void run() {
speedObjects.getData().add(new XYChart.Data<String, Number>(s, i));


lc_SpeedChart.getData().clear();
lc_SpeedChart.layout();
lc_SpeedChart.getData().addAll(speedObjects);
}
});
}
}
}





// Read Datafile ---------------------------------------------------------------------------------------------------------------------------------------------
@SuppressWarnings({ "unused", "unchecked" })
public void xmlParser(String filename, String systemID) throws IOException, SQLException {
System.out.println("called");
allObjects.getData().clear();
invalidObjects.getData().clear();
lv_PerformanceWarnings.getItems().clear();

ObservableList<Systems> customSystems = FXCollections.observableArrayList();
customSystems.clear();
customSystems.addAll(TABLE_Systems.getSystembyID(systemID));

String templateName = customSystems.get(0).getTemplate();
String sFileoutput = customSystems.get(0).getFileoutput();
String sSite = customSystems.get(0).getSite();
String sSystemID = customSystems.get(0).getSystemID();
String sName = customSystems.get(0).getName();

String lftSystem = customSystems.get(0).getLFT();
String volumeSystem = customSystems.get(0).getVol();
String scaleSystem = customSystems.get(0).getWeight();

System.out.println("before task");
sortSpeedList.clear();
// Create a background Task
Task<Void> task = new Task<Void>() {
@Override
protected Void call() throws Exception {
System.out.println("in task");
Integer objectCount = 0;
Integer invalidObjects = 0;
Integer volumeRead = 0;
Integer scaleRead = 0;
Integer lineCount = 0;
Integer lineCountSpeed = 0;
Integer sortSpeed = 0;
Integer sortSpeedOld = 0;
int fileLines = 0;
Boolean invalidObject = false;
Boolean warningVolumeReadingArea = false;
Boolean warningVolumeItemToSmall = false;
Boolean warningVolumeItemToBig= false;
Boolean warningInvalidCode= false;
Boolean lftGoodRead = false;
Boolean volumeGoodRead = false;
Boolean scaleGoodRead = false;
double linesread = 0.00;


try {
@SuppressWarnings("resource")
BufferedReader in = new BufferedReader(new FileReader(filename));
while ( in.readLine() != null ) {
fileLines++;
}
}
catch (Exception ex) {
ex.printStackTrace();
}


try (BufferedReader br = Files.newBufferedReader(Paths.get(filename))) {


// read line by line
String line;
while ((line = br.readLine()) != null) {
InputStream stream = new ByteArrayInputStream(line.getBytes());

DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(stream);

doc.getDocumentElement().normalize();
String telegramType = doc.getDocumentElement().getNodeName();

if (telegramType.equals("objectdata")) { // Start of objectdata
NodeList nList = doc.getElementsByTagName("objectdata");

for (int i = 0; i < nList.getLength(); i++) {
Node nNode = nList.item(i);

if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;

sTimestamp = eElement.getElementsByTagName("timestamp").item(0).getTextContent();

}
}

// General Object data ------------------------------------------------------------------------------------------------
nList = doc.getElementsByTagName("general");
for (int i1 = 0; i1 < nList.getLength(); i1++) {
Node nNode = nList.item(i1);
//System.out.println("\nCurrent Element :" + nNode.getNodeName());

if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;
}
}

// Volume data ----------------------------------------------------------------------------------------------------------
nList = doc.getElementsByTagName("volumetric");
for (int i1 = 0; i1 < nList.getLength(); i1++) {
Node nNode = nList.item(i1);
//System.out.println("\nCurrent Element :" + nNode.getNodeName());

if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;

String OMS1 = eElement.getAttribute("oms1");
String OMS2 = eElement.getAttribute("oms2");
String OMS3 = eElement.getAttribute("oms3");
String volumeUnit = eElement.getElementsByTagName("size").item(0).getAttributes().getNamedItem("unit").toString();
String OLE = eElement.getElementsByTagName("size").item(0).getAttributes().getNamedItem("ole").getNodeValue();
String OWI = eElement.getElementsByTagName("size").item(0).getAttributes().getNamedItem("owi").getNodeValue();
String OHE = eElement.getElementsByTagName("size").item(0).getAttributes().getNamedItem("ohe").getNodeValue();


if((Integer.parseInt(OLE) > 1) && (Integer.parseInt(OWI) > 1) && (Integer.parseInt(OHE) >1) && (OMS1.equals("0000"))) {
volumeRead++;
volumeGoodRead = true;
}else {
volumeGoodRead = false;
}

//Item inside/outside reading area
String sArea = Character.toString(OMS2.charAt(3));
Integer iArea = Integer.parseInt(sArea);
switch (iArea) {
case 1: {
outsideFront++;
break;
}
case 2: {
outsideBack++;
break;
}
case 3: {
outsideFrontBack++;
break;
}
case 8: {
noItemDuringTrigger++;
break;
}
default: {

break;
}
}

String sArea1 = Character.toString(OMS2.charAt(6));
Integer iArea1 = Integer.parseInt(sArea1);
switch (iArea1) {
case 1: {
outsideRight++;
break;
}
case 4: {
outsideleft++;
break;
}
case 5: {
outsideLeftRight++;
break;
}
case 8: {
outsideBottom++;
break;
}
default: {

break;
}
}

if (iArea == 0 && iArea1 == 0) {
inside++;
}

if (iArea > 0 || iArea1 > 0) {
warningVolumeReadingArea = true;
}





// cubic or unshaped
String sCubic = Character.toString(OMS3.charAt(7));
if(sCubic.equals("1")) {
cubicItem++;
} else if(sCubic.equals("2")) {
unshapedItem++;
} else if (sCubic.equals("0")){
noshapeItem++;
}


String s = Character.toString(OMS1.charAt(1));
String s1 = Character.toString(OMS1.charAt(2)) + Character.toString(OMS1.charAt(3));

if(s.equals("1")) {
warningVolumeItemToBig = true;
}

if(s.equals("2")) {
warningVolumeItemToSmall = true;
}

if((s.equals("1")) || (s.equals("2")) || (s1.equals("11"))) {
invalidVMS++;
invalidObject = true;
}
}
}

// Weight data ----------------------------------------------------------------------------------------------------------
nList = doc.getElementsByTagName("scaledata");
for (int i1 = 0; i1 < nList.getLength(); i1++) {
Node nNode = nList.item(i1);

if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;

String OWS = eElement.getAttribute("ows");
String OWE_UNIT = eElement.getElementsByTagName("owe").item(0).getAttributes().getNamedItem("unit").getNodeValue();
String OWE = eElement.getElementsByTagName("value").item(0).getTextContent();

if(OWS.equals("0")) {
validScale++;
scaleGoodRead = true;
}else {
invalidScale++;
scaleGoodRead = false;
}

Integer i = Integer.parseInt(OWS);

if(PerformanceUtils.OWS(i) == true) {
invalidScaleObject++;
if (invalidObject == false){
invalidObject = true;
}
}

}
}

// Barcode Data
nList = doc.getElementsByTagName("barcode");
Integer cc = 0;
Integer vcc = 0;
String codeCounter = "0";
String validCodeCounter = "0";
String codeCondition = null;
for (int i1 = 0; i1 < nList.getLength(); i1++) {
Node nNode = nList.item(i1);

if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;

codeCounter = eElement.getAttribute("cc");
validCodeCounter = eElement.getAttribute("vcc");
//codeCondition = eElement.getElementsByTagName("condition").item(0).getTextContent();

if(validCodeCounter != null && validCodeCounter.length() != 0) {
vcc = Integer.parseInt(validCodeCounter);
barcodeGoodRead++;
barcodeCounterValid = barcodeCounterValid + vcc;
}
if(codeCounter != null && codeCounter.length() != 0) {
cc = Integer.parseInt(codeCounter);
barcodeCounter = barcodeCounter + cc;
}


}
}
nList = doc.getElementsByTagName("codeinvalid");
for (int i1 = 0; i1 < nList.getLength(); i1++) {
Node nNode = nList.item(i1);

if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;

String invalidID = eElement.getAttribute("id");

if(invalidID != null && invalidID.length() != 0) {
warningInvalidCode = true;
barcodeInvalid++;
}

}
}

// Sorterstate and Speed
nList = doc.getElementsByTagName("speed");
for (int i1 = 0; i1 < nList.getLength(); i1++) {
Node nNode = nList.item(i1);

if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;

String speedUnit = eElement.getAttribute("unit");
String conveyorSpeed = eElement.getElementsByTagName("value").item(0).getTextContent();

if(conveyorSpeed != null && conveyorSpeed.length() != 0) {
sortSpeed = Integer.parseInt(conveyorSpeed);
}

if(lineCount.equals(lineCountSpeed) || !sortSpeed.equals(sortSpeedOld)) {
sortSpeedOld = sortSpeed;
if(lineCount.equals(lineCountSpeed)){
lineCountSpeed = lineCountSpeed + 100;
}
sortSpeedList.add(new SortSpeed(lineCount.toString(), sortSpeed));
}


}
}

//LFT Good Read
if(volumeSystem.equals("true") && scaleSystem.equals("true")) {
if(volumeGoodRead == true && scaleGoodRead == true) {
lftGoodRead = true;
}
}

if(volumeSystem.equals("true") && scaleSystem.equals("false")) {
if(volumeGoodRead == true) {
lftGoodRead = true;
}
}

if(volumeSystem.equals("false") && scaleSystem.equals("false")) {
if(scaleGoodRead == true) {
lftGoodRead = true;
}
}

if(lftGoodRead == true) {
lftRead++;
}
lftGoodRead = false;
volumeGoodRead = false;
scaleGoodRead = false;

// Object counter
objectCount++;

// Valid VMS Objects
validVMS = objectCount - invalidVMS;

// Valid Scale Objects
validScaleObject = objectCount - invalidScaleObject;

// Valid LFT objects
if (invalidObject == true) {
invalidLFTObjects++;
}
validLFTObjects = objectCount - invalidLFTObjects;


// invalid object counter
if(invalidObject == true) {
invalidObjects++;
}
invalidObject = false;

//get Timestamp
Integer position = sTimestamp.indexOf("T");
String date = sTimestamp.substring(0, position);

// Increase line counter
lineCount++;

//updating progressbar
updateProgress(objectCount, fileLines);

} // end of objectdata

} // End of while loop --End of datafile -------------------------------------------------------------------------------------------
} catch (IOException | ParserConfigurationException | SAXException e) {
ErrorHandling error= new ErrorHandling();
try {
error.AlertBox("Exception Raised in xmlParser", "Exception", e.getMessage());
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}

System.out.println("Data evaluation finished");

// get valid objects
Integer validObjects = objectCount - invalidObjects;
numberObjects = objectCount;

// Speed Chart
speedChart();


// Barcode Counter Chart
barcodeCounterChart(objectCount, barcodeGoodRead, barcodeCounter, barcodeCounterValid, barcodeInvalid);


// Object Chart
objectsChart(objectCount, validObjects, invalidObjects, validLFTObjects, invalidLFTObjects, validVMS, invalidVMS, validScaleObject, invalidScaleObject, systemID);


// Performance Chart
Integer volumeNoread = objectCount - volumeRead;
validVolumeObjects = objectCount - invalidVMS;
Integer volumeNoreadValid = volumeNoread - invalidVMS;

objectPerformance(volumeRead, volumeNoread, volumeNoreadValid, systemID);

// Volume Pages
Platform.runLater(new Runnable() {
public void run() {
lbl_VolumeCubic.setText(cubicItem.toString());
lbl_VolumeUnshaped.setText(unshapedItem.toString());
lbl_VolumeNoShape.setText(noshapeItem.toString());

lbl_VolumeOutsideFront.setText(outsideFront.toString());
lbl_VolumeOutsideBack.setText(outsideBack.toString());
lbl_VolumeOutsideLeft.setText(outsideleft.toString());
lbl_VolumeOutsideRight.setText(outsideRight.toString());
lbl_VolumeInside.setText(inside.toString());
lbl_VolumeoutsideFrontBack.setText(outsideFrontBack.toString());
lbl_VolumeoutsideLeftRight.setText(outsideLeftRight.toString());
lbl_VolumeoutsideBottom.setText(outsideBottom.toString());
lbl_VolumeoutsideNoObject.setText(noItemDuringTrigger.toString());
System.out.println("volume finished");
lbl_VolumeCubic.setText("hello");
}
});



// calculate read performance

// Barcode
double barcodeRate = 100.0/numberObjects * barcodeGoodRead;
double barcodeNoreadRate = 100.0 - barcodeRate;

//LFT Performance
double lftRate = 100.0/numberObjects * lftRead;
double noLFTRate = 100.0 - lftRate;
double lftValidRate = 100.0/validLFTObjects * lftRead;
double nolftValidRate = 100.0 - lftValidRate;

//Volume
double volumeRate = 100.0/numberObjects * volumeRead;
double noVolumeRate = 100.0/numberObjects * volumeNoread;
double volumeValidRate = 100.0/validVolumeObjects * volumeRead;
double noVolumeValidRate = 100.0 - volumeValidRate;

//Weight
double weightRate = 100.0/numberObjects * validScale;
double noWeightRate = 100.0/numberObjects * invalidScale;
double weightValidRate = 100.0/validScaleObject * validScale;
double noWeightValidRate = 100.0 - weightValidRate;



// add warnings

if (warningVolumeReadingArea == true) {
lv_PerformanceWarnings.getItems().add("Volume Performance: Items outside measuring area!");
}
if (warningVolumeItemToBig == true) {
lv_PerformanceWarnings.getItems().add("Volume Performance: Items outside Specification! Item to big");
}
if (warningVolumeItemToSmall == true) {
lv_PerformanceWarnings.getItems().add("Volume Performance: Items outside Specification! Item to small");
}
if (warningInvalidCode == true) {
lv_PerformanceWarnings.getItems().add("Barcode Performance: Invalid Barcodes found!");
}

// Add data to a list for the excel sheet
ArrayList<String> dataList = new ArrayList<>();

// Objectdata
dataList.add(objectCount.toString()); // Value 0
dataList.add(validObjects.toString()); // Value 1
dataList.add(invalidObjects.toString()); // Value 2
dataList.add(validLFTObjects.toString()); // Value 3
dataList.add(invalidLFTObjects.toString()); // Value 4
dataList.add(validVMS.toString()); // Value 5
dataList.add(invalidVMS.toString()); // Value 6
dataList.add(validScaleObject.toString()); // Value 7
dataList.add(invalidScaleObject.toString()); // Value 8
dataList.add(cubicItem.toString()); // Value 9
dataList.add(unshapedItem.toString()); // Value 10
dataList.add(noshapeItem.toString()); // Value 11
dataList.add(outsideFront.toString()); // Value 12
dataList.add(outsideBack.toString()); // Value 13
dataList.add(outsideFrontBack.toString()); // Value 14
dataList.add(noItemDuringTrigger.toString()); // Value 15
dataList.add(outsideRight.toString()); // Value 16
dataList.add(outsideleft.toString()); // Value 17
dataList.add(outsideLeftRight.toString()); // Value 18
dataList.add(outsideBottom.toString()); // Value 19
dataList.add(inside.toString()); // Value 20
dataList.add( String.format( "%.2f", barcodeRate )); // Value 21
dataList.add( String.format( "%.2f", barcodeNoreadRate )); // Value 22
dataList.add(String.format( "%.2f", lftRate)); // Value 23
dataList.add(String.format( "%.2f", noLFTRate)); // Value 24
dataList.add(String.format( "%.2f", lftValidRate)); // Value 25
dataList.add(String.format( "%.2f", nolftValidRate)); // Value 26
dataList.add(String.format( "%.2f", volumeRate )); // Value 27
dataList.add(String.format( "%.2f", noVolumeRate )); // Value 28
dataList.add(String.format( "%.2f", volumeValidRate )); // Value 39
dataList.add(String.format( "%.2f", noVolumeValidRate )); // Value 30
dataList.add(String.format( "%.2f", weightRate )); // Value 31
dataList.add(String.format( "%.2f", noWeightRate )); // Value 32
dataList.add(String.format( "%.2f", weightValidRate )); // Value 33
dataList.add(String.format( "%.2f", noWeightValidRate )); // Value 34
dataList.add(barcodeGoodRead.toString()); // Value 35
dataList.add(barcodeCounter.toString()); // Value 36
dataList.add(barcodeCounterValid.toString()); // Value 37
dataList.add(barcodeInvalid.toString()); // Value 38



if(templateName == null || templateName.equals("")) {
Platform.runLater(new Runnable() {
public void run() {
Alert alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Template Error");
alert.setHeaderText("Template does not exists!");
alert.setContentText("No template found in database for this system!.");
alert.showAndWait();
}
});
}else {
SaveToExcel.datenSpeichern(dataList, templateName, sFileoutput, sSite, sSystemID, sName);
}

return null;

}

};

task.setOnFailed(wse -> {
wse.getSource().getException().printStackTrace();
});

lbl_Progress.setText("Import data from file:");
pb_loadObjects.progressProperty().bind(task.progressProperty());
new Thread(task).start();

}


@FXML
void btn_Home_Click(ActionEvent event) throws IOException {
tp_Performance.getSelectionModel().select(0);
}

@FXML
void btn_Hardware_click(ActionEvent event) throws IOException {
tp_Performance.getSelectionModel().select(1);
}

@FXML
void btn_LFT_Click(ActionEvent event) throws IOException {
tp_Performance.getSelectionModel().select(2);
}

@FXML
void btn_Volume_Click(ActionEvent event) throws IOException {
tp_Performance.getSelectionModel().select(3);
}

@FXML
void btn_Scale_Click(ActionEvent event) throws IOException {
tp_Performance.getSelectionModel().select(4);
}

@FXML
void btn_Gap_Click(ActionEvent event) throws IOException {
tp_Performance.getSelectionModel().select(5);
}

@FXML
void btn_Barcode_Click(ActionEvent event) throws IOException {
tp_Performance.getSelectionModel().select(6);
}

@FXML
void btn_VolumePerformance_Click(ActionEvent event) throws IOException {
tp_Volume.getSelectionModel().select(0);
}

@FXML
void btn_VolumePosition_Click(ActionEvent event) throws IOException {
tp_Volume.getSelectionModel().select(1);
}

@FXML
void btn_VolumeSize_Click(ActionEvent event) throws IOException {
tp_Volume.getSelectionModel().select(2);
}




}
[/CODE]
 
Ich hör bei dreistelligen Code-Zeilen immer auf zu lesen, aber static hat da nichts zu suchen und Warnungen Gehörn gelöst, anstatt mit @SuppressWarnings unterdrückt, wenn wirklich nötig gehört das an die Variable oder an eine kurze(!) Methode mit sehr begrenztem Scope.
 
Ich hör bei dreistelligen Code-Zeilen immer auf zu lesen, aber static hat da nichts zu suchen und Warnungen Gehörn gelöst, anstatt mit @SuppressWarnings unterdrückt, wenn wirklich nötig gehört das an die Variable oder an eine kurze(!) Methode mit sehr begrenztem Scope.
Sehr netter Hinweis, danke dafür. Da mache ich mir Sorgen drum wenn es mal richtig funktioniert.
Löst leider mein Problem nicht....
Man muss den ganzen Code nicht lesen, es könnte ja sein, das jemand schon vor dem gleichen Problem stand und mir einen Hinweis geben kann in welcher richtung ich suchen könnte.
 
Sehr netter Hinweis, danke dafür. Da mache ich mir Sorgen drum wenn es mal richtig funktioniert.
Löst leider mein Problem nicht....
Beides ist potentiell der Grund für den Fehler.

Oh, und natürlich dürfen alle Attribute, was mit @FXML annotiert sind, nicht selber initialisiert werden.

Der nicht geschlossene FileReader könnte auch für Probleme sorgen.
 
Das mit
Beides ist potentiell der Grund für den Fehler.

Oh, und natürlich dürfen alle Attribute, was mit @FXML annotiert sind, nicht selber initialisiert werden.

Der nicht geschlossene FileReader könnte auch für Probleme sorgen.
Die Sache mit den Readern war mir ja noch gar nicht aufgefallen. vielen Dank für den Hinweis.
Das hab ich sofort mal erledigt. Die ganzen statics auch raus. Aber leider geht es immer noch nicht.
Das es eventuell ein Problem mit den Charts gibt könnte ich noch verstehen, aber das sich Labels auch nicht aktualisieren lassen verstehe ich gar nicht.
 
Ich denke ich habe das Problem erkannt. Ich muss es nur noch lösen.

Ich instanziiere zwar das FXML aber setze den Controller nicht neu.
1623930825629.png

dadurch greift der Controller auf die ursprüngliche Stage zu. Das konnte ich sehen, wenn ich sie nicht schließe und eine zweite öffne:
 
Warum instanziierst du die Steuerelemente im Controller nochmal, wenn du über @FXML holst, sind die Instanzen schon vorhanden.
 
ich habe jetzt folgenden Ansatz für das Problem:
Klasse in der sie Stage aufgerufen wird:
Java:
    public void performanceForm () throws IOException {
    
        Stage stage = new Stage(StageStyle.DECORATED);
        
        FXMLLoader loader = new FXMLLoader(getClass().getResource("Performance.fxml"));
        Parent rootPerformance = loader.load();
        PerformanceController controller = loader.getController();
        controller.setStage(this.root);
        
        Scene scene = new Scene(rootPerformance);
        scene.getStylesheets().add(getClass().getResource("performance.css").toExternalForm());
        stage.setTitle("");
        stage.getIcons().add(new Image ("/img/ET.png"));
        stage.setMaxHeight(1050);
        stage.setMaxWidth(1920);
        stage.setMaximized(true);
        stage.setTitle("System Performance");
        stage.centerOnScreen();
        stage.setScene(scene);
        stage.show();
        stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
              public void handle(WindowEvent we) {
                
                  stage.close();
              }
          });
    }

Und in der Controller Klasse:
Java:
    public void setStage(Stage root) {
        Stage stage = (Stage) pb_loadObjects.getScene().getWindow();
        stage.close();
    }

Hier wirft Zeile 2 aber eine NullPointer Exception
 
Der controller ist gesetzt im FXML:


Java:
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.chart.BarChart?>
<?import javafx.scene.chart.CategoryAxis?>
<?import javafx.scene.chart.LineChart?>
<?import javafx.scene.chart.NumberAxis?>
<?import javafx.scene.chart.StackedBarChart?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.DatePicker?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.ProgressBar?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Line?>
<?import javafx.scene.shape.Polygon?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>

<AnchorPane fx:id="ap_MyStage" maxWidth="1920.0" prefHeight="1000.0" prefWidth="1920.0" styleClass="pane_MainWindow" stylesheets="@performance.css" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="performanceMonitoring.PerformanceController">
   <children>
      <TabPane fx:id="tp_Performance" layoutX="25.0" layoutY="61.0" prefHeight="200.0" prefWidth="1044.0" stylesheets="@performance.css" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="260.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-15.0">
        <tabs>
          <Tab text="System Overview">
               <content>
                  <AnchorPane maxWidth="1920.0" prefHeight="200.0" prefWidth="200.0">
                     <children>
                        <HBox layoutX="679.0" layoutY="62.0" maxHeight="450.0" prefHeight="385.0" prefWidth="1660.0" spacing="10.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="41.0">
                           <children>
                              <AnchorPane maxHeight="450.0" maxWidth="280.0" minWidth="280.0" prefHeight="450.0" prefWidth="280.0" styleClass="paneGrey" stylesheets="@performance.css">
                                 <children>
                                    <VBox alignment="TOP_CENTER" layoutX="32.0" layoutY="14.0" prefHeight="352.0" prefWidth="280.0" spacing="10.0" AnchorPane.bottomAnchor="98.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                                       <children>
                                          <Label styleClass="label_PerformanceHeader" stylesheets="@performance.css" text="System Monitor" />
                                          <HBox maxHeight="80.0" prefHeight="80.0" prefWidth="200.0" spacing="10.0">
                                             <children>
                                                <AnchorPane maxHeight="80.0" maxWidth="80.0" prefHeight="80.0" prefWidth="80.0" styleClass="paneGreen" stylesheets="@performance.css">
                                                   <children>
                                                      <Label layoutX="7.0" layoutY="27.0" styleClass="label_StatusBoard" stylesheets="@performance.css" text="Hardware" />
                                                   </children>
                                                </AnchorPane>
                                                <AnchorPane maxHeight="80.0" maxWidth="80.0" prefHeight="80.0" prefWidth="80.0" styleClass="paneGreen" stylesheets="@performance.css">
                                                   <children>
                                                      <Label layoutX="3.0" layoutY="27.0" styleClass="label_StatusBoard" stylesheets="@performance.css" text="Performance" />
                                                   </children>
                                                </AnchorPane>
                                             </children>
                                             <padding>
                                                <Insets left="10.0" />
                                             </padding>
                                          </HBox>
                                          <HBox maxHeight="80.0" prefHeight="80.0" prefWidth="200.0" spacing="10.0">
                                             <children>
                                                <AnchorPane maxHeight="80.0" maxWidth="80.0" prefHeight="80.0" prefWidth="80.0" styleClass="paneGreen" stylesheets="@performance.css">
                                                   <children>
                                                      <Label layoutX="13.0" layoutY="27.0" styleClass="label_StatusBoard" stylesheets="@performance.css" text="Barcode" />
                                                   </children>
                                                </AnchorPane>
                                                <AnchorPane maxHeight="80.0" maxWidth="80.0" prefHeight="80.0" prefWidth="80.0" styleClass="paneGreen" stylesheets="@performance.css">
                                                   <children>
                                                      <Label layoutX="14.0" layoutY="27.0" styleClass="label_StatusBoard" stylesheets="@performance.css" text="Volume" />
                                                   </children>
                                                </AnchorPane>
                                                <AnchorPane maxHeight="80.0" maxWidth="80.0" prefHeight="80.0" prefWidth="80.0" styleClass="paneOrange" stylesheets="@performance.css">
                                                   <children>
                                                      <Label layoutX="21.0" layoutY="27.0" styleClass="label_StatusBoard" stylesheets="@performance.css" text="Scale" />
                                                   </children>
                                                </AnchorPane>
                                             </children>
                                             <padding>
                                                <Insets left="10.0" />
                                             </padding>
                                          </HBox>
                                          <HBox maxHeight="80.0" prefHeight="80.0" prefWidth="200.0" spacing="10.0">
                                             <children>
                                                <AnchorPane maxHeight="80.0" maxWidth="80.0" prefHeight="80.0" prefWidth="80.0" styleClass="paneGreen" stylesheets="@performance.css">
                                                   <children>
                                                      <Label layoutX="13.0" layoutY="22.0" styleClass="label_StatusBoard" stylesheets="@performance.css" text="Reading" />
                                                      <Label layoutX="15.0" layoutY="39.0" styleClass="label_StatusBoard" stylesheets="@performance.css" text="Quality" />
                                                   </children>
                                                </AnchorPane>
                                                <AnchorPane maxHeight="80.0" maxWidth="80.0" prefHeight="80.0" prefWidth="80.0" styleClass="paneRed" stylesheets="@performance.css">
                                                   <children>
                                                      <Label layoutX="14.0" layoutY="22.0" styleClass="label_StatusBoard" stylesheets="@performance.css" text="Barcode" />
                                                      <Label layoutX="14.0" layoutY="39.0" styleClass="label_StatusBoard" stylesheets="@performance.css" text="Position" />
                                                   </children>
                                                </AnchorPane>
                                                <AnchorPane maxHeight="80.0" maxWidth="80.0" prefHeight="80.0" prefWidth="80.0" styleClass="paneGreen" stylesheets="@performance.css">
                                                   <children>
                                                      <Label layoutX="24.0" layoutY="27.0" styleClass="label_StatusBoard" stylesheets="@performance.css" text="Gap" />
                                                   </children>
                                                </AnchorPane>
                                             </children>
                                             <padding>
                                                <Insets left="10.0" />
                                             </padding>
                                          </HBox>
                                       </children>
                                       <padding>
                                          <Insets top="10.0" />
                                       </padding>
                                    </VBox>
                                 </children>
                              </AnchorPane>
                              <StackedBarChart fx:id="bc_Objects1" maxHeight="450.0" maxWidth="550.0" prefHeight="338.0" prefWidth="550.0" styleClass="chart" stylesheets="@performance.css">
                                <xAxis>
                                  <CategoryAxis fx:id="objects1_xAxis" side="BOTTOM" />
                                </xAxis>
                                <yAxis>
                                  <NumberAxis fx:id="objects1_yAxis" side="LEFT" />
                                </yAxis>
                              </StackedBarChart>
                              <StackedBarChart fx:id="bc_Performance" maxHeight="610.0" prefHeight="450.0" prefWidth="800.0">
                                <xAxis>
                                  <CategoryAxis fx:id="performance_xAxis" side="BOTTOM" />
                                </xAxis>
                                <yAxis>
                                  <NumberAxis fx:id="performance_yAxis" side="LEFT" />
                                </yAxis>
                              </StackedBarChart>
                           </children>
                        </HBox>
                        <ListView fx:id="lv_PerformanceWarnings" layoutX="6.0" layoutY="543.0" prefHeight="229.0" prefWidth="903.0" stylesheets="@performance.css" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="0.0" />
                        <Label layoutX="7.0" layoutY="734.0" styleClass="labelHeadlineOrange" stylesheets="@performance.css" text="System Performance Warnings" />
                        <LineChart fx:id="lc_SpeedChart" layoutY="427.0" prefHeight="308.0" prefWidth="1647.0" title="Conveyor Speed">
                          <xAxis>
                            <CategoryAxis fx:id="speed_xAxis" side="BOTTOM" />
                          </xAxis>
                          <yAxis>
                            <NumberAxis fx:id="speed_yAxis" side="LEFT" />
                          </yAxis>
                        </LineChart>
                     </children>
                  </AnchorPane>
               </content>
            </Tab>
            <Tab text="Hardware Monitoring">
              <content>
                <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                     <children>
                        <Label layoutX="74.0" layoutY="79.0" text="hardware" />
                     </children></AnchorPane>
              </content>
            </Tab>
            <Tab text="LFT Performance">
              <content>
                <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                     <children>
                        <Label layoutX="114.0" layoutY="117.0" text="lft" />
                     </children></AnchorPane>
              </content>
            </Tab>
          <Tab text="Volume Performance">
               <content>
                  <AnchorPane prefHeight="200.0" prefWidth="200.0">
                     <children>
                        <TabPane fx:id="tp_Volume" layoutX="14.0" layoutY="72.0" prefHeight="910.0" prefWidth="1631.0" tabClosingPolicy="UNAVAILABLE">
                          <tabs>
                            <Tab text="Volume Performance">
                              <content>
                                <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="869.0" prefWidth="1631.0">
                                       <children>
                                          <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#e4e9ee" height="212.0" layoutX="25.0" layoutY="28.0" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="400.0" />
                                          <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#4699e8" height="114.0" layoutX="45.0" layoutY="91.0" stroke="WHITE" strokeType="INSIDE" strokeWidth="0.0" width="108.0" />
                                          <Polygon fill="#3781c6" layoutX="231.0" layoutY="165.0" points="-50.0, 40.0, 60.0, 40.0, 5.0, -72.0" stroke="WHITE" strokeType="INSIDE" strokeWidth="0.0" />
                                          <Label layoutX="84.0" layoutY="213.0" text="Cubic" />
                                          <Label layoutX="181.0" layoutY="213.0" text="Irregular / Unshaped" />
                                          <Label fx:id="lbl_VolumeCubic" layoutX="96.0" layoutY="173.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                          <Label fx:id="lbl_VolumeUnshaped" layoutX="233.0" layoutY="173.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                          <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#ff1f23" height="17.0" layoutX="318.0" layoutY="190.0" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="94.0" />
                                          <Label layoutX="324.0" layoutY="213.0" text="Flat / Unknown" />
                                          <Label fx:id="lbl_VolumeNoShape" layoutX="325.0" layoutY="190.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                          <Label layoutX="175.0" layoutY="44.0" text="Object Shapes">
                                             <font>
                                                <Font size="15.0" />
                                             </font>
                                          </Label>
                                          <BarChart layoutX="37.0" layoutY="283.0" prefHeight="281.0" prefWidth="376.0">
                                             <xAxis>
                                                <CategoryAxis side="BOTTOM" />
                                             </xAxis>
                                             <yAxis>
                                                <NumberAxis side="LEFT" />
                                             </yAxis>
                                          </BarChart>
                                          <Label layoutX="191.0" layoutY="283.0" styleClass="labelCharts" stylesheets="@performance.css" text="Out of spec volume" />
                                       </children>
                                    </AnchorPane>
                              </content>
                            </Tab>
                            <Tab text="Item Location">
                              <content>
                                <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                                       <children>
                                          <Text fill="WHITE" layoutX="333.0" layoutY="498.0" strokeType="OUTSIDE" strokeWidth="0.0" text="3">
                                             <font>
                                                <Font name="System Bold" size="14.0" />
                                             </font>
                                          </Text>
                                          <AnchorPane layoutX="1065.0" layoutY="483.0" prefHeight="323.0" prefWidth="246.0" styleClass="paneVolume" stylesheets="@performance.css">
                                             <children>
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="178.0" layoutX="53.0" layoutY="58.0" opacity="0.38" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="141.0" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#969a9e" height="200.0" layoutX="41.0" layoutY="30.0" stroke="BLACK" strokeType="INSIDE" width="12.0" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#969a9e" height="200.0" layoutX="193.0" layoutY="31.0" stroke="BLACK" strokeType="INSIDE" width="12.0" />
                                                <Line endX="127.0" layoutX="65.0" layoutY="230.0" startX="-11.0" stroke="RED" />
                                                <Line endX="127.0" layoutX="65.0" layoutY="217.0" startX="-11.0" stroke="RED" />
                                                <Line endX="127.0" layoutX="65.0" layoutY="205.0" startX="-11.0" stroke="RED" />
                                                <Line endX="127.0" layoutX="65.0" layoutY="188.0" startX="-11.0" stroke="RED" />
                                                <Label layoutX="109.0" layoutY="126.0" text="VML" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#fc1515" height="73.0" layoutX="86.0" layoutY="236.0" opacity="0.5" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="76.0" />
                                                <Label fx:id="lbl_VolumeoutsideBottom" layoutX="121.0" layoutY="261.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                                <Label fx:id="lbl_VolumeInside211" layoutX="82.0" layoutY="84.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Reading Area" />
                                                <Label layoutX="25.0" layoutY="10.0" styleClass="label_Grey12" stylesheets="@performance.css" text="Item below reading area (Only VML)" />
                                             </children>
                                          </AnchorPane>
                                          <AnchorPane layoutX="541.0" layoutY="483.0" prefHeight="323.0" prefWidth="246.0" styleClass="paneVolume" stylesheets="@performance.css">
                                             <children>
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="178.0" layoutX="51.0" layoutY="50.0" opacity="0.18" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="141.0" />
                                                <Label fx:id="lbl_VolumeInside2111" layoutX="84.0" layoutY="68.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Reading Area" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#fc1515" height="73.0" layoutX="154.0" layoutY="154.0" opacity="0.5" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="76.0" />
                                                <Label fx:id="lbl_VolumeOutsideRight" layoutX="189.0" layoutY="179.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#252728" height="31.0" layoutX="20.0" layoutY="227.0" opacity="0.38" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="203.0" />
                                                <Label fx:id="lbl_VolumeInside21111" layoutX="92.0" layoutY="234.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Conveyor" />
                                                <Label layoutX="73.0" layoutY="15.0" styleClass="label_Grey12" stylesheets="@performance.css" text="Item outside right" />
                                             </children>
                                          </AnchorPane>
                                          <AnchorPane layoutX="278.0" layoutY="483.0" prefHeight="323.0" prefWidth="246.0" styleClass="paneVolume" stylesheets="@performance.css">
                                             <children>
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="178.0" layoutX="57.0" layoutY="51.0" opacity="0.18" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="141.0" />
                                                <Label fx:id="lbl_VolumeInside21111" layoutX="90.0" layoutY="68.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Reading Area" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#fc1515" height="73.0" layoutX="14.0" layoutY="155.0" opacity="0.5" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="76.0" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#252728" height="31.0" layoutX="20.0" layoutY="228.0" opacity="0.38" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="209.0" />
                                                <Label fx:id="lbl_VolumeInside211111" layoutX="101.0" layoutY="235.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Conveyor" />
                                                <Label fx:id="lbl_VolumeOutsideLeft" layoutX="20.0" layoutY="183.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                                <Label layoutX="83.0" layoutY="15.0" styleClass="label_Grey12" stylesheets="@performance.css" text="Item outside left" />
                                             </children>
                                          </AnchorPane>
                                          <AnchorPane layoutX="169.0" layoutY="90.0" prefHeight="323.0" prefWidth="246.0" styleClass="paneVolume" stylesheets="@performance.css">
                                             <children>
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="178.0" layoutX="57.0" layoutY="51.0" opacity="0.18" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="141.0" />
                                                <Label fx:id="lbl_VolumeInside211111" layoutX="90.0" layoutY="68.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Reading Area" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#252728" height="31.0" layoutX="20.0" layoutY="228.0" opacity="0.38" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="209.0" />
                                                <Label fx:id="lbl_VolumeInside2111111" layoutX="101.0" layoutY="235.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Conveyor" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#0cd04d" height="73.0" layoutX="87.0" layoutY="155.0" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="76.0" />
                                                <Label fx:id="lbl_VolumeInside" layoutX="122.0" layoutY="183.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                                <Label layoutX="58.0" layoutY="10.0" styleClass="label_Grey12" stylesheets="@performance.css" text="Item inside reading area" />
                                             </children>
                                          </AnchorPane>
                                          <AnchorPane layoutX="1217.0" layoutY="90.0" prefHeight="323.0" prefWidth="246.0" styleClass="paneVolume" stylesheets="@performance.css">
                                             <children>
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="178.0" layoutX="57.0" layoutY="51.0" opacity="0.18" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="141.0" />
                                                <Label fx:id="lbl_VolumeInside2111111" layoutX="90.0" layoutY="68.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Reading Area" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#252728" height="31.0" layoutX="20.0" layoutY="228.0" opacity="0.38" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="209.0" />
                                                <Label fx:id="lbl_VolumeInside21111111" layoutX="101.0" layoutY="235.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Conveyor" />
                                                <Label layoutX="66.0" layoutY="10.0" styleClass="label_Grey12" stylesheets="@performance.css" text="no item during trigger" />
                                                <Label fx:id="lbl_VolumeoutsideNoObject" layoutX="124.0" layoutY="189.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                             </children>
                                          </AnchorPane>
                                          <AnchorPane layoutX="431.0" layoutY="90.0" prefHeight="323.0" prefWidth="246.0" styleClass="paneVolume" stylesheets="@performance.css">
                                             <children>
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#252728" height="216.0" layoutX="67.0" layoutY="43.0" opacity="0.38" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="122.0" />
                                                <Label fx:id="lbl_VolumeInside21111112" layoutX="101.0" layoutY="235.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Conveyor" />
                                                <Label layoutX="62.0" layoutY="10.0" styleClass="label_Grey12" stylesheets="@performance.css" text="Item befor trigger start" />
                                                <Line endX="-386.0" endY="59.0" layoutX="572.0" layoutY="92.0" startX="-503.0" startY="59.0" stroke="#3ae72e" strokeWidth="3.0" />
                                                <Label layoutX="25.0" layoutY="133.0" text="Trigger" />
                                                <Label layoutX="32.0" layoutY="153.0" text="Start" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#fc1515" height="73.0" layoutX="90.0" layoutY="134.0" opacity="0.35" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="76.0" />
                                                <Label fx:id="lbl_VolumeOutsideFront" layoutX="125.0" layoutY="162.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                                <Polygon layoutX="163.0" layoutY="285.0" points="-50.0, 10.0, -20.0, 10.0, -37.0, -24.0" stroke="BLACK" strokeType="INSIDE" />
                                                <Label layoutX="104.0" layoutY="303.0" text="Direction" />
                                             </children>
                                          </AnchorPane>
                                          <AnchorPane layoutX="696.0" layoutY="90.0" prefHeight="323.0" prefWidth="246.0" styleClass="paneVolume" stylesheets="@performance.css">
                                             <children>
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#252728" height="216.0" layoutX="67.0" layoutY="43.0" opacity="0.38" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="122.0" />
                                                <Label fx:id="lbl_VolumeInside211111121" layoutX="101.0" layoutY="235.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Conveyor" />
                                                <Line endX="-386.0" endY="59.0" layoutX="572.0" layoutY="92.0" startX="-503.0" startY="59.0" stroke="#3ae72e" strokeWidth="3.0" />
                                                <Label layoutX="25.0" layoutY="133.0" text="Trigger" />
                                                <Label layoutX="32.0" layoutY="153.0" text="Stop" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#fc1515" height="73.0" layoutX="90.0" layoutY="89.0" opacity="0.5" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="76.0" />
                                                <Label fx:id="lbl_VolumeOutsideBack" layoutX="124.0" layoutY="117.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                                <Label layoutX="60.0" layoutY="10.0" styleClass="label_Grey12" stylesheets="@performance.css" text="Item during trigger stop" />
                                                <Polygon layoutX="166.0" layoutY="285.0" points="-50.0, 10.0, -20.0, 10.0, -37.0, -24.0" stroke="BLACK" strokeType="INSIDE" />
                                                <Label layoutX="107.0" layoutY="303.0" text="Direction" />
                                             </children>
                                          </AnchorPane>
                                          <AnchorPane layoutX="802.0" layoutY="483.0" prefHeight="323.0" prefWidth="246.0" styleClass="paneVolume" stylesheets="@performance.css">
                                             <children>
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="178.0" layoutX="51.0" layoutY="50.0" opacity="0.18" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="141.0" />
                                                <Label fx:id="lbl_VolumeInside21111" layoutX="84.0" layoutY="68.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Reading Area" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#252728" height="31.0" layoutX="20.0" layoutY="227.0" opacity="0.38" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="203.0" />
                                                <Label fx:id="lbl_VolumeInside211112" layoutX="92.0" layoutY="234.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Conveyor" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#fc1515" height="40.0" layoutX="31.0" layoutY="188.0" opacity="0.5" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="176.0" />
                                                <Label fx:id="lbl_VolumeoutsideLeftRight" layoutX="120.0" layoutY="200.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                                <Label layoutX="54.0" layoutY="10.0" styleClass="label_Grey12" stylesheets="@performance.css" text="Item outside left and right" />
                                             </children>
                                          </AnchorPane>
                                          <AnchorPane layoutX="957.0" layoutY="90.0" prefHeight="323.0" prefWidth="246.0" styleClass="paneVolume" stylesheets="@performance.css">
                                             <children>
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#252728" height="216.0" layoutX="67.0" layoutY="43.0" opacity="0.38" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="122.0" />
                                                <Label fx:id="lbl_VolumeInside211111122" layoutX="101.0" layoutY="235.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Conveyor" />
                                                <Line endX="-386.0" endY="59.0" layoutX="572.0" layoutY="47.0" startX="-503.0" startY="59.0" stroke="#3ae72e" strokeWidth="3.0" />
                                                <Label layoutX="16.0" layoutY="89.0" text="Trigger" />
                                                <Label layoutX="23.0" layoutY="109.0" text="Start" />
                                                <Label layoutX="17.0" layoutY="162.0" text="Trigger" />
                                                <Label layoutX="24.0" layoutY="186.0" text="Stop" />
                                                <Line endX="-386.0" endY="59.0" layoutX="572.0" layoutY="125.0" startX="-503.0" startY="59.0" stroke="#3ae72e" strokeWidth="3.0" />
                                                <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#fc1515" height="140.0" layoutX="90.0" layoutY="75.0" opacity="0.5" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="76.0" />
                                                <Label fx:id="lbl_VolumeoutsideFrontBack" layoutX="125.0" layoutY="137.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="0" />
                                                <Label layoutX="15.0" layoutY="10.0" styleClass="label_Grey12" stylesheets="@performance.css" text="Item during trigger start and trigger stop" />
                                                <Polygon layoutX="161.0" layoutY="284.0" points="-50.0, 10.0, -20.0, 10.0, -37.0, -24.0" stroke="BLACK" strokeType="INSIDE" />
                                                <Label layoutX="101.0" layoutY="303.0" text="Direction" />
                                             </children>
                                          </AnchorPane>
                                          <Label layoutX="653.0" layoutY="32.0" styleClass="labelHeadlineOrange" stylesheets="@performance.css" text="Object Orientation Related To Reading Field" />
                                       </children>
                                    </AnchorPane>
                              </content>
                            </Tab>
                              <Tab text="Item Size">
                                <content>
                                  <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
                                </content>
                              </Tab>
                          </tabs>
                        </TabPane>
                        <Button fx:id="btn_VolumePerformance" layoutX="14.0" layoutY="35.0" mnemonicParsing="false" onAction="#btn_VolumePerformance_Click" styleClass="buttonMenuSickBlue" stylesheets="@performance.css" text="Performance" />
                        <Button fx:id="btn_VolumePosition" layoutX="134.0" layoutY="35.0" mnemonicParsing="false" onAction="#btn_VolumePosition_Click" styleClass="buttonMenuSickBlue" stylesheets="@performance.css" text="Object Position" />
                        <Button fx:id="btn_VolumeSize" layoutX="254.0" layoutY="35.0" mnemonicParsing="false" onAction="#btn_VolumeSize_Click" styleClass="buttonMenuSickBlue" stylesheets="@performance.css" text="Object Size" />
                     </children>
                  </AnchorPane>
               </content></Tab>
            <Tab text="Weight Performance">
              <content>
                <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                     <children>
                        <BarChart layoutX="535.0" layoutY="147.0" prefHeight="281.0" prefWidth="350.0">
                           <xAxis>
                              <CategoryAxis side="BOTTOM" />
                           </xAxis>
                           <yAxis>
                              <NumberAxis side="LEFT" />
                           </yAxis>
                        </BarChart>
                        <Label layoutX="689.0" layoutY="163.0" styleClass="labelCharts" stylesheets="@performance.css" text="Out of spec scale" />
                     </children></AnchorPane>
              </content>
            </Tab>
            <Tab text="Gap Analyse">
              <content>
                <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                     <children>
                        <Label layoutX="239.0" layoutY="269.0" text="gap" />
                     </children></AnchorPane>
              </content>
            </Tab>
            <Tab text="Barcode Position">
              <content>
                <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                     <children>
                        <BarChart fx:id="bc_BarcodeCounter" layoutX="26.0" layoutY="52.0" prefHeight="400.0" prefWidth="830.0" title="Barcode Counter">
                          <xAxis>
                            <CategoryAxis fx:id="barcodeCounter_xAxis" side="BOTTOM" />
                          </xAxis>
                          <yAxis>
                            <NumberAxis fx:id="barcodeCounter_yAxis" side="LEFT" />
                          </yAxis>
                        </BarChart>
                     </children></AnchorPane>
              </content>
            </Tab>
        </tabs>
      </TabPane>
      <AnchorPane layoutX="-73.0" layoutY="-86.0" maxHeight="40.0" prefHeight="40.0" prefWidth="200.0" styleClass="pane_ApplicationHeader" stylesheets="@performance.css" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
         <children>
            <HBox layoutX="167.0" layoutY="-24.0" maxHeight="40.0" prefHeight="40.0" prefWidth="200.0" spacing="5.0" stylesheets="@performance.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
               <children>
                  <Label styleClass="label_PerformanceHeader" stylesheets="@performance.css" text="Site:" />
                  <Label fx:id="lbl_Site" styleClass="label_PerformanceHeader" stylesheets="@performance.css" text="......................." />
                  <AnchorPane maxWidth="50.0" prefHeight="40.0" prefWidth="50.0" />
                  <Label styleClass="label_PerformanceHeader" stylesheets="@performance.css" text="System:" />
                  <Label fx:id="lbl_SystemID" styleClass="label_PerformanceHeader" stylesheets="@performance.css" text="0000000_00000000" />
                  <AnchorPane maxWidth="50.0" prefHeight="40.0" prefWidth="50.0" />
                  <Label styleClass="label_PerformanceHeader" stylesheets="@performance.css" text="System Label: " />
                  <Label fx:id="lbl_SystemName" styleClass="label_PerformanceHeader" stylesheets="@performance.css" text="..." />
                  <AnchorPane maxWidth="400.0" prefHeight="40.0" prefWidth="400.0" />
                  <Label styleClass="label_PerformanceHeader" stylesheets="@performance.css" text="Database:" />
                  <Label fx:id="lbl_DatabaseName" styleClass="label_PerformanceHeader" stylesheets="@performance.css" text="......................" />
               </children>
               <opaqueInsets>
                  <Insets left="5.0" />
               </opaqueInsets>
               <padding>
                  <Insets left="5.0" top="9.0" />
               </padding>
            </HBox>
         </children>
      </AnchorPane>
      <AnchorPane layoutX="-7.0" layoutY="40.0" prefHeight="200.0" prefWidth="260.0" styleClass="pane_ApplicationHeader" stylesheets="@performance.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="-7.0" AnchorPane.topAnchor="40.0">
         <children>
            <Label layoutX="13.0" layoutY="336.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Evaluation Start Date:" />
            <DatePicker layoutX="141.0" layoutY="332.0" prefHeight="25.0" prefWidth="108.0" styleClass="date-picker" stylesheets="@performance.css" />
            <Label layoutX="14.0" layoutY="389.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Evaluation Stop Date:" />
            <DatePicker layoutX="141.0" layoutY="385.0" prefHeight="25.0" prefWidth="108.0" styleClass="date-picker" stylesheets="@performance.css" />
            <Label layoutX="11.0" layoutY="434.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Days of Evaluation:" />
            <TextField editable="false" layoutX="141.0" layoutY="429.0" prefHeight="27.0" prefWidth="50.0" promptText="0" styleClass="textfieldPerformance" stylesheets="@performance.css" />
            <Label fx:id="lbl_Progress" layoutX="14.0" layoutY="900.0" styleClass="labelPerformanceWhiteBold" stylesheets="@performance.css" text="Progress:" AnchorPane.bottomAnchor="35.0" AnchorPane.leftAnchor="12.0" />
            <ProgressBar fx:id="pb_loadObjects" layoutX="14.0" layoutY="926.0" maxHeight="31.0" minHeight="20.0" prefHeight="20.0" prefWidth="238.0" progress="0.2" stylesheets="@performance.css" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="12.0" />
            <Button fx:id="btn_Home" alignment="BOTTOM_LEFT" layoutX="12.0" layoutY="14.0" mnemonicParsing="false" onAction="#btn_Home_Click" prefHeight="25.0" prefWidth="182.0" styleClass="buttonSickBlue" stylesheets="@performance.css" text="System Overview" AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="12.0">
               <graphic>
                  <ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
                     <image>
                        <Image url="@../img/house%2016.png" />
                     </image>
                     <cursor>
                        <Cursor fx:constant="HAND" />
                     </cursor>
                  </ImageView>
               </graphic>
            </Button>
            <Button fx:id="btn_Hardware" alignment="BOTTOM_LEFT" layoutX="12.0" layoutY="54.0" mnemonicParsing="false" onAction="#btn_Hardware_click" prefHeight="25.0" prefWidth="182.0" styleClass="buttonSickBlue" stylesheets="@performance.css" text="Hardware Monitoring" AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="12.0">
               <graphic>
                  <ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
                     <image>
                        <Image url="@../img/hardwareStatus.png" />
                     </image>
                     <cursor>
                        <Cursor fx:constant="HAND" />
                     </cursor>
                  </ImageView>
               </graphic>
            </Button>
            <Button fx:id="btn_LFT" alignment="BOTTOM_LEFT" layoutX="12.0" layoutY="94.0" mnemonicParsing="false" onAction="#btn_LFT_Click" prefHeight="25.0" prefWidth="182.0" styleClass="buttonSickBlue" stylesheets="@performance.css" text="LFT Performance" AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="12.0">
               <graphic>
                  <ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
                     <image>
                        <Image url="@../img/lft.png" />
                     </image>
                     <cursor>
                        <Cursor fx:constant="HAND" />
                     </cursor>
                  </ImageView>
               </graphic>
            </Button>
            <Button fx:id="btn_Volume" alignment="BOTTOM_LEFT" layoutX="12.0" layoutY="134.0" mnemonicParsing="false" onAction="#btn_Volume_Click" prefHeight="25.0" prefWidth="182.0" styleClass="buttonSickBlue" stylesheets="@performance.css" text="Volume Performance" AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="12.0">
               <graphic>
                  <ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
                     <image>
                        <Image url="@../img/volume.png" />
                     </image>
                     <cursor>
                        <Cursor fx:constant="HAND" />
                     </cursor>
                  </ImageView>
               </graphic>
            </Button>
            <Button fx:id="btn_Scale" alignment="BOTTOM_LEFT" layoutX="12.0" layoutY="174.0" mnemonicParsing="false" onAction="#btn_Scale_Click" prefHeight="25.0" prefWidth="182.0" styleClass="buttonSickBlue" stylesheets="@performance.css" text="Scale Performance" AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="12.0">
               <graphic>
                  <ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
                     <image>
                        <Image url="@../img/scale.png" />
                     </image>
                     <cursor>
                        <Cursor fx:constant="HAND" />
                     </cursor>
                  </ImageView>
               </graphic>
            </Button>
            <Button fx:id="btn_Gap" alignment="BOTTOM_LEFT" layoutX="12.0" layoutY="214.0" mnemonicParsing="false" onAction="#btn_Gap_Click" prefHeight="25.0" prefWidth="182.0" styleClass="buttonSickBlue" stylesheets="@performance.css" text="Gap Analyse" AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="12.0">
               <graphic>
                  <ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
                     <image>
                        <Image url="@../img/gap.png" />
                     </image>
                     <cursor>
                        <Cursor fx:constant="HAND" />
                     </cursor>
                  </ImageView>
               </graphic>
            </Button>
            <Button fx:id="btn_Barcode" alignment="BOTTOM_LEFT" layoutX="12.0" layoutY="254.0" mnemonicParsing="false" onAction="#btn_Barcode_Click" prefHeight="25.0" prefWidth="182.0" styleClass="buttonSickBlue" stylesheets="@performance.css" text="Barcode Positioning" AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="12.0">
               <graphic>
                  <ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
                     <image>
                        <Image url="@../img/barcode.png" />
                     </image>
                     <cursor>
                        <Cursor fx:constant="HAND" />
                     </cursor>
                  </ImageView>
               </graphic>
            </Button>
         </children>
      </AnchorPane>
   </children>
</AnchorPane>

Und hier kommt die NPE:

1624002832762.png

1624002886405.png
 
Ja das muss wohl so sein. ich hatte diese Lösung eigentlich aus einem Thread hier. Ich habe mehrere FXML Elemente probiert, aber es kommt immer eine NPE.

ich habe noch etwas anderes gefunden, dann funktioniert das. Ist aber nicht so sauber und ich habe wieder das Problem das die Stage beim zweiten öffnen nicht die Steuerelemente aktualisiert:

[CODE lang="java" title="In der Controller Klasse"] @SuppressWarnings("unused")
private Stage primaryStage;

public void setPrimaryStage(Stage primaryStage){
this.primaryStage = primaryStage;
}[/CODE]

[CODE lang="java" title="In der Form Klasse"] Stage stage = new Stage(StageStyle.DECORATED);

FXMLLoader loader = new FXMLLoader(getClass().getResource("Performance.fxml"));
Parent rootPerformance = loader.load();
PerformanceController controller = loader.getController();
//controller.setStage(this.root);

//set stage
controller.setPrimaryStage(stage);[/CODE]

Im Prinzip stehe ich also wieder am Anfang.
 
Was soll die Methode setStage() überhaupt machen? Du übergibst eine Stage als Parameter, mit dem du nichts tust. Du erzeugst eine lokale Variable stage, die am Ende der Methode wieder verworfen wird. Ich verstehe den Sinn nicht ganz.
 
Ich versuche diese stage zu instanziieren. Also das man sie mehrfach öffnen kann um daten zu vergleichen. Dazu möchte ich eine Controller Instanz der aktuellen stage zuzuordnen.
Wie gesagt ich habe diese Lösung in einem Forum gefunden. Sie bringt mich aber nicht wirklich weiter......

ich versuch das Problem noch bebildert darzustellen.

ich öffne die Stage das erste mal und alles funktioniert:
1624005603037.png
Dann öffne ich sie das zweite mal. Die GUI bleibt leer bei der zweiten Stage:
1624005650681.png

Anscheinend schreibt der Controller ein zweites mal in die erste stage:
1624005687275.png
 

Zurück
Oben