|
org.netbeans.modules.projectuiapi/1 1.51.1 8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.spi.project.ui.support.MainProjectSensitiveActions
public class MainProjectSensitiveActions
Factory for creating actions sensitive to the project selected as the main project in the UI.
The precise definition of "selection" will depend on the UI implementation,
but will give preference to a main project compared to ProjectSensitiveActions
.
For example:
Project
or owner of a DataObject
)
if there is exactly one such.
(Currently adjusted to allow for loss of window focus.)
Method Summary | |
---|---|
static Action |
mainProjectCommandAction(String command,
String namePattern,
Icon icon)
Creates an action sensitive to the project currently selected as main in the UI. |
static Action |
mainProjectSensitiveAction(ProjectActionPerformer performer,
String namePattern,
Icon icon)
Creates an action sensitive to the project currently selected as main in the UI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Action mainProjectCommandAction(String command, String namePattern, Icon icon)
command
- the command which should be invoked when the action is
performednamePattern
- a pattern which should be used for determining the action's
name (label). It takes two parameters a la MessageFormat
:
{0}
- number of selected projects (or -1 if a main project is set);
{1}
- name of the first project (if >0).icon
- icon of the action; may be null, in which case the action will
not have an icon
public static Action mainProjectSensitiveAction(ProjectActionPerformer performer, String namePattern, Icon icon)
ProjectActionPerformer.perform(org.netbeans.api.project.Project)
will be called. The ProjectActionPerformer.enable(org.netbeans.api.project.Project)
method will
be consulted when the main project changes to determine whether the
action should or should not be enabled. If no main project is selected the
project parameter in the callback may be null.
performer
- callback class for enabling and performing the actionnamePattern
- a pattern which should be used for determining the action's
name (label). It takes two parameters a la MessageFormat
:
{0}
- number of selected projects (or -1 if a main project is set);
{1}
- name of the first project (if >0).icon
- icon of the action; may be null, in which case the action will
not have an icon
|
org.netbeans.modules.projectuiapi/1 1.51.1 8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |