MOA 12.03
Real Time Analytics for Data Streams
TaskLauncher.java
Go to the documentation of this file.
00001 /*
00002  *    TaskLauncher.java
00003  *    Copyright (C) 2007 University of Waikato, Hamilton, New Zealand
00004  *    @author Richard Kirkby (rkirkby@cs.waikato.ac.nz)
00005  *
00006  *    This program is free software; you can redistribute it and/or modify
00007  *    it under the terms of the GNU General Public License as published by
00008  *    the Free Software Foundation; either version 3 of the License, or
00009  *    (at your option) any later version.
00010  *
00011  *    This program is distributed in the hope that it will be useful,
00012  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *    GNU General Public License for more details.
00015  *
00016  *    You should have received a copy of the GNU General Public License
00017  *    along with this program. If not, see <http://www.gnu.org/licenses/>.
00018  *    
00019  */
00020 package moa.gui;
00021 
00022 import java.awt.BorderLayout;
00023 
00024 import javax.swing.JFrame;
00025 import javax.swing.JPanel;
00026 
00035 public class TaskLauncher extends JPanel {
00036 
00037         private static final long serialVersionUID = 1L;
00038 
00039         protected TaskManagerPanel taskManagerPanel;
00040 
00041         protected PreviewPanel previewPanel;
00042 
00043         public TaskLauncher() {
00044                 this.taskManagerPanel = new TaskManagerPanel();
00045                 this.previewPanel = new PreviewPanel();
00046                 this.taskManagerPanel.setPreviewPanel(this.previewPanel);
00047                 setLayout(new BorderLayout());
00048                 add(this.taskManagerPanel, BorderLayout.NORTH);
00049                 add(this.previewPanel, BorderLayout.CENTER);
00050         }
00051 
00052         private static void createAndShowGUI() {
00053 
00054                 // Create and set up the window.
00055                 JFrame frame = new JFrame("MOA Task Launcher");
00056                 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
00057 
00058                 // Create and set up the content pane.
00059                 JPanel panel = new TaskLauncher();
00060                 panel.setOpaque(true); // content panes must be opaque
00061                 frame.setContentPane(panel);
00062 
00063                 // Display the window.
00064                 frame.pack();
00065                 frame.setSize(640, 480);
00066                 frame.setVisible(true);
00067         }
00068 
00069         public static void main(String[] args) {
00070                 try {
00071                         javax.swing.SwingUtilities.invokeLater(new Runnable() {
00072                                 public void run() {
00073                                         createAndShowGUI();
00074                                 }
00075                         });
00076                 } catch (Exception e) {
00077                         e.printStackTrace();
00078                 }
00079         }
00080 
00081 }
 All Classes Namespaces Files Functions Variables Enumerations