|
|
|
@@ -5,9 +5,7 @@ import de.uniluebeck.mi.projmi6.model.HL7LogEntry; |
|
|
|
import javafx.collections.FXCollections; |
|
|
|
import javafx.concurrent.Task; |
|
|
|
import javafx.fxml.FXML; |
|
|
|
import javafx.scene.control.Button; |
|
|
|
import javafx.scene.control.TableColumn; |
|
|
|
import javafx.scene.control.TableView; |
|
|
|
import javafx.scene.control.*; |
|
|
|
import javafx.scene.control.cell.PropertyValueFactory; |
|
|
|
import javafx.scene.text.Text; |
|
|
|
|
|
|
|
@@ -48,7 +46,30 @@ public class LogController { |
|
|
|
private void initColumns(){ |
|
|
|
colLogIp.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, String>("source")); |
|
|
|
colLogTime.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, LocalDateTime>("timestamp")); |
|
|
|
colLogIp.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, String>("message")); |
|
|
|
colLogMessage.setCellValueFactory(new PropertyValueFactory<HL7LogEntry, String>("message")); |
|
|
|
|
|
|
|
colLogMessage.setCellFactory(column -> { |
|
|
|
return new TableCell<HL7LogEntry, String>(){ |
|
|
|
private TextArea textArea = new TextArea(); |
|
|
|
{ |
|
|
|
textArea.setEditable(false); |
|
|
|
textArea.setPrefRowCount(5); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void updateItem(String item, boolean empty) { |
|
|
|
super.updateItem(item, empty); |
|
|
|
this.setText(null); |
|
|
|
if(item == null || empty){ |
|
|
|
this.setGraphic(null); |
|
|
|
return; |
|
|
|
} |
|
|
|
textArea.setText(item); |
|
|
|
textArea.setWrapText(true); |
|
|
|
this.setGraphic(textArea); |
|
|
|
} |
|
|
|
}; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@@ -80,6 +101,7 @@ public class LogController { |
|
|
|
tblLog.setItems(FXCollections.observableArrayList(this.getValue())); |
|
|
|
mainController.decreaseParallelTaskCount(); |
|
|
|
btnRefresh.setDisable(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
|