View Javadoc

1   /**
2    * Copyright 2008 WebPhotos
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package net.sf.webphotos.gui;
17  
18  import javax.swing.JMenu;
19  import javax.swing.JMenuBar;
20  import javax.swing.JMenuItem;
21  
22  /**
23   *
24   * @author Guilherme
25   */
26  public class BarraMenu extends JMenuBar {
27  
28      /**
29       *
30       */
31      public BarraMenu() {
32  
33          JMenu mnArquivo = new JMenu("Arquivo");
34          JMenu mnEditar = new JMenu("Editar");
35          JMenu mnFerramentas = new JMenu("Ferramentas");
36  
37          this.add(mnArquivo);
38          this.add(mnEditar);
39          this.add(mnFerramentas);
40  
41          // Arquivo
42          JMenuItem mnArquivoNovoAlbum = new JMenuItem("novo álbum");
43          JMenuItem mnArquivoSair = new JMenuItem("sair");
44          mnArquivo.add(mnArquivoNovoAlbum);
45          mnArquivo.add(mnArquivoSair);
46  
47          // Editar
48          JMenuItem mnEditarExportarAlbum = new JMenuItem("exportar álbum");
49          JMenuItem mnEditarExcluirAlbum = new JMenuItem("excluir álbum (del)");
50  
51          mnEditar.add(mnEditarExportarAlbum);
52          mnEditar.add(mnEditarExcluirAlbum);
53  
54  
55          // Ferramentas
56          JMenuItem mnFerramentasExportar = new JMenuItem("exportar banco de dados");
57          JMenuItem mnFerramentasTestar = new JMenuItem("testar marca d'agua");
58          JMenuItem mnFerramentasFTP = new JMenuItem("testar conexão FTP");
59          mnFerramentas.add(mnFerramentasExportar);
60          mnFerramentas.add(mnFerramentasTestar);
61          mnFerramentas.add(mnFerramentasFTP);
62      }
63  }