From 2f8bbcf8e8ea4779c5e8ced8e4221ab58e790b93 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 27 May 2013 16:06:49 +0200 Subject: [PATCH] Display pipeline in main window. --- src/main/java/net/pterodactylus/sonitus/gui/MainWindow.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sonitus/gui/MainWindow.java b/src/main/java/net/pterodactylus/sonitus/gui/MainWindow.java index 842ce80..3077950 100644 --- a/src/main/java/net/pterodactylus/sonitus/gui/MainWindow.java +++ b/src/main/java/net/pterodactylus/sonitus/gui/MainWindow.java @@ -27,6 +27,7 @@ import javax.swing.WindowConstants; import net.pterodactylus.sonitus.data.Controlled; import net.pterodactylus.sonitus.data.Controller; +import net.pterodactylus.sonitus.data.Pipeline; import net.pterodactylus.sonitus.main.Version; import com.google.common.eventbus.EventBus; @@ -41,6 +42,9 @@ public class MainWindow extends JFrame { /** The event bus. */ private final EventBus eventBus; + /** The pipeline to display. */ + private final Pipeline pipeline; + /** The tabbed pane displaying all controlled components. */ private final JTabbedPane tabbedPane = new JTabbedPane(); @@ -49,11 +53,15 @@ public class MainWindow extends JFrame { * * @param eventBus * The event bus + * @param pipeline + * The pipeline to display */ - public MainWindow(EventBus eventBus) { + public MainWindow(EventBus eventBus, Pipeline pipeline) { super(String.format("Sonitus %s", Version.version())); this.eventBus = eventBus; + this.pipeline = pipeline; tabbedPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); + tabbedPane.add("Pipeline", new PipelinePanel(pipeline)); getContentPane().add(tabbedPane, BorderLayout.CENTER); setSize(new Dimension(800, 450)); -- 2.7.4