Updated apps to the new about api

This commit is contained in:
Alex Andres 2021-04-06 23:07:51 +02:00
parent 2f5423d9e8
commit 1451091e68
No known key found for this signature in database
GPG key ID: 340764C7851D7041
22 changed files with 390 additions and 125 deletions

View file

@ -34,6 +34,7 @@ import org.lecturestudio.core.bus.EventBus;
import org.lecturestudio.core.bus.event.DocumentEvent;
import org.lecturestudio.core.model.Document;
import org.lecturestudio.core.model.RecentDocument;
import org.lecturestudio.core.presenter.AboutPresenter;
import org.lecturestudio.core.presenter.Presenter;
import org.lecturestudio.core.presenter.command.CloseApplicationCommand;
import org.lecturestudio.core.presenter.command.ShowPresenterCommand;

View file

@ -18,15 +18,22 @@
package org.lecturestudio.editor.javafx.view;
import static java.util.Objects.nonNull;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;
import javafx.application.HostServices;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.control.TableView;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import org.lecturestudio.core.model.Contributor;
import org.lecturestudio.core.model.Sponsor;
@ -40,6 +47,18 @@ import org.lecturestudio.javafx.view.model.SystemPropertyTableItem;
@FxmlView(name = "about")
public class FxAboutView extends ContentPane implements AboutView {
@FXML
private Label versionLabel;
@FXML
private Label buildDateLabel;
@FXML
private Hyperlink websiteLink;
@FXML
private Hyperlink issueLink;
@FXML
private TableView<SystemPropertyTableItem> systemPropertiesTable;
@ -57,6 +76,42 @@ public class FxAboutView extends ContentPane implements AboutView {
super();
}
@Override
public void setAppName(String name) {
FxUtils.invoke(() -> {
setTitle(getTitle() + " " + name);
});
}
@Override
public void setAppVersion(String version) {
FxUtils.invoke(() -> {
versionLabel.setText(version);
});
}
@Override
public void setAppBuildDate(String date) {
FxUtils.invoke(() -> {
buildDateLabel.setText(date);
});
}
@Override
public void setWebsite(String website) {
FxUtils.invoke(() -> {
websiteLink.setUserData(website);
websiteLink.setText(website);
});
}
@Override
public void setIssueWebsite(String website) {
FxUtils.invoke(() -> {
issueLink.setUserData(website);
});
}
@Override
public void setContributors(List<Contributor> contributors) {
FxUtils.invoke(() -> {
@ -100,4 +155,19 @@ public class FxAboutView extends ContentPane implements AboutView {
FxUtils.bindAction(closeButton, action);
}
@FXML
private void initialize() {
EventHandler<ActionEvent> linkHandler = event -> {
Stage window = (Stage) getScene().getWindow();
HostServices hostServices = (HostServices) window.getProperties().get("hostServices");
if (nonNull(hostServices)) {
Hyperlink link = (Hyperlink) event.getSource();
hostServices.showDocument((String) link.getUserData());
}
};
websiteLink.setOnAction(linkHandler);
issueLink.setOnAction(linkHandler);
}
}

View file

@ -2,6 +2,7 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
@ -17,6 +18,27 @@
<fx:root type="ContentPane" title="%about.title" styleClass="about" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<TabPane styleClass="content" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS">
<Tab text="%about.info">
<VBox styleClass="tab-content">
<Label fx:id="versionLabel">
<VBox.margin>
<Insets bottom="3.0" />
</VBox.margin>
</Label>
<Label fx:id="buildDateLabel">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Label>
<Hyperlink fx:id="websiteLink" />
<Label>
<VBox.margin>
<Insets bottom="3.0" />
</VBox.margin>
</Label>
<Hyperlink fx:id="issueLink" text="%about.info.issue" />
</VBox>
</Tab>
<Tab text="%about.contributors">
<VBox styleClass="tab-content" spacing="10.0">
<FlowPane fx:id="sponsorList" styleClass="sponsors-container" hgap="10.0" vgap="10.0" />

View file

@ -1,6 +1,9 @@
about.title = \u00dcber
about.info = Info
about.info.issue = Problem melden oder eine Verbesserung vorschlagen
about.contributors = Mitwirkende
about.system = System
about.system.properties = Die Systemeigenschaften enthalten Informationen zum aktuellen Benutzer und zur aktuellen Version der Java-Laufzeit.
about.property = Eigenschaft
about.property.value = Wert
about.property.value = Wert
about.version = Version {0}

View file

@ -1,6 +1,9 @@
about.title = About
about.info = Info
about.info.issue = Report a problem or suggest an improvement
about.contributors = Contributors
about.system = System
about.system.properties = System properties include information about the current user and the current version of the Java runtime.
about.property = Property
about.property.value = Value
about.property.value = Value
about.version = Version {0}

View file

@ -1,58 +0,0 @@
/*
* Copyright (C) 2020 TU Darmstadt, Department of Computer Science,
* Embedded Systems and Applications Group.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.lecturestudio.player.api.presenter;
import java.io.IOException;
import java.util.Locale;
import javax.inject.Inject;
import org.lecturestudio.core.app.ApplicationContext;
import org.lecturestudio.core.model.Contributor;
import org.lecturestudio.core.model.Sponsor;
import org.lecturestudio.core.presenter.Presenter;
import org.lecturestudio.core.service.ContributorsYamlSource;
import org.lecturestudio.core.service.DataSource;
import org.lecturestudio.core.service.SponsorsYamlSource;
import org.lecturestudio.core.view.AboutView;
public class AboutPresenter extends Presenter<AboutView> {
@Inject
AboutPresenter(ApplicationContext context, AboutView view) {
super(context, view);
}
@Override
public void initialize() throws IOException {
Locale locale = context.getConfiguration().getLocale();
String lang = locale.getLanguage();
String contributorsRes = String.format("/resources/contributors/contributors_%s.yaml", lang);
String sponsorsRes = String.format("/resources/contributors/sponsors_%s.yaml", lang);
DataSource<Contributor> contributorsSource = new ContributorsYamlSource(contributorsRes);
DataSource<Sponsor> sponsorsSource = new SponsorsYamlSource(sponsorsRes);
view.setContributors(contributorsSource.getAll());
view.setSponsors(sponsorsSource.getAll());
view.setProperties(System.getProperties());
view.setOnClose(this::close);
}
}

View file

@ -34,6 +34,7 @@ import org.lecturestudio.core.bus.EventBus;
import org.lecturestudio.core.bus.event.DocumentEvent;
import org.lecturestudio.core.model.Document;
import org.lecturestudio.core.model.RecentDocument;
import org.lecturestudio.core.presenter.AboutPresenter;
import org.lecturestudio.core.presenter.Presenter;
import org.lecturestudio.core.presenter.command.CloseApplicationCommand;
import org.lecturestudio.core.presenter.command.ShowPresenterCommand;

View file

@ -18,15 +18,22 @@
package org.lecturestudio.player.javafx.view;
import static java.util.Objects.nonNull;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;
import javafx.application.HostServices;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.control.TableView;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import org.lecturestudio.core.model.Contributor;
import org.lecturestudio.core.model.Sponsor;
@ -40,6 +47,18 @@ import org.lecturestudio.javafx.view.model.SystemPropertyTableItem;
@FxmlView(name = "about")
public class FxAboutView extends ContentPane implements AboutView {
@FXML
private Label versionLabel;
@FXML
private Label buildDateLabel;
@FXML
private Hyperlink websiteLink;
@FXML
private Hyperlink issueLink;
@FXML
private TableView<SystemPropertyTableItem> systemPropertiesTable;
@ -57,6 +76,42 @@ public class FxAboutView extends ContentPane implements AboutView {
super();
}
@Override
public void setAppName(String name) {
FxUtils.invoke(() -> {
setTitle(getTitle() + " " + name);
});
}
@Override
public void setAppVersion(String version) {
FxUtils.invoke(() -> {
versionLabel.setText(version);
});
}
@Override
public void setAppBuildDate(String date) {
FxUtils.invoke(() -> {
buildDateLabel.setText(date);
});
}
@Override
public void setWebsite(String website) {
FxUtils.invoke(() -> {
websiteLink.setUserData(website);
websiteLink.setText(website);
});
}
@Override
public void setIssueWebsite(String website) {
FxUtils.invoke(() -> {
issueLink.setUserData(website);
});
}
@Override
public void setContributors(List<Contributor> contributors) {
FxUtils.invoke(() -> {
@ -100,4 +155,19 @@ public class FxAboutView extends ContentPane implements AboutView {
FxUtils.bindAction(closeButton, action);
}
@FXML
private void initialize() {
EventHandler<ActionEvent> linkHandler = event -> {
Stage window = (Stage) getScene().getWindow();
HostServices hostServices = (HostServices) window.getProperties().get("hostServices");
if (nonNull(hostServices)) {
Hyperlink link = (Hyperlink) event.getSource();
hostServices.showDocument((String) link.getUserData());
}
};
websiteLink.setOnAction(linkHandler);
issueLink.setOnAction(linkHandler);
}
}

View file

@ -2,6 +2,7 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
@ -17,6 +18,27 @@
<fx:root type="ContentPane" title="%about.title" styleClass="about" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<TabPane styleClass="content" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS">
<Tab text="%about.info">
<VBox styleClass="tab-content">
<Label fx:id="versionLabel">
<VBox.margin>
<Insets bottom="3.0" />
</VBox.margin>
</Label>
<Label fx:id="buildDateLabel">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Label>
<Hyperlink fx:id="websiteLink" />
<Label>
<VBox.margin>
<Insets bottom="3.0" />
</VBox.margin>
</Label>
<Hyperlink fx:id="issueLink" text="%about.info.issue" />
</VBox>
</Tab>
<Tab text="%about.contributors">
<VBox styleClass="tab-content" spacing="10.0">
<FlowPane fx:id="sponsorList" styleClass="sponsors-container" hgap="10.0" vgap="10.0" />

View file

@ -1,6 +1,9 @@
about.title = \u00dcber
about.info = Info
about.info.issue = Problem melden oder eine Verbesserung vorschlagen
about.contributors = Mitwirkende
about.system = System
about.system.properties = Die Systemeigenschaften enthalten Informationen zum aktuellen Benutzer und zur aktuellen Version der Java-Laufzeit.
about.property = Eigenschaft
about.property.value = Wert
about.property.value = Wert
about.version = Version {0}

View file

@ -1,6 +1,9 @@
about.title = About
about.info = Info
about.info.issue = Report a problem or suggest an improvement
about.contributors = Contributors
about.system = System
about.system.properties = System properties include information about the current user and the current version of the Java runtime.
about.property = Property
about.property.value = Value
about.property.value = Value
about.version = Version {0}

View file

@ -1,58 +0,0 @@
/*
* Copyright (C) 2020 TU Darmstadt, Department of Computer Science,
* Embedded Systems and Applications Group.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.lecturestudio.presenter.api.presenter;
import java.io.IOException;
import java.util.Locale;
import javax.inject.Inject;
import org.lecturestudio.core.app.ApplicationContext;
import org.lecturestudio.core.model.Contributor;
import org.lecturestudio.core.model.Sponsor;
import org.lecturestudio.core.presenter.Presenter;
import org.lecturestudio.core.service.ContributorsYamlSource;
import org.lecturestudio.core.service.DataSource;
import org.lecturestudio.core.service.SponsorsYamlSource;
import org.lecturestudio.core.view.AboutView;
public class AboutPresenter extends Presenter<AboutView> {
@Inject
AboutPresenter(ApplicationContext context, AboutView view) {
super(context, view);
}
@Override
public void initialize() throws IOException {
Locale locale = context.getConfiguration().getLocale();
String lang = locale.getLanguage();
String contributorsRes = String.format("/resources/contributors/contributors_%s.yaml", lang);
String sponsorsRes = String.format("/resources/contributors/sponsors_%s.yaml", lang);
DataSource<Contributor> contributorsSource = new ContributorsYamlSource(contributorsRes);
DataSource<Sponsor> sponsorsSource = new SponsorsYamlSource(sponsorsRes);
view.setContributors(contributorsSource.getAll());
view.setSponsors(sponsorsSource.getAll());
view.setProperties(System.getProperties());
view.setOnClose(this::close);
}
}

View file

@ -51,6 +51,7 @@ import org.lecturestudio.core.model.Page;
import org.lecturestudio.core.model.RecentDocument;
import org.lecturestudio.core.model.listener.PageEditEvent;
import org.lecturestudio.core.model.listener.ParameterChangeListener;
import org.lecturestudio.core.presenter.AboutPresenter;
import org.lecturestudio.core.presenter.Presenter;
import org.lecturestudio.core.presenter.command.CloseApplicationCommand;
import org.lecturestudio.core.presenter.command.ClosePresenterCommand;

View file

@ -18,15 +18,22 @@
package org.lecturestudio.presenter.javafx.view;
import static java.util.Objects.nonNull;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;
import javafx.application.HostServices;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.control.TableView;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import org.lecturestudio.core.model.Contributor;
import org.lecturestudio.core.model.Sponsor;
@ -40,6 +47,18 @@ import org.lecturestudio.javafx.view.model.SystemPropertyTableItem;
@FxmlView(name = "about")
public class FxAboutView extends ContentPane implements AboutView {
@FXML
private Label versionLabel;
@FXML
private Label buildDateLabel;
@FXML
private Hyperlink websiteLink;
@FXML
private Hyperlink issueLink;
@FXML
private TableView<SystemPropertyTableItem> systemPropertiesTable;
@ -57,6 +76,42 @@ public class FxAboutView extends ContentPane implements AboutView {
super();
}
@Override
public void setAppName(String name) {
FxUtils.invoke(() -> {
setTitle(getTitle() + " " + name);
});
}
@Override
public void setAppVersion(String version) {
FxUtils.invoke(() -> {
versionLabel.setText(version);
});
}
@Override
public void setAppBuildDate(String date) {
FxUtils.invoke(() -> {
buildDateLabel.setText(date);
});
}
@Override
public void setWebsite(String website) {
FxUtils.invoke(() -> {
websiteLink.setUserData(website);
websiteLink.setText(website);
});
}
@Override
public void setIssueWebsite(String website) {
FxUtils.invoke(() -> {
issueLink.setUserData(website);
});
}
@Override
public void setContributors(List<Contributor> contributors) {
FxUtils.invoke(() -> {
@ -100,4 +155,19 @@ public class FxAboutView extends ContentPane implements AboutView {
FxUtils.bindAction(closeButton, action);
}
@FXML
private void initialize() {
EventHandler<ActionEvent> linkHandler = event -> {
Stage window = (Stage) getScene().getWindow();
HostServices hostServices = (HostServices) window.getProperties().get("hostServices");
if (nonNull(hostServices)) {
Hyperlink link = (Hyperlink) event.getSource();
hostServices.showDocument((String) link.getUserData());
}
};
websiteLink.setOnAction(linkHandler);
issueLink.setOnAction(linkHandler);
}
}

View file

@ -2,6 +2,7 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
@ -17,6 +18,27 @@
<fx:root type="ContentPane" title="%about.title" styleClass="about" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<TabPane styleClass="content" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS">
<Tab text="%about.info">
<VBox styleClass="tab-content">
<Label fx:id="versionLabel">
<VBox.margin>
<Insets bottom="3.0" />
</VBox.margin>
</Label>
<Label fx:id="buildDateLabel">
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Label>
<Hyperlink fx:id="websiteLink" />
<Label>
<VBox.margin>
<Insets bottom="3.0" />
</VBox.margin>
</Label>
<Hyperlink fx:id="issueLink" text="%about.info.issue" />
</VBox>
</Tab>
<Tab text="%about.contributors">
<VBox styleClass="tab-content" spacing="10.0">
<FlowPane fx:id="sponsorList" styleClass="sponsors-container" hgap="10.0" vgap="10.0" />

View file

@ -1,6 +1,9 @@
about.title = \u00dcber
about.info = Info
about.info.issue = Problem melden oder eine Verbesserung vorschlagen
about.contributors = Mitwirkende
about.system = System
about.system.properties = Die Systemeigenschaften enthalten Informationen zum aktuellen Benutzer und zur aktuellen Version der Java-Laufzeit.
about.property = Eigenschaft
about.property.value = Wert
about.property.value = Wert
about.version = Version {0}

View file

@ -1,6 +1,9 @@
about.title = About
about.info = Info
about.info.issue = Report a problem or suggest an improvement
about.contributors = Contributors
about.system = System
about.system.properties = System properties include information about the current user and the current version of the Java runtime.
about.property = Property
about.property.value = Value
about.property.value = Value
about.version = Version {0}

View file

@ -19,8 +19,14 @@
package org.lecturestudio.presenter.swing.view;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Desktop;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.net.URI;
import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
import java.util.Enumeration;
@ -45,6 +51,14 @@ import org.lecturestudio.swing.view.ViewPostConstruct;
@SwingView(name = "about")
public class SwingAboutView extends ContentPane implements AboutView {
private JLabel versionLabel;
private JLabel buildDateLabel;
private JLabel websiteLabel;
private JLabel issueLabel;
private JTable systemPropertiesTable;
private Container contributorPane;
@ -58,6 +72,42 @@ public class SwingAboutView extends ContentPane implements AboutView {
super();
}
@Override
public void setAppName(String name) {
SwingUtils.invoke(() -> {
setTitle(getTitle() + " " + name);
});
}
@Override
public void setAppVersion(String version) {
SwingUtils.invoke(() -> {
versionLabel.setText(version);
});
}
@Override
public void setAppBuildDate(String date) {
SwingUtils.invoke(() -> {
buildDateLabel.setText(date);
});
}
@Override
public void setWebsite(String website) {
SwingUtils.invoke(() -> {
websiteLabel.setName(website);
websiteLabel.setText(website);
});
}
@Override
public void setIssueWebsite(String website) {
SwingUtils.invoke(() -> {
issueLabel.setName(website);
});
}
@Override
public void setContributors(List<Contributor> contributors) {
SwingUtils.invoke(() -> {
@ -111,6 +161,25 @@ public class SwingAboutView extends ContentPane implements AboutView {
@ViewPostConstruct
private void initialize() {
MouseListener clickListener = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent event) {
JLabel label = (JLabel) event.getSource();
try {
Desktop.getDesktop().browse(new URI(label.getName()));
}
catch (Exception e) {
// Ignore.
}
}
};
websiteLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
websiteLabel.addMouseListener(clickListener);
issueLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
issueLabel.addMouseListener(clickListener);
contributorPane.setLayout(new WrapFlowLayout(FlowLayout.LEFT, 10, 10));
sponsorPane.setLayout(new WrapFlowLayout(FlowLayout.LEFT, 10, 10));

View file

@ -3,6 +3,15 @@
<Panel layout="GridBagLayout" border="EmptyBorder(0, 20, 20, 20)">
<TabbedPane tabPlacement="JTabbedPane.TOP">
<gridbagconstraints gridx="0" gridy="0" anchor="GridBagConstraints.NORTHWEST" weightx="1.0" weighty="1.0" fill="GridBagConstraints.BOTH" />
<Tab text="about.info">
<VBox border="EmptyBorder(10, 10, 10, 10)">
<Label id="versionLabel" border="EmptyBorder(0, 0, 3, 0)" />
<Label id="buildDateLabel" border="EmptyBorder(0, 0, 10, 0)" />
<Label id="websiteLabel" foreground="0000B3" />
<Label border="EmptyBorder(10, 0, 10, 0)" />
<Label id="issueLabel" text="about.info.issue" foreground="0000B3" />
</VBox>
</Tab>
<Tab text="about.contributors">
<Panel layout="BorderLayout">
<Panel id="sponsorPane" constraints="BorderLayout.NORTH" />

View file

@ -1,6 +1,9 @@
about.title = \u00dcber
about.info = Info
about.info.issue = Problem melden oder eine Verbesserung vorschlagen
about.contributors = Mitwirkende
about.system = System
about.system.properties = Die Systemeigenschaften enthalten Informationen zum aktuellen Benutzer und zur aktuellen Version der Java-Laufzeit.
about.property = Eigenschaft
about.property.value = Wert
about.property.value = Wert
about.version = Version {0}

View file

@ -1,6 +1,9 @@
about.title = About
about.info = Info
about.info.issue = Report a problem or suggest an improvement
about.contributors = Contributors
about.system = System
about.system.properties = System properties include information about the current user and the current version of the Java runtime.
about.property = Property
about.property.value = Value
about.property.value = Value
about.version = Version {0}

View file

@ -48,7 +48,7 @@ public class LectSwingPreloader extends SwingPreloader {
JPanel panel = new JPanel() {
Font versionFont = new Font("Dialog", Font.BOLD, 12);
final Font versionFont = new Font("Dialog", Font.BOLD, 12);
@Override