public abstract class ActionGroup extends AnAction
AnAction.TransparentUpdate
Modifier and Type | Field and Description |
---|---|
static ActionGroup |
EMPTY_GROUP |
ACTIONS_KEY, EMPTY_ARRAY
Constructor and Description |
---|
ActionGroup()
Creates a new
ActionGroup with shortName set to null and
popup set to false . |
ActionGroup(java.lang.String shortName,
boolean popup)
Creates a new
ActionGroup with the specified shortName
and popup. |
ActionGroup(java.lang.String text,
java.lang.String description,
javax.swing.Icon icon) |
ActionGroup(java.util.function.Supplier<java.lang.String> shortName,
boolean popup) |
ActionGroup(java.util.function.Supplier<java.lang.String> dynamicText,
java.util.function.Supplier<java.lang.String> dynamicDescription,
javax.swing.Icon icon) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(AnActionEvent e)
This method can be called in popup menus if
canBePerformed(DataContext) is true . |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l) |
boolean |
canBePerformed(DataContext context) |
boolean |
disableIfNoVisibleChildren() |
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue) |
abstract AnAction [] |
getChildren(AnActionEvent e)
Returns the children of the group.
|
AnAction [] |
getChildren(AnActionEvent e,
ActionManager actionManager) |
boolean |
hideIfNoVisibleChildren() |
boolean |
isDumbAware() |
boolean |
isPopup()
Returns the type of the group.
|
boolean |
isPopup(java.lang.String place) |
boolean |
isPrimary(AnAction action) |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l) |
protected void |
replace(AnAction originalAction,
AnAction newAction) |
void |
setPopup(boolean popup)
Sets the type of the group.
|
addTextOverride, applyTextOverride, beforeActionPerformedUpdate, copyFrom, copyShortcutFrom, displayTextInToolbar, getEventProject, getShortcutSet, getTemplatePresentation, getTemplateText, isDefaultIcon, isEnabledInModalContext, isInInjectedContext, isTransparentUpdate, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, setDefaultIcon, setEnabledInModalContext, setInjectedContext, setShortcutSet, startInTransaction, toString, unregisterCustomShortcutSet, update, useSmallerFontForTextInToolbar
public static final ActionGroup EMPTY_GROUP
public ActionGroup()
ActionGroup
with shortName set to null
and
popup set to false
.public ActionGroup(java.lang.String shortName, boolean popup)
ActionGroup
with the specified shortName
and popup.shortName
- Text that represents a short name for this action grouppopup
- true
if this group is a popup, false
otherwisepublic ActionGroup(java.util.function.Supplier<java.lang.String> shortName, boolean popup)
public ActionGroup(java.lang.String text, java.lang.String description, javax.swing.Icon icon)
public ActionGroup(java.util.function.Supplier<java.lang.String> dynamicText, java.util.function.Supplier<java.lang.String> dynamicDescription, javax.swing.Icon icon)
public void actionPerformed(AnActionEvent e)
canBePerformed(DataContext)
is true
.actionPerformed
in class AnAction
e
- Carries information on the invocation placepublic boolean canBePerformed(DataContext context)
true
if actionPerformed(AnActionEvent)
should be called.public boolean isPopup()
true
if the group is a popup, false
otherwisepublic boolean isPopup(java.lang.String place)
public final void setPopup(boolean popup)
popup
- If true
the group will be shown as a popup in menus.public final void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public final void removePropertyChangeListener(java.beans.PropertyChangeListener l)
protected final void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
public abstract AnAction [] getChildren(AnActionEvent e)
null
.public AnAction [] getChildren(AnActionEvent e, ActionManager actionManager)
public final boolean isPrimary(AnAction action)
public boolean isDumbAware()
public boolean hideIfNoVisibleChildren()
public boolean disableIfNoVisibleChildren()