2020-03-21 00:37:09 +00:00
|
|
|
package de.wwwu.awolf.view;
|
|
|
|
|
|
|
|
|
|
|
|
import de.wwwu.awolf.model.Line;
|
|
|
|
import de.wwwu.awolf.presenter.AbstractPresenter;
|
|
|
|
import de.wwwu.awolf.presenter.Presenter;
|
2020-03-21 19:54:03 +00:00
|
|
|
import de.wwwu.awolf.presenter.algorithms.Algorithm;
|
2020-03-21 00:37:09 +00:00
|
|
|
import de.wwwu.awolf.presenter.util.Logging;
|
|
|
|
import de.wwwu.awolf.view.listener.*;
|
|
|
|
import de.wwwu.awolf.view.panels.EvaluationPanel;
|
|
|
|
import de.wwwu.awolf.view.panels.InfoPanel;
|
|
|
|
import de.wwwu.awolf.view.panels.PlotPanel;
|
|
|
|
import de.wwwu.awolf.view.panels.tabs.LMSPanel;
|
|
|
|
import de.wwwu.awolf.view.panels.tabs.RMPanel;
|
|
|
|
import de.wwwu.awolf.view.panels.tabs.TSPanel;
|
|
|
|
import de.wwwu.awolf.view.panels.tabs.TabPanel;
|
2017-09-10 15:45:47 +00:00
|
|
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
|
import javax.swing.*;
|
|
|
|
import java.awt.*;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.util.List;
|
2020-03-21 19:54:03 +00:00
|
|
|
import java.util.Map;
|
2017-09-10 15:45:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementierung verschiedener Algorithmen zur Berechnung von Ausgleichsgeraden.
|
|
|
|
*
|
|
|
|
* @Author: Armin Wolf
|
|
|
|
* @Email: a_wolf28@uni-muenster.de
|
|
|
|
* @Date: 28.05.2017.
|
|
|
|
*/
|
|
|
|
public class MainFrame extends JFrame {
|
|
|
|
|
2020-03-23 20:58:39 +00:00
|
|
|
private InfoPanel output;
|
2017-09-10 15:45:47 +00:00
|
|
|
private AbstractPresenter presenter;
|
|
|
|
|
|
|
|
private JButton importButton;
|
|
|
|
private JButton generateButton;
|
|
|
|
private JButton exportButton;
|
|
|
|
|
|
|
|
private MenuBar menu;
|
|
|
|
private JToolBar toolBar;
|
|
|
|
private TabPanel lmsPanel;
|
|
|
|
private TabPanel rmPanel;
|
|
|
|
private TabPanel tsPanel;
|
|
|
|
|
|
|
|
private PlotPanel plotLMS;
|
|
|
|
private PlotPanel plotRM;
|
|
|
|
private PlotPanel plotTS;
|
|
|
|
private JDialog progressDialog;
|
|
|
|
private JDialog evaluationDialog;
|
|
|
|
|
|
|
|
private Container progressContent;
|
|
|
|
private JProgressBar progressBar;
|
|
|
|
|
|
|
|
|
|
|
|
private JSplitPane splitpane;
|
|
|
|
private JTabbedPane tabbedPane;
|
|
|
|
private EvaluationPanel evaluationPanel;
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Konstruktor
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public MainFrame() {
|
|
|
|
super();
|
|
|
|
initializeComponents();
|
|
|
|
setDimensions();
|
|
|
|
setLayouts();
|
|
|
|
setTitles();
|
|
|
|
|
|
|
|
addComponents();
|
|
|
|
|
|
|
|
setCloseOperations();
|
|
|
|
setIcons();
|
|
|
|
disableFunctionality();
|
|
|
|
this.setVisible(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*******************************************************************************************************************
|
|
|
|
* visualisierungs methoden
|
|
|
|
******************************************************************************************************************/
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Visualisiert das Ergebnis des LMS-Schätzers
|
2020-03-20 17:08:18 +00:00
|
|
|
*
|
|
|
|
* @param m Steigung
|
|
|
|
* @param b y-Achsenabschnitt
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void visualizeLMS(double m, double b) {
|
|
|
|
plotLMS = new PlotPanel();
|
|
|
|
lmsPanel.setPlotPanel(plotLMS);
|
|
|
|
createPlot(m, b, plotLMS, lmsPanel, "LMS");
|
|
|
|
}
|
|
|
|
|
2020-03-21 00:37:09 +00:00
|
|
|
/**
|
|
|
|
* Visualisiert das Ergebnis des LMS-Schätzers
|
|
|
|
*
|
|
|
|
* @param line Line
|
|
|
|
*/
|
|
|
|
public void visualizeLMS(final Line line) {
|
|
|
|
plotLMS = new PlotPanel();
|
|
|
|
lmsPanel.setPlotPanel(plotLMS);
|
|
|
|
createPlot(line.getM(), line.getB(), plotLMS, lmsPanel, "LMS");
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Visualisiert das Ergebnis des RM-Schätzers
|
2020-03-20 17:08:18 +00:00
|
|
|
*
|
|
|
|
* @param m Steigung
|
|
|
|
* @param b y-Achsenabschnitt
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void visualizeRM(double m, double b) {
|
|
|
|
plotRM = new PlotPanel();
|
|
|
|
rmPanel.setPlotPanel(plotRM);
|
|
|
|
createPlot(m, b, plotRM, rmPanel, "RM");
|
|
|
|
}
|
|
|
|
|
2020-03-21 00:37:09 +00:00
|
|
|
/**
|
|
|
|
* Visualisiert das Ergebnis des RM-Schätzers
|
|
|
|
*
|
|
|
|
* @param line Line
|
|
|
|
*/
|
|
|
|
public void visualizeRM(final Line line) {
|
|
|
|
plotRM = new PlotPanel();
|
|
|
|
rmPanel.setPlotPanel(plotRM);
|
|
|
|
createPlot(line.getM(), line.getB(), plotRM, rmPanel, "RM");
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Visualisiert das Ergebnis des TS-Schätzers
|
2020-03-20 17:08:18 +00:00
|
|
|
*
|
|
|
|
* @param m Steigung
|
|
|
|
* @param b y-Achsenabschnitt
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void visualizeTS(double m, double b) {
|
|
|
|
plotTS = new PlotPanel();
|
|
|
|
tsPanel.setPlotPanel(plotTS);
|
|
|
|
createPlot(m, b, plotTS, tsPanel, "TS");
|
|
|
|
}
|
|
|
|
|
2020-03-21 00:37:09 +00:00
|
|
|
/**
|
|
|
|
* Visualisiert das Ergebnis des TS-Schätzers
|
|
|
|
*
|
|
|
|
* @param line Line
|
|
|
|
*/
|
|
|
|
public void visualizeTS(final Line line) {
|
|
|
|
plotTS = new PlotPanel();
|
|
|
|
tsPanel.setPlotPanel(plotTS);
|
|
|
|
createPlot(line.getM(), line.getB(), plotTS, tsPanel, "TS");
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Erzeugt den Plot zu einer Eingabe von Punkten und der Lösung eines Schätzers (m,b)
|
2020-03-20 17:08:18 +00:00
|
|
|
*
|
|
|
|
* @param m Steigung
|
|
|
|
* @param b y-Achsenabschnitt
|
|
|
|
* @param plot Plot
|
|
|
|
* @param panel Panel auf dem der Plot plaziert wird
|
|
|
|
* @param name Bezeichnung der Gerade
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void createPlot(double m, double b, PlotPanel plot, JPanel panel, String name) {
|
|
|
|
SwingUtilities.invokeLater(() -> {
|
|
|
|
plot.clear();
|
|
|
|
plot.createPlot(getPresenter().getModel().getLines());
|
|
|
|
plot.addLineToPlot(m, b, name);
|
|
|
|
panel.revalidate();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Visualisierung des Import-Prozesses
|
2020-03-20 17:08:18 +00:00
|
|
|
*
|
2017-10-17 06:34:55 +00:00
|
|
|
* @param progress akteulle Prozentzahl (0-100)
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void showImportProgress(Integer progress) {
|
|
|
|
progressBar.setValue(progress);
|
|
|
|
progressBar.setStringPainted(true);
|
|
|
|
progressDialog.setVisible(true);
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Zeigt den Evaluations-Dialog an (ggf. wird dieser erzeugt)
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void showEvauluationDialog() {
|
|
|
|
if (evaluationDialog == null) {
|
|
|
|
SwingUtilities.invokeLater(() -> {
|
|
|
|
evaluationDialog = new JDialog();
|
2020-03-23 20:58:39 +00:00
|
|
|
evaluationDialog.setTitle("Evaluation");
|
2017-09-10 15:45:47 +00:00
|
|
|
evaluationDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
2017-10-17 06:34:55 +00:00
|
|
|
evaluationDialog.setSize(new Dimension(1500, 800));
|
2017-09-10 15:45:47 +00:00
|
|
|
evaluationDialog.setLocationRelativeTo(null);
|
|
|
|
|
|
|
|
evaluationPanel = new EvaluationPanel(this);
|
|
|
|
evaluationDialog.setLocationRelativeTo(this);
|
|
|
|
evaluationDialog.add(evaluationPanel);
|
|
|
|
evaluationDialog.setVisible(true);
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
SwingUtilities.invokeLater(() -> {
|
|
|
|
evaluationDialog.setLocationRelativeTo(this);
|
|
|
|
evaluationDialog.setVisible(true);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Fügt der Evaluations-Tabelle eine Zeile mit Daten hinzu
|
2020-03-20 17:08:18 +00:00
|
|
|
*
|
2020-03-21 19:54:03 +00:00
|
|
|
* @param tableEntries Data of the Table
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2020-03-21 19:54:03 +00:00
|
|
|
public void appendEvalResult(Map<Algorithm.Type, Map<String, String>> tableEntries) {
|
2017-09-10 15:45:47 +00:00
|
|
|
|
|
|
|
SwingUtilities.invokeLater(() -> {
|
2020-03-21 19:54:03 +00:00
|
|
|
evaluationPanel.addRow(tableEntries);
|
2017-09-10 15:45:47 +00:00
|
|
|
evaluationPanel.repaint();
|
|
|
|
evaluationPanel.revalidate();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
2020-03-21 19:54:03 +00:00
|
|
|
* Fügt der Evaluations-Tabelle eine Zeile mit Daten hinzu
|
2020-03-20 17:08:18 +00:00
|
|
|
*
|
2020-03-21 19:54:03 +00:00
|
|
|
* @param res Daten der Spalte
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2020-03-21 19:54:03 +00:00
|
|
|
public void appendEvalResults(Map<Algorithm.Type, Map<String, String>> res) {
|
|
|
|
appendEvalResult(res);
|
2017-09-10 15:45:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*******************************************************************************************************************
|
|
|
|
* init GUI
|
|
|
|
******************************************************************************************************************/
|
2017-10-17 06:34:55 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Setzt den Titel der Komponenten
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
private void setTitles() {
|
|
|
|
this.setTitle("Algorithmen zur Berechnung von Ausgleichgeraden");
|
|
|
|
importButton.setText("Import");
|
|
|
|
exportButton.setText("Export");
|
|
|
|
generateButton.setText("Generiere");
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Fügt die einzelnen Seiten dem TabbedPane hinzu
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
private void setupTabbedPane() {
|
|
|
|
tabbedPane.add("Least Median of Squares", lmsPanel);
|
|
|
|
tabbedPane.add("Repeated Median", rmPanel);
|
|
|
|
tabbedPane.add("Theil-Sen", tsPanel);
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Komponenten werden in Container gesetzt
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
private void addComponents() {
|
|
|
|
toolBar.add(importButton);
|
|
|
|
toolBar.add(exportButton);
|
|
|
|
toolBar.add(generateButton);
|
|
|
|
toolBar.setFloatable(false);
|
|
|
|
|
|
|
|
setJMenuBar(menu.getMenuBar());
|
|
|
|
add(toolBar);
|
|
|
|
|
|
|
|
setupSplitPane();
|
|
|
|
setupTabbedPane();
|
|
|
|
|
|
|
|
progressContent.add(progressBar, BorderLayout.CENTER);
|
|
|
|
progressBar.setBorder(BorderFactory.createTitledBorder("Import..."));
|
|
|
|
progressDialog.setLocationRelativeTo(null);
|
|
|
|
((JPanel) progressDialog.getContentPane()).setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY));
|
|
|
|
|
|
|
|
this.add(toolBar, BorderLayout.NORTH);
|
|
|
|
this.add(splitpane, BorderLayout.CENTER);
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Konfiguration des SplitPane
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
private void setupSplitPane() {
|
|
|
|
splitpane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
|
|
|
|
splitpane.setResizeWeight(.5d);
|
|
|
|
splitpane.setContinuousLayout(true);
|
|
|
|
splitpane.setLeftComponent(output);
|
|
|
|
splitpane.setRightComponent(tabbedPane);
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Fenster Funktionalität wird gesetzt
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
private void setCloseOperations() {
|
|
|
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
|
progressDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Größen der Komponenten werden gesetzt
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
private void setDimensions() {
|
2017-10-17 06:34:55 +00:00
|
|
|
this.setSize(new Dimension(1500, 800));
|
2017-09-10 15:45:47 +00:00
|
|
|
this.setResizable(true);
|
|
|
|
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
|
|
|
this.setMaximizedBounds(env.getMaximumWindowBounds());
|
|
|
|
lmsPanel.setMinimumSize(new Dimension(400, 500));
|
|
|
|
rmPanel.setMinimumSize(new Dimension(400, 500));
|
|
|
|
tsPanel.setMinimumSize(new Dimension(400, 500));
|
|
|
|
output.setMinimumSize(new Dimension(400, 500));
|
|
|
|
progressDialog.setSize(300, 45);
|
|
|
|
progressDialog.setResizable(false);
|
|
|
|
progressDialog.setUndecorated(true);
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Setzen der Layouts
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
private void setLayouts() {
|
|
|
|
this.setLayout(new BorderLayout());
|
|
|
|
toolBar.setLayout(new FlowLayout(FlowLayout.LEFT));
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Initialisierung der Komponenten
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
private void initializeComponents() {
|
|
|
|
//panels
|
|
|
|
toolBar = new JToolBar();
|
|
|
|
lmsPanel = new LMSPanel();
|
|
|
|
rmPanel = new RMPanel();
|
|
|
|
tsPanel = new TSPanel();
|
|
|
|
menu = new MenuBar(this);
|
|
|
|
|
|
|
|
//Dialogs
|
|
|
|
progressDialog = new JDialog();
|
|
|
|
progressDialog.setLocationRelativeTo(null);
|
|
|
|
progressContent = progressDialog.getContentPane();
|
|
|
|
progressBar = new JProgressBar();
|
|
|
|
|
|
|
|
//Panes
|
|
|
|
tabbedPane = new JTabbedPane();
|
|
|
|
output = new InfoPanel();
|
|
|
|
splitpane = new JSplitPane();
|
|
|
|
|
|
|
|
//Buttons
|
|
|
|
importButton = new JButton();
|
|
|
|
generateButton = new JButton();
|
|
|
|
exportButton = new JButton();
|
2017-10-13 09:53:45 +00:00
|
|
|
pack();
|
2017-09-10 15:45:47 +00:00
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Icons werden passend gesetzt
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
private void setIcons() {
|
|
|
|
try {
|
|
|
|
ClassLoader classLoader = getClass().getClassLoader();
|
|
|
|
Image imgImport = ImageIO.read(classLoader.getResource("import.png")).getScaledInstance(16, 16, Image.SCALE_SMOOTH);
|
|
|
|
Image imgStart = ImageIO.read(classLoader.getResource("start.png")).getScaledInstance(32, 32, Image.SCALE_SMOOTH);
|
|
|
|
Image imgGenerate = ImageIO.read(classLoader.getResource("generate.png")).getScaledInstance(16, 16, Image.SCALE_SMOOTH);
|
|
|
|
Image imgExport = ImageIO.read(classLoader.getResource("export.png")).getScaledInstance(16, 16, Image.SCALE_SMOOTH);
|
|
|
|
Image imgFrame = ImageIO.read(classLoader.getResource("frame.png")).getScaledInstance(32, 23, Image.SCALE_SMOOTH);
|
|
|
|
|
|
|
|
importButton.setIcon(new ImageIcon(imgImport));
|
|
|
|
exportButton.setIcon(new ImageIcon(imgExport));
|
|
|
|
generateButton.setIcon(new ImageIcon(imgGenerate));
|
|
|
|
lmsPanel.getStartButton().setIcon(new ImageIcon(imgStart));
|
|
|
|
rmPanel.getStartButton().setIcon(new ImageIcon(imgStart));
|
|
|
|
tsPanel.getStartButton().setIcon(new ImageIcon(imgStart));
|
|
|
|
this.setIconImage(imgFrame);
|
|
|
|
} catch (IOException e) {
|
2020-03-21 00:37:09 +00:00
|
|
|
Logging.logError(e.getMessage(), e);
|
2017-09-10 15:45:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Funktionalitäten werden hinzugefügt
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void setActionListeners() {
|
|
|
|
//action listener für MenuItems
|
|
|
|
menu.addActionListeners();
|
|
|
|
|
|
|
|
//action listener für diese Klasse
|
|
|
|
lmsPanel.getStartButton().addActionListener(new StartAlgorithmListener(((Presenter) getPresenter()), lmsPanel));
|
|
|
|
rmPanel.getStartButton().addActionListener(new StartAlgorithmListener(((Presenter) getPresenter()), rmPanel));
|
|
|
|
tsPanel.getStartButton().addActionListener(new StartAlgorithmListener(((Presenter) getPresenter()), tsPanel));
|
2020-03-23 06:58:40 +00:00
|
|
|
importButton.addActionListener(new ImportDataListener((Presenter) this.getPresenter()));
|
|
|
|
exportButton.addActionListener(new ExportDataListener((Presenter) this.getPresenter()));
|
2017-09-10 15:45:47 +00:00
|
|
|
generateButton.addActionListener(new GenerateDataListener((Presenter) this.getPresenter()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Funktionalitäten werden aktiviert.
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void enableFunctionality() {
|
|
|
|
this.getLmsPanel().getStartButton().setEnabled(true);
|
|
|
|
this.getRmPanel().getStartButton().setEnabled(true);
|
|
|
|
this.getTsPanel().getStartButton().setEnabled(true);
|
|
|
|
this.getExportButton().setEnabled(true);
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* Funktionalitäten werden deaktiviert.
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void disableFunctionality() {
|
|
|
|
this.getLmsPanel().getStartButton().setEnabled(false);
|
|
|
|
this.getRmPanel().getStartButton().setEnabled(false);
|
|
|
|
this.getTsPanel().getStartButton().setEnabled(false);
|
|
|
|
this.getExportButton().setEnabled(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************************************************
|
|
|
|
* log Methode
|
|
|
|
******************************************************************************************************************/
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* @param s Text der ausgegeben wird
|
|
|
|
*/
|
2020-03-23 20:58:39 +00:00
|
|
|
public void logInfo(String s) {
|
|
|
|
output.appendParagraph(s);
|
2017-09-10 15:45:47 +00:00
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* @param s Fehlertext der ausgegeben wird
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void logError(String s) {
|
2020-03-23 20:58:39 +00:00
|
|
|
SwingUtilities.invokeLater(() -> output.appendParagraph(s));
|
2017-09-10 15:45:47 +00:00
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* @param s Text der in grüner Farbe ausgegeben wird
|
|
|
|
*/
|
2020-03-23 20:58:39 +00:00
|
|
|
public void logWarning(String s) {
|
|
|
|
SwingUtilities.invokeLater(() -> output.appendParagraph(s));
|
2017-09-10 15:45:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*******************************************************************************************************************
|
|
|
|
* Getter und Setter Methoden
|
|
|
|
******************************************************************************************************************/
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
2020-03-20 17:08:18 +00:00
|
|
|
* @return liefert das Panel zum visualisieren des LMS-Schätzers
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public TabPanel getLmsPanel() {
|
|
|
|
return lmsPanel;
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
2020-03-20 17:08:18 +00:00
|
|
|
* @return liefert das Panel zum visualisieren des RM-Schätzers
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public TabPanel getRmPanel() {
|
|
|
|
return rmPanel;
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
2020-03-20 17:08:18 +00:00
|
|
|
* @return liefert die Instanz des Presenters zurück
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public AbstractPresenter getPresenter() {
|
|
|
|
return presenter;
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
|
|
|
* @param presenter Presenter Instanz
|
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public void setPresenter(AbstractPresenter presenter) {
|
|
|
|
this.presenter = presenter;
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
2020-03-20 17:08:18 +00:00
|
|
|
* @return liefert den Dialog zum visualisieren des Import-Fortschrits
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public JDialog getProgressDialog() {
|
|
|
|
return progressDialog;
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
2020-03-20 17:08:18 +00:00
|
|
|
* @return liefert das Panel zum visualisieren des TS-Schätzers
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public TabPanel getTsPanel() {
|
|
|
|
return tsPanel;
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:34:55 +00:00
|
|
|
/**
|
2020-03-20 17:08:18 +00:00
|
|
|
* @return liefert den Button, exportieren zurück
|
2017-10-17 06:34:55 +00:00
|
|
|
*/
|
2017-09-10 15:45:47 +00:00
|
|
|
public JButton getExportButton() {
|
|
|
|
return exportButton;
|
|
|
|
}
|
|
|
|
}
|