Class FeatureInstaller
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.plugin.FeatureInstaller
-
public class FeatureInstaller extends Object
Adds a plug-in to the JUMP Workbench as a menu item.
-
-
Constructor Summary
Constructors Constructor Description FeatureInstaller(WorkbenchContext workbenchContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addLayerNameViewMenuItem(PlugIn executable, String[] menuPath, String menuItemName)
Add a menu item to the main menu that is enabled only if the active internal frame is a LayerViewPanelProxy and a LayerNamePanelProxy.void
addLayerNameViewMenuItem(PlugIn executable, String menuName, String menuItemName)
void
addLayerViewMenuItem(PlugIn executable, String[] menuPath, String menuItemName)
Add a menu item to the main menu that is enabled only if the active internal frame is a LayerViewPanelProxy.void
addLayerViewMenuItem(PlugIn executable, String menuName, String menuItemName)
void
addMainMenuItem(PlugIn executable, String[] menuPath, String menuItemName, boolean checkBox, Icon icon, EnableCheck enableCheck)
void
addMainMenuItem(PlugIn executable, String menuName, String menuItemName, Icon icon, EnableCheck enableCheck)
void
addMenuItemShownListener(JMenuItem menuItem, MenuItemShownListener menuItemShownListener)
void
addMenuSeparator(String menu)
void
addMenuSeparator(String[] menuPath)
void
addMenuSeparator(JMenu menu)
void
addPopupMenuItem(JPopupMenu popupMenu, PlugIn executable, String menuItemName, boolean checkBox, Icon icon, EnableCheck enableCheck)
static JMenuItem
childMenuItem(String childName, MenuElement menu)
MultiEnableCheck
createFenceExistsCheck()
Deprecated.Use the EnableCheckFactory methods insteadMultiEnableCheck
createLayersSelectedCheck()
Deprecated.Use the EnableCheckFactory methods insteadMultiEnableCheck
createOneLayerSelectedCheck()
Deprecated.Use the EnableCheckFactory methods insteadMultiEnableCheck
createVectorsExistCheck()
Deprecated.Use the EnableCheckFactory methods insteadstatic JMenuItem
installMnemonic(JMenuItem menuItem, MenuElement parent)
JMenuBar
menuBar()
JMenu
menuBarMenu(String childName)
-
-
-
Constructor Detail
-
FeatureInstaller
public FeatureInstaller(WorkbenchContext workbenchContext)
-
-
Method Detail
-
createLayersSelectedCheck
public MultiEnableCheck createLayersSelectedCheck()
Deprecated.Use the EnableCheckFactory methods instead
-
createOneLayerSelectedCheck
public MultiEnableCheck createOneLayerSelectedCheck()
Deprecated.Use the EnableCheckFactory methods instead
-
createVectorsExistCheck
public MultiEnableCheck createVectorsExistCheck()
Deprecated.Use the EnableCheckFactory methods instead
-
createFenceExistsCheck
public MultiEnableCheck createFenceExistsCheck()
Deprecated.Use the EnableCheckFactory methods instead
-
addMenuSeparator
public void addMenuSeparator(String menu)
-
addMenuSeparator
public void addMenuSeparator(String[] menuPath)
-
addMenuSeparator
public void addMenuSeparator(JMenu menu)
-
addMainMenuItem
public void addMainMenuItem(PlugIn executable, String menuName, String menuItemName, Icon icon, EnableCheck enableCheck)
-
addLayerViewMenuItem
public void addLayerViewMenuItem(PlugIn executable, String menuName, String menuItemName)
-
addLayerNameViewMenuItem
public void addLayerNameViewMenuItem(PlugIn executable, String menuName, String menuItemName)
-
addLayerViewMenuItem
public void addLayerViewMenuItem(PlugIn executable, String[] menuPath, String menuItemName)
Add a menu item to the main menu that is enabled only if the active internal frame is a LayerViewPanelProxy.
-
addLayerNameViewMenuItem
public void addLayerNameViewMenuItem(PlugIn executable, String[] menuPath, String menuItemName)
Add a menu item to the main menu that is enabled only if the active internal frame is a LayerViewPanelProxy and a LayerNamePanelProxy.
-
addMainMenuItem
public void addMainMenuItem(PlugIn executable, String[] menuPath, String menuItemName, boolean checkBox, Icon icon, EnableCheck enableCheck)
- Parameters:
menuPath
- separate items with slashes; items will be created if they do not already existmenuActionListener
- listener for the menu (not the menu item); useful for setting the menu item's enabled state; can be set to nullcheckBox
- whether to create a JCheckBoxMenuItem or a JMenuItem- See Also:
GUIUtil#toSmallIcon
-
installMnemonic
public static JMenuItem installMnemonic(JMenuItem menuItem, MenuElement parent)
-
addMenuItemShownListener
public void addMenuItemShownListener(JMenuItem menuItem, MenuItemShownListener menuItemShownListener)
-
addPopupMenuItem
public void addPopupMenuItem(JPopupMenu popupMenu, PlugIn executable, String menuItemName, boolean checkBox, Icon icon, EnableCheck enableCheck)
- Parameters:
enableCheck
- null to leave unspecified
-
menuBar
public JMenuBar menuBar()
-
menuBarMenu
public JMenu menuBarMenu(String childName)
- Returns:
- the menu with the given name, or null if no such menu exists
-
childMenuItem
public static JMenuItem childMenuItem(String childName, MenuElement menu)
-
-