org.rosuda.ibase.toolkit
Class EzMenuSwing

java.lang.Object
  extended by org.rosuda.ibase.toolkit.EzMenuSwing

public class EzMenuSwing
extends java.lang.Object

class that simplified JMenu building from lists


Field Summary
static boolean hasSVG
           
static boolean staticInitDone
           
 
Constructor Summary
EzMenuSwing()
           
 
Method Summary
static void addJMenuItem(javax.swing.JFrame f, java.lang.String menu, java.lang.String name, java.lang.String command, java.awt.event.ActionListener al)
          Add JMenuItem to existing menu.
static void addMenu(javax.swing.JFrame f, java.lang.String name)
          Add JMenu to existing menubar.
static void addMenuSeparator(javax.swing.JFrame f, java.lang.String menu)
          Add a menuseparator to existing menu.
static javax.swing.JMenuBar getEzMenu(javax.swing.JFrame f, java.awt.event.ActionListener al, java.lang.String[] menuDef)
           
static javax.swing.JPopupMenu getEzPopup(javax.swing.JFrame f, java.awt.event.ActionListener al, java.lang.String[] popDef)
           
static javax.swing.JMenuItem getItem(javax.swing.JFrame f, java.lang.String nam)
           
static javax.swing.JMenuItem getItemByLabel(javax.swing.JFrame f, java.lang.String nam)
           
static javax.swing.JMenu getMenu(javax.swing.JFrame f, java.lang.String nam)
           
static void insertJMenuItem(javax.swing.JFrame f, java.lang.String menu, java.lang.String name, java.lang.String command, java.awt.event.ActionListener al, int index)
          Insert JMenuItem to existing menu.
static void insertMenu(javax.swing.JFrame f, java.lang.String name, int index)
          Add JMenu to existing menubar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

staticInitDone

public static boolean staticInitDone

hasSVG

public static boolean hasSVG
Constructor Detail

EzMenuSwing

public EzMenuSwing()
Method Detail

getEzPopup

public static javax.swing.JPopupMenu getEzPopup(javax.swing.JFrame f,
                                                java.awt.event.ActionListener al,
                                                java.lang.String[] popDef)

getEzMenu

public static javax.swing.JMenuBar getEzMenu(javax.swing.JFrame f,
                                             java.awt.event.ActionListener al,
                                             java.lang.String[] menuDef)

getMenu

public static javax.swing.JMenu getMenu(javax.swing.JFrame f,
                                        java.lang.String nam)

getItem

public static javax.swing.JMenuItem getItem(javax.swing.JFrame f,
                                            java.lang.String nam)

getItemByLabel

public static javax.swing.JMenuItem getItemByLabel(javax.swing.JFrame f,
                                                   java.lang.String nam)

addMenu

public static void addMenu(javax.swing.JFrame f,
                           java.lang.String name)
Add JMenu to existing menubar.

Parameters:
f - JFrame where to add menu.
name - menuname

insertMenu

public static void insertMenu(javax.swing.JFrame f,
                              java.lang.String name,
                              int index)
Add JMenu to existing menubar.

Parameters:
f - JFrame where to add menu.
name - menu name
index - position

addJMenuItem

public static void addJMenuItem(javax.swing.JFrame f,
                                java.lang.String menu,
                                java.lang.String name,
                                java.lang.String command,
                                java.awt.event.ActionListener al)
Add JMenuItem to existing menu.

Parameters:
f - JFrame which contains menu
menu - JMenu where to add new item
name - name of new item
command - ActionCommand of this new item
al - ActionListener which should be attached to this JMenuItem

insertJMenuItem

public static void insertJMenuItem(javax.swing.JFrame f,
                                   java.lang.String menu,
                                   java.lang.String name,
                                   java.lang.String command,
                                   java.awt.event.ActionListener al,
                                   int index)
Insert JMenuItem to existing menu.

Parameters:
f - JFrame which contains menu
menu - JMenu where to add new item
name - name of new item
command - ActionCommand of this new item
al - ActionListener which should be attached to this JMenuItem
index - Position of insertion

addMenuSeparator

public static void addMenuSeparator(javax.swing.JFrame f,
                                    java.lang.String menu)
Add a menuseparator to existing menu.

Parameters:
f - JFrame which contains menu
menu - JMenu where to ad separator