Commit fd910ca2 authored by BZoennchen's avatar BZoennchen

Merge branch 'master' of https://gitlab.lrz.de/vadere/vadere

parents 387a0b00 ba757cca
Pipeline #119621 passed with stages
in 138 minutes and 3 seconds
......@@ -137,6 +137,8 @@ public class TikzGenerator {
Color agentColor = model.getConfig().getPedestrianDefaultColor();
colorDefinitions += String.format(Locale.US, colorTextPattern, "AgentColor", agentColor.getRed(), agentColor.getGreen(), agentColor.getBlue());
colorDefinitions += String.format(Locale.US, colorTextPattern, "AgentIdColor", 255, 127, 0); // This orange color is hard-coded in "DefaultRenderer".
colorDefinitions += "\n";
return colorDefinitions;
......@@ -262,9 +264,20 @@ public class TikzGenerator {
generatedCode += "% Agents\n";
generatedCode += drawAgents(config);
} else {
generatedCode = "% Agents (not enabled in config)\n";
generatedCode += "% Agents (not enabled in config)\n";
}
if (config.isShowPedestrianIds()) {
generatedCode += "% Agent Ids\n";
for (Agent agent : model.getAgents()) {
generatedCode += String.format(Locale.US, "\\node[text=AgentIdColor] (id%d) at (%f,%f) {\\textbf{%d}};\n",
agent.getId(), agent.getPosition().x, agent.getPosition().y, agent.getId());
}
} else {
generatedCode += "% Agent Ids (not enabled in config)\n";
}
return generatedCode;
}
......
......@@ -18,20 +18,15 @@ public class ActionShowAboutDialog extends AbstractAction {
super(name);
}
/*
JOptionPane.showMessageDialog(null, text,
Messages.getString("PostVis.about.title"),
JOptionPane.INFORMATION_MESSAGE);
*/
@Override
public void actionPerformed(final ActionEvent event) {
String text = "<html>" +
"<font size =\"3\"><em>" + MessageFormat.format(Messages.getString("ProjectView.version"), HashGenerator.releaseNumber()) + "</em></font><br>" +
"<font size =\"3\">" + MessageFormat.format(Messages.getString("ProjectView.license.text"), "GNU Lesser General Public License (<em>LGPL</em>)")+".</font></html>";
String text = "";
text += "<html>";
text += "<font size =\"3\"><em>" + MessageFormat.format(Messages.getString("ProjectView.version"), HashGenerator.releaseNumber()) + "</em></font><br>";
text += "<br>";
text += "<font size =\"3\">www.vadere.org</font><br>";
text += "<font size =\"3\">" + MessageFormat.format(Messages.getString("ProjectView.license.text"), "GNU Lesser General Public License (<em>LGPL</em>).") + "</font>";
text += "</html>";
JOptionPane.showMessageDialog(null,
text, Messages.getString("ProjectView.aboutDialog.label"),
......
package org.vadere.gui.projectview.view;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* A simple about dialog for the Vadere GUI.
*
*
*/
public class AboutDialogView extends JDialog {
private static final long serialVersionUID = 7906201118628730905L;
private final JPanel contentPanel = new JPanel();
/**
* Create the dialog.
*/
public AboutDialogView() {
final JDialog currentDialog = this;
setTitle("About");
setBounds(100, 100, 450, 300);
getContentPane().setLayout(new BorderLayout());
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
getContentPane().add(contentPanel, BorderLayout.CENTER);
contentPanel.setLayout(new BorderLayout(0, 0));
{
JLabel lblVadereGUI = new JLabel("Vadere GUI");
contentPanel.add(lblVadereGUI, BorderLayout.NORTH);
}
{
JLabel lblThisSoftwareManages = new JLabel(
"This software manages scenarios for the Vadere Pedestrian Crowd Simulator.");
contentPanel.add(lblThisSoftwareManages, BorderLayout.CENTER);
}
{
JPanel buttonPane = new JPanel();
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
getContentPane().add(buttonPane, BorderLayout.SOUTH);
{
JButton closeButton = new JButton("Close");
closeButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
currentDialog.setVisible(false);
}
});
closeButton.setActionCommand("Close");
buttonPane.add(closeButton);
getRootPane().setDefaultButton(closeButton);
}
}
}
}
......@@ -427,7 +427,6 @@ public class ProjectView extends JFrame implements ProjectFinishedListener, Sing
menuBar.add(mnHelp);
Action showAboutAction = new ActionShowAboutDialog(Messages.getString("ProjectView.mntmAbout.text"));
setAcceleratorFromLocalizedShortcut(showAboutAction, "ProjectView.mntmAbout.shortcut");
JMenuItem mntmAbout = new JMenuItem(showAboutAction);
mnHelp.add(mntmAbout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment