Commit a53ed447 authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Fixed Scrollbars in VisualizationTopologyView

parent d4d15a30
......@@ -136,6 +136,9 @@ public class VisualizationTopologyView extends JFrame implements TopologyView,
VisualizationInjector.setVariables(this, visManager, worldPanel,
WORLD_X, WORLD_Y);
worldPanel.setPreferredSize(
new Dimension(VisualizationInjector.getWorldX(),
VisualizationInjector.getWorldY()));
this.setPreferredSize(new Dimension(800, 600));
Thread t = new Thread(this);
t.start();
......@@ -152,8 +155,8 @@ public class VisualizationTopologyView extends JFrame implements TopologyView,
* World-view
*/
JScrollPane mapScrollPanel = new JScrollPane(worldPanel,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
mapScrollPanel.getVerticalScrollBar().setUnitIncrement(50);
mapScrollPanel.getHorizontalScrollBar().setUnitIncrement(50);
mapScrollPanel.setBackground(Color.DARK_GRAY);
......@@ -312,9 +315,6 @@ public class VisualizationTopologyView extends JFrame implements TopologyView,
public WorldPanel() {
this.setLayout(null);
this.setPreferredSize(
new Dimension(VisualizationInjector.getWorldX(),
VisualizationInjector.getWorldY()));
}
@Override
......
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