ActionSvc.I Interface
- public static interface ActionSvc.I
-
Enclosing class
-
ActionSvc
createProxy(IAction) Method
public IActionProxy
createProxy(IAction
action)
Obtains a proxy for an action that was not created by the ActionSvc. This proxy can then be used to create
menu items, toolbar buttons or in other methods that require proxy objects.
Parameters
-
action
- Action for the proxy to be created.
Returns
- An IActionProxy implementation that can be used to represent the given action in UI.
createProxy(IAction, String) Method
public IActionProxy
createProxy(IAction
action,
String
sLabel)
Obtains a proxy for an action that was not created by the ActionSvc. This proxy can then be used to create
menu items, toolbar buttons or in other methods that require proxy objects.
Parameters
-
action
- Action for the proxy to be created.
-
sLabel
- The action's label as used in menus and other parts of the UI.
Returns
- An IActionProxy implementation that can be used to represent the given action in the UI.
createProxy(IAction, String, Icon, String) Method
public IActionProxy
createProxy(IAction
action,
String
sLabel,
Icon
icon,
String
sTooltip)
Obtains a proxy for an action that was not created by the ActionSvc. This proxy can then be used to create
menu items, toolbar buttons or in other methods that require proxy objects.
Parameters
-
action
- Action for the proxy to be created.
-
sLabel
- The action's label as used in menus and other parts of the UI.
-
icon
- An icon to display for the action in menus and toolbars.
-
sTooltip
- The action's tooltip.
Returns
- An IActionProxy implementation that can be used to represent the given action in UI.
getAction(String) Method
public IActionProxy
getAction(String
className)
Obtains the action interface associated with the given class name. Use this method to obtain
an instance of an action that is defined by an extension. Callers of this method should be prepared
for it to return null if the extension is not installed or the action does not exist.
Parameters
-
className
- Fully-qualified class name for the action desired.
Returns
- An object implementing the
IAction
interface that has the specified class name;
null if no object is available that matches that criteria.
refreshGenerator(String) Method
public void refreshGenerator(String
sClass)
Refreshes the state of all action UI associated with the given generator class. This will force the generator
to be called the next time the menu associated with this generator is displayed.
Parameters
-
sClass
- Generator class whose dependent menus should be recomputed.
refreshUI() Method
public void refreshUI()
Refreshes the state of all action UI based on the current state of the IDE. Use this to force menu and
toolbars to update for a change that the IDE does not recognize as a change that effects menus, and
for which there is no event that can trigger the menu item to refresh. This can be expensive, so it should
generally be avoided in favor of the refreshGenerator
method.
showPopupMenu(String, Component, int, int) Method
public boolean showPopupMenu(String
strID,
Component
c,
int x,
int y)
Displays the popup menu corresponding to the given id. This popup should have been declared
in extension the XML file.
Parameters
-
strID
- String that identifies the name of the popup to display.
-
c
- Component to display the popup in.
-
x
- X-coordinate at which to display the popup.
-
y
- Y-coordinate at which to display the popup.
Returns
true
if the popup was successfully displayed; otherwise, false
.
showPopupMenu(String, IPopupContext) Method
public boolean showPopupMenu(String
strID,
IPopupContext
pc)
Displays the popup menu corresponding to the given id. This popup should have been declared
in extension xml.
Parameters
-
strID
- The name of the popup to display.
-
pc
- The popup context to associate with this popup.
Returns
true
if the popup was successfully displayed; otherwise, false
.