View Javadoc

1   /* OpenLogViewer
2    *
3    * Copyright 2011
4    *
5    * This file is part of the OpenLogViewer project.
6    *
7    * OpenLogViewer software is free software: you can redistribute it and/or modify
8    * it under the terms of the GNU General Public License as published by
9    * the Free Software Foundation, either version 3 of the License, or
10   * (at your option) any later version.
11   *
12   * OpenLogViewer software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   * GNU General Public License for more details.
16   *
17   * You should have received a copy of the GNU General Public License
18   * along with any OpenLogViewer software.  If not, see http://www.gnu.org/licenses/
19   *
20   * I ask that if you make any changes to this file you fork the code on github.com!
21   *
22   */
23  package org.diyefi.openlogviewer;
24  
25  import java.awt.event.ActionEvent;
26  import java.awt.event.ActionListener;
27  import javax.swing.JFrame;
28  import javax.swing.JMenu;
29  import javax.swing.JMenuItem;
30  import javax.swing.JOptionPane;
31  
32  /**
33   *
34   * @author Bryan
35   */
36  public class GraphMenu extends JMenu {
37  
38      private JMenuItem optionPaneItem;
39      private JMenuItem graphMenuSplit;
40  
41      public GraphMenu() {
42          super();
43          initMenu();
44      }
45  
46      private void initMenu() {
47          this.setText("Graphing");
48          this.setName("Graphing Menu");
49  
50  
51          optionPaneItem = new JMenuItem();
52          optionPaneItem.setText("Option Pane");
53          optionPaneItem.setName("Option Pane");
54          optionPaneItem.addActionListener(new ActionListener() {
55  
56              @Override
57              public void actionPerformed(ActionEvent e) {
58                  if (!OpenLogViewerApp.getInstance().getOptionFrame().isVisible()) {
59                      OpenLogViewerApp.getInstance().getOptionFrame().setVisible(true);
60                  }
61                  OpenLogViewerApp.getInstance().getOptionFrame().setAlwaysOnTop(true);
62                  OpenLogViewerApp.getInstance().getOptionFrame().setAlwaysOnTop(false);
63              }
64          });
65          
66         /* graphMenuSplit = new JMenuItem("Set Split View");
67          graphMenuSplit.addActionListener(new ActionListener() {
68              @Override
69              public void actionPerformed(ActionEvent e ) {
70                  OpenLogViewerApp.getInstance().getLayeredGraph().setTotalSplits(Integer.parseInt(JOptionPane.showInputDialog(new JFrame(), "How many splits of the graphing view do you want")));
71              }
72          });
73  
74  
75          this.add(graphMenuSplit);*/
76          this.add(optionPaneItem);
77  
78      }
79  }
80  /**
81   * 2/5/2011 meal for the night DO NOT EDIT MENU!
82   * Sesame chicken alacarte
83   * chicken lomein alacarte
84   * orange chicken x2
85   * 
86   */