Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 5d458d3e authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

Made JSON info panel resizeable in "OnlineVisualisationWindow" and "PostvisualizationWindow"

parent ae1a4492
Pipeline #163993 passed with stages
in 123 minutes and 15 seconds
...@@ -3,11 +3,7 @@ package org.vadere.gui.onlinevisualization.view; ...@@ -3,11 +3,7 @@ package org.vadere.gui.onlinevisualization.view;
import com.jgoodies.forms.layout.CellConstraints; import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout; import com.jgoodies.forms.layout.FormLayout;
import org.apache.commons.configuration2.Configuration; import org.apache.commons.configuration2.Configuration;
import org.vadere.gui.components.control.ActionGeneratePoly; import org.vadere.gui.components.control.*;
import org.vadere.gui.components.control.IViewportChangeListener;
import org.vadere.gui.components.control.JViewportChangeListener;
import org.vadere.gui.components.control.PanelResizeListener;
import org.vadere.gui.components.control.ViewportChangeListener;
import org.vadere.gui.components.control.simulation.*; import org.vadere.gui.components.control.simulation.*;
import org.vadere.gui.components.utils.Messages; import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.components.utils.Resources; import org.vadere.gui.components.utils.Resources;
...@@ -240,10 +236,16 @@ public class OnlineVisualisationWindow extends JPanel implements Observer { ...@@ -240,10 +236,16 @@ public class OnlineVisualisationWindow extends JPanel implements Observer {
SwingUtils.addActionToToolbar(toolbar, openSettingsDialog, SwingUtils.addActionToToolbar(toolbar, openSettingsDialog,
Messages.getString("ProjectView.btnSettings.tooltip")); Messages.getString("ProjectView.btnSettings.tooltip"));
add(toolbar, cc.xyw(2, 2, 3)); JSplitPane splitPaneForTopographyAndJsonPane = new JSplitPane();
add(scrollPane, cc.xy(2, 4)); splitPaneForTopographyAndJsonPane.setResizeWeight(0.8);
splitPaneForTopographyAndJsonPane.resetToPreferredSizes();
splitPaneForTopographyAndJsonPane.setLeftComponent(scrollPane);
splitPaneForTopographyAndJsonPane.setRightComponent(jsonPanel);
scrollPane.setPreferredSize(new Dimension(1, windowHeight)); scrollPane.setPreferredSize(new Dimension(1, windowHeight));
add(jsonPanel, cc.xy(4, 4));
add(toolbar, cc.xyw(2, 2, 3));
add(splitPaneForTopographyAndJsonPane, cc.xywh(2, 4, 4, 1));
add(infoPanel, cc.xyw(2, 6, 3)); add(infoPanel, cc.xyw(2, 6, 3));
repaint(); repaint();
......
...@@ -4,16 +4,8 @@ import com.jgoodies.forms.layout.CellConstraints; ...@@ -4,16 +4,8 @@ import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout; import com.jgoodies.forms.layout.FormLayout;
import org.apache.commons.configuration2.Configuration; import org.apache.commons.configuration2.Configuration;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.vadere.gui.components.control.IViewportChangeListener; import org.vadere.gui.components.control.*;
import org.vadere.gui.components.control.JViewportChangeListener; import org.vadere.gui.components.control.simulation.*;
import org.vadere.gui.components.control.PanelResizeListener;
import org.vadere.gui.components.control.ViewportChangeListener;
import org.vadere.gui.components.control.simulation.ActionGeneratePNG;
import org.vadere.gui.components.control.ActionGeneratePoly;
import org.vadere.gui.components.control.simulation.ActionGenerateSVG;
import org.vadere.gui.components.control.simulation.ActionGenerateTikz;
import org.vadere.gui.components.control.simulation.ActionSwapSelectionMode;
import org.vadere.gui.components.control.simulation.ActionVisualization;
import org.vadere.gui.components.model.IDefaultModel; import org.vadere.gui.components.model.IDefaultModel;
import org.vadere.gui.components.utils.Messages; import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.components.utils.Resources; import org.vadere.gui.components.utils.Resources;
...@@ -115,20 +107,28 @@ public class PostvisualizationWindow extends JPanel implements Observer, DropTar ...@@ -115,20 +107,28 @@ public class PostvisualizationWindow extends JPanel implements Observer, DropTar
if (CONFIG.getBoolean("PostVis.enableJsonInformationPanel")) { if (CONFIG.getBoolean("PostVis.enableJsonInformationPanel")) {
layout = new FormLayout("2dlu, default:grow(0.75), 2dlu, default:grow(0.25), 2dlu", // col layout = new FormLayout("2dlu, default:grow(0.75), 2dlu, default:grow(0.25), 2dlu", // col
"2dlu, default, 2dlu, default, 2dlu, default, 2dlu"); // rows "2dlu, default, 2dlu, default, 2dlu, default, 2dlu"); // rows
setLayout(layout);
textView = new ScenarioElementView(model); textView = new ScenarioElementView(model);
textView.setEditable(false); textView.setEditable(false);
textView.setPreferredSize(new Dimension(1, windowHeight)); textView.setPreferredSize(new Dimension(1, windowHeight));
setLayout(layout);
add(toolbar, cc.xyw(2, 2, 4)); JSplitPane splitPaneForTopographyAndJsonPane = new JSplitPane();
add(scrollPane, cc.xy(2, 4)); splitPaneForTopographyAndJsonPane.setResizeWeight(0.8);
splitPaneForTopographyAndJsonPane.resetToPreferredSizes();
splitPaneForTopographyAndJsonPane.setLeftComponent(scrollPane);
splitPaneForTopographyAndJsonPane.setRightComponent(textView);
add(toolbar, cc.xyw(2, 2, 3));
add(splitPaneForTopographyAndJsonPane, cc.xywh(2, 4, 4, 1));
add(adjustPanel, cc.xyw(2, 6, 4)); add(adjustPanel, cc.xyw(2, 6, 4));
add(textView, cc.xy(4, 4));
// model.addObserver(textView);
} else { } else {
layout = new FormLayout("2dlu, default:grow, 2dlu", // col layout = new FormLayout("2dlu, default:grow, 2dlu", // col
"2dlu, default, 2dlu, default, 2dlu, default, 2dlu"); // rows "2dlu, default, 2dlu, default, 2dlu, default, 2dlu"); // rows
textView = null;
setLayout(layout); setLayout(layout);
textView = null;
add(toolbar, cc.xy(2, 2)); add(toolbar, cc.xy(2, 2));
add(scrollPane, cc.xy(2, 4)); add(scrollPane, cc.xy(2, 4));
add(adjustPanel, cc.xy(2, 6)); add(adjustPanel, cc.xy(2, 6));
......
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