public abstract class EditorHeaderToggleAction extends CheckboxAction implements DumbAware, LightEditCompatible
AnAction.TransparentUpdate
ACTIONS_KEY, EMPTY_ARRAY
ACTION_KEY, COMPONENT_KEY
SELECTED_PROPERTY
Modifier | Constructor and Description |
---|---|
protected |
EditorHeaderToggleAction(java.lang.String text) |
protected |
EditorHeaderToggleAction(java.lang.String text,
javax.swing.Icon icon,
javax.swing.Icon hoveredIcon,
javax.swing.Icon selectedIcon) |
Modifier and Type | Method and Description |
---|---|
javax.swing.JComponent |
createCustomComponent(Presentation presentation,
java.lang.String place) |
boolean |
displayTextInToolbar()
Override with true returned if your action has to display its text along with the icon when placed in the toolbar
|
boolean |
isSelected(AnActionEvent e)
Returns the selected (checked, pressed) state of the action.
|
protected abstract boolean |
isSelected(SearchSession session) |
void |
setSelected(AnActionEvent e,
boolean selected)
Sets the selected state of the action to the specified value.
|
protected abstract void |
setSelected(SearchSession session,
boolean selected) |
update, updateCustomComponent
actionPerformed
addTextOverride, applyTextOverride, beforeActionPerformedUpdate, copyFrom, copyShortcutFrom, getEventProject, getShortcutSet, getTemplatePresentation, getTemplateText, isDefaultIcon, isEnabledInModalContext, isInInjectedContext, isTransparentUpdate, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, setDefaultIcon, setEnabledInModalContext, setInjectedContext, setShortcutSet, startInTransaction, toString, unregisterCustomShortcutSet, useSmallerFontForTextInToolbar
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createCustomComponent
isSelected, setSelected
isDumbAware
protected EditorHeaderToggleAction(java.lang.String text)
protected EditorHeaderToggleAction(java.lang.String text, javax.swing.Icon icon, javax.swing.Icon hoveredIcon, javax.swing.Icon selectedIcon)
public boolean displayTextInToolbar()
AnAction
displayTextInToolbar
in class AnAction
public javax.swing.JComponent createCustomComponent(Presentation presentation, java.lang.String place)
createCustomComponent
in interface CustomComponentAction
createCustomComponent
in class CheckboxAction
CustomComponentAction.COMPONENT_KEY
to retrieve current component from a Presentation instance in AnAction.update(AnActionEvent)
method.public boolean isSelected(AnActionEvent e)
ToggleAction
isSelected
in class ToggleAction
e
- the action event representing the place and context in which the selected state is queried.public void setSelected(AnActionEvent e, boolean selected)
ToggleAction
setSelected
in class ToggleAction
e
- the action event which caused the state change.selected
- the new selected state of the action.protected abstract boolean isSelected(SearchSession session)
protected abstract void setSelected(SearchSession session, boolean selected)