View Javadoc

1   package org.devaki.nextobjects.ui.menus;
2   /*
3   
4   nextobjects Copyright (C) 2001-2005 Emmanuel Florent
5   
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by the
8   Free Software Foundation; either version 2 of the License, or (at your
9   option) any later version.
10  
11  This program is distributed in the hope that it will
12  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13  of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the GNU General Public License for more details.
15  
16  You should have received a copy of the GNU General Public License along
17  with this program; if not, write to the Free Software Foundation, Inc., 59
18  Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  
20  */
21  /***
22   * This class calls the differents popup's menu
23   */
24  public final class MenuFactory
25  {
26      /*** editor popup menu */
27      private static EditorPopupMenu editorPopupMenu = new EditorPopupMenu();
28      /*** model popup menu */
29      private static ModelPopupMenu modelPopupMenu = new ModelPopupMenu();
30      /*** tree popup menu */
31      private static TreePopupMenu treePopupMenu = new TreePopupMenu();
32      /***
33       * Constructor forbid instanciation
34       */
35      private MenuFactory()
36      {
37      }
38      /***
39       * Get the 'ModelPopupMenu' object
40       * @return a ModelPopupMenu
41       */
42      public static ModelPopupMenu getModelPopupMenu()
43      {
44          return modelPopupMenu;
45      }
46      /***
47       * Get a reference to the menu
48       * @return the editor popup menu
49       */
50      public static EditorPopupMenu getEditorPopupMenu()
51      {
52          return editorPopupMenu;
53      }
54  
55      /***
56       * Get a reference to the menu
57       * @return the tree popup menu
58       */
59      public static TreePopupMenu getTreePopupMenu()
60      {
61          return treePopupMenu;
62      }
63  
64  }