public class ActionButton extends javax.swing.JComponent implements ActionButtonComponent, AnActionHolder, javax.accessibility.Accessible
Modifier and Type | Class and Description |
---|---|
protected class |
ActionButton.AccessibleActionButton |
javax.swing.JComponent.AccessibleJComponent
java.awt.Container.AccessibleAWTContainer
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
ActionButtonComponent.ButtonState
Modifier and Type | Field and Description |
---|---|
static Key<java.lang.Boolean> |
HIDE_DROPDOWN_ICON
By default button representing popup action group displays 'dropdown' icon.
|
protected AnAction |
myAction |
protected java.lang.String |
myPlace |
protected Presentation |
myPresentation |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
NORMAL, POPPED, PUSHED, SELECTED
Constructor and Description |
---|
ActionButton(AnAction action,
Presentation presentation,
java.lang.String place,
java.awt.Dimension minimumSize) |
Modifier and Type | Method and Description |
---|---|
protected void |
actionPerformed(AnActionEvent event) |
void |
addNotify() |
void |
click() |
javax.accessibility.AccessibleContext |
getAccessibleContext() |
AnAction |
getAction() |
protected ActionButtonLook |
getButtonLook() |
protected DataContext |
getDataContext() |
protected javax.swing.Icon |
getFallbackIcon(boolean enabled) |
javax.swing.Icon |
getIcon() |
java.awt.Insets |
getInsets() |
java.awt.Dimension |
getMinimumSize() |
int |
getPopState() |
java.awt.Dimension |
getPreferredSize() |
protected java.lang.String |
getShortcutText() |
boolean |
isEnabled() |
protected boolean |
isRollover() |
boolean |
isSelected() |
protected void |
jComponentPaint(java.awt.Graphics g) |
protected void |
onMousePressed(java.awt.event.MouseEvent e) |
protected void |
onMouseReleased(java.awt.event.MouseEvent e) |
protected void |
paintButtonLook(java.awt.Graphics g) |
void |
paintChildren(java.awt.Graphics g) |
void |
paintComponent(java.awt.Graphics g) |
protected void |
presentationPropertyChanged(java.beans.PropertyChangeEvent e) |
protected void |
processMouseEvent(java.awt.event.MouseEvent e) |
void |
removeNotify() |
void |
setIconInsets(java.awt.Insets insets) |
void |
setLook(ActionButtonLook look) |
void |
setMinimumButtonSize(java.awt.Dimension size) |
void |
setNoIconsInPopup(boolean noIconsInPopup) |
void |
setToolTipText(java.lang.String toolTipText) |
protected boolean |
shallPaintDownArrow() |
protected void |
showPopupMenu(AnActionEvent event,
ActionGroup actionGroup) |
void |
update() |
void |
updateIcon() |
protected void |
updateToolTipText() |
void |
updateUI() |
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getHeight, getWidth
public static final Key<java.lang.Boolean> HIDE_DROPDOWN_ICON
presentation.putClientProperty(ActionButton.HIDE_DROPDOWN_ICON, Boolean.TRUE)
protected final Presentation myPresentation
protected final AnAction myAction
protected final java.lang.String myPlace
public ActionButton(AnAction action, Presentation presentation, java.lang.String place, java.awt.Dimension minimumSize)
public void setNoIconsInPopup(boolean noIconsInPopup)
public void setMinimumButtonSize(java.awt.Dimension size)
public void paintChildren(java.awt.Graphics g)
paintChildren
in class javax.swing.JComponent
public int getPopState()
getPopState
in interface ActionButtonComponent
protected final boolean isRollover()
public final boolean isSelected()
public boolean isEnabled()
isEnabled
in class java.awt.Component
public void click()
protected DataContext getDataContext()
protected void actionPerformed(AnActionEvent event)
protected void showPopupMenu(AnActionEvent event, ActionGroup actionGroup)
public void removeNotify()
removeNotify
in class javax.swing.JComponent
public void addNotify()
addNotify
in class javax.swing.JComponent
public void update()
public void setToolTipText(java.lang.String toolTipText)
setToolTipText
in class javax.swing.JComponent
public java.awt.Insets getInsets()
getInsets
in class javax.swing.JComponent
public void updateUI()
updateUI
in class javax.swing.JComponent
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public void setIconInsets(java.awt.Insets insets)
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public javax.swing.Icon getIcon()
null
then it returns
an empty icon.protected javax.swing.Icon getFallbackIcon(boolean enabled)
public void updateIcon()
protected void updateToolTipText()
protected java.lang.String getShortcutText()
public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
protected void jComponentPaint(java.awt.Graphics g)
protected boolean shallPaintDownArrow()
protected void paintButtonLook(java.awt.Graphics g)
protected ActionButtonLook getButtonLook()
public void setLook(ActionButtonLook look)
protected void processMouseEvent(java.awt.event.MouseEvent e)
processMouseEvent
in class javax.swing.JComponent
protected void onMouseReleased(java.awt.event.MouseEvent e)
protected void onMousePressed(java.awt.event.MouseEvent e)
public AnAction getAction()
getAction
in interface AnActionHolder
protected void presentationPropertyChanged(java.beans.PropertyChangeEvent e)
public javax.accessibility.AccessibleContext getAccessibleContext()
getAccessibleContext
in interface javax.accessibility.Accessible
getAccessibleContext
in class java.awt.Component