DataPalettePopupFactory Class

com.bea.ide.ui.palette
DataPalettePopupFactory Class

public class DataPalettePopupFactory

    extends Object

A factory class that the data palette uses to create instances of control popup menus for its add button. Can also be used to obtain the list of control actions for a specified project. In either case, instances are cached and flushed when the control list for a particular project changes.


Hierarchy
Object
  DataPalettePopupFactory

Constructor Summary

DataPalettePopupFactory()

 

Method Summary

public static JPopupMenu
createControlPopup(List controls)
Constructs the popup menu for new control instances given a list of controls.
public static JMenuItem
createMenuItem(Object ctrl)
Create a JMenuItem instance from an instance of either an IControlLocator or a DefaultAction.
public static JMenuItem
createMenuItem(DefaultAction action)
Create a JMenuItem instance from an instance of a DefaultAction.
public static synchronized List
getControlMenuActions(IProject project)
Returns the list of control actions for the specified project.
public static synchronized JPopupMenu
getControlPopup(IProject project)
Returns the data palette popup menu for the specified project.
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   

Constructor Detail

DataPalettePopupFactory

public DataPalettePopupFactory()
 

Method Detail

createControlPopup(List) Method

public static JPopupMenu createControlPopup(List controls)
Constructs the popup menu for new control instances given a list of controls. The list of controls may contain either instances of IControlLocator objects or DefaultAction objects.

Returns

A JPopupMenu instance representing the list of controls.

createMenuItem(Object) Method

public static JMenuItem createMenuItem(Object ctrl)
Create a JMenuItem instance from an instance of either an IControlLocator or a DefaultAction. This method exists as a convenience for creating a popup menu for data palette control items.

Parameters

ctrl
the object instance to create the menu item from.

createMenuItem(DefaultAction) Method

public static JMenuItem createMenuItem(DefaultAction action)
Create a JMenuItem instance from an instance of a DefaultAction. This method exists as a convenience for creating a popup menu for data palette control items.

Parameters

action
the object instance to create the menu item from.

getControlMenuActions(IProject) Method

public static synchronized List getControlMenuActions(IProject project)
Returns the list of control actions for the specified project. The list contains IAction instances for all controls that can be created for the project specified.

Returns

The list of actions, can be empty, will not be null.

getControlPopup(IProject) Method

public static synchronized JPopupMenu getControlPopup(IProject project)
Returns the data palette popup menu for the specified project. The popup menu contains items for all controls that can be created for the project specified.

Returns

The JPopupMenu for the project, null otherwise.