| XJMenu.java |
1 /*
2 * Copyright (c) 1998-2004, The University of Sheffield.
3 *
4 * This file is part of GATE (see http://gate.ac.uk/), and is free
5 * software, licenced under the GNU Library General Public License,
6 * Version 2, June 1991 (in the distribution as file licence.html,
7 * and also available at http://gate.ac.uk/gate/licence.html).
8 *
9 * Valentin Tablan 20 Feb 2003
10 *
11 * $Id: XJMenu.java,v 1.3 2004/07/21 17:10:09 akshay Exp $
12 */
13
14 package gate.swing;
15
16 import javax.swing.Action;
17 import javax.swing.JMenu;
18
19 /**
20 * A modified version of JMenu that uses {@link MenuLayout} as its layout.
21 */
22 public class XJMenu extends JMenu {
23 public XJMenu(){
24 super();
25 getPopupMenu().setLayout(new MenuLayout());
26 }
27
28 public XJMenu(Action a){
29 super(a);
30 getPopupMenu().setLayout(new MenuLayout());
31 }
32
33 public XJMenu(String s){
34 super(s);
35 getPopupMenu().setLayout(new MenuLayout());
36 }
37
38 public XJMenu(String s, boolean b){
39 super(s, b);
40 getPopupMenu().setLayout(new MenuLayout());
41 }
42 }