Display pipeline in main window.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 27 May 2013 14:06:49 +0000 (16:06 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 27 May 2013 20:56:27 +0000 (22:56 +0200)
src/main/java/net/pterodactylus/sonitus/gui/MainWindow.java

index 842ce80..3077950 100644 (file)
@@ -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));