![JAR search and dependency download from the Maven repository](/logo.png)
gov.nih.nlm.nls.lvg.Tools.GuiTool.GuiLib.LibMenu Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lvg2010dist Show documentation
Show all versions of lvg2010dist Show documentation
LVG tools is used by Apache cTAKES.
The newest version!
package GuiTool.GuiLib;
import javax.swing.*;
public class LibMenu
{
private LibMenu()
{
}
// public methods
public static JMenu MakeMenu(Object parent, Object[] items, Object target)
{
JMenu m = null;
if(parent instanceof JMenu)
{
m = (JMenu) parent;
}
else if(parent instanceof String)
{
m = new JMenu((String) parent);
}
else
{
return null;
}
for(int i = 0; i < items.length; i++)
{
if(items[i] == null) // add a separator if input is null
{
m.addSeparator();
}
else
{
m.add(LibPopupMenu.MakeMenuItem(items[i], target));
}
}
return m;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy