public class ActionToolbarImpl extends javax.swing.JPanel implements ActionToolbar, QuickActionProvider
| Modifier and Type | Class and Description |
|---|---|
static interface |
ActionToolbarImpl.PopupStateModifier |
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponentjava.awt.Container.AccessibleAWTContainerjava.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategyActionToolbar.LayoutPolicylistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTACTION_TOOLBAR_PROPERTY_KEY, AUTO_LAYOUT_POLICY, DEFAULT_MINIMUM_BUTTON_SIZE, NAVBAR_MINIMUM_BUTTON_SIZE, NOWRAP_LAYOUT_POLICY, WRAP_LAYOUT_POLICYKEY| Constructor and Description |
|---|
ActionToolbarImpl(java.lang.String place,
ActionGroup actionGroup,
boolean horizontal) |
ActionToolbarImpl(java.lang.String place,
ActionGroup actionGroup,
boolean horizontal,
boolean decorateButtons) |
ActionToolbarImpl(java.lang.String place,
ActionGroup actionGroup,
boolean horizontal,
boolean decorateButtons,
boolean updateActionsNow) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotify() |
void |
adjustTheSameSize(boolean value)
If the value is
true then the all button on toolbar are
the same size. |
void |
clearPresentationCache() |
protected ActionButton |
createToolbarButton(AnAction action,
ActionButtonLook look,
java.lang.String place,
Presentation presentation,
java.awt.Dimension minimumSize) |
void |
doLayout() |
ActionGroup |
getActionGroup() |
java.util.List<AnAction> |
getActions() |
java.util.List<AnAction> |
getActions(boolean originalProvider) |
javax.swing.JComponent |
getComponent() |
protected java.awt.Graphics |
getComponentGraphics(java.awt.Graphics graphics) |
protected DataContext |
getDataContext() |
int |
getLayoutPolicy() |
int |
getMaxButtonHeight() |
java.awt.Dimension |
getMinimumSize() |
int |
getOrientation() |
java.lang.String |
getPlace() |
java.awt.Dimension |
getPreferredSize() |
Presentation |
getPresentation(AnAction action) |
ActionButton |
getSecondaryActionsButton() |
protected java.awt.Color |
getSeparatorColor() |
DataContext |
getToolbarDataContext() |
boolean |
hasVisibleActions() |
protected void |
paintComponent(java.awt.Graphics g) |
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent e) |
void |
removeNotify() |
void |
setForceMinimumSize(boolean force)
Forces the minimum size of the toolbar to show all buttons, When set to
true. |
void |
setForceShowFirstComponent(boolean showFirstComponent)
By default minimum size is to show chevron only.
|
void |
setLayoutPolicy(int layoutPolicy)
Sets new component layout policy.
|
void |
setMiniMode(boolean minimalMode) |
void |
setMinimumButtonSize(java.awt.Dimension size)
Sets minimum size of toolbar button.
|
void |
setOrientation(int orientation)
Sets toolbar orientation
|
void |
setReservePlaceAutoPopupIcon(boolean reserve) |
void |
setSecondaryActionsIcon(javax.swing.Icon icon) |
void |
setSecondaryActionsIcon(javax.swing.Icon icon,
boolean hideDropdownIcon) |
void |
setSecondaryActionsShortcut(java.lang.String secondaryActionsShortcut) |
void |
setSecondaryActionsTooltip(java.lang.String secondaryActionsTooltip) |
void |
setSecondaryButtonPopupStateModifier(ActionToolbarImpl.PopupStateModifier popupStateModifier) |
void |
setShowSeparatorTitles(boolean showSeparatorTitles)
Enables showing titles of separators as labels in the toolbar (off by default).
|
void |
setSkipWindowAdjustments(boolean skipWindowAdjustments)
This option makes sense when you use a toolbar inside JBPopup
When some 'actions' are hidden under the chevron the popup with extra components would be shown/hidden
with size adjustments for the main popup (this is default behavior).
|
void |
setTargetComponent(javax.swing.JComponent component)
Will be used for data-context retrieval.
|
void |
updateActionsImmediately()
Forces update of the all actions in the toolbars.
|
static void |
updateAllToolbarsImmediately() |
void |
updateUI() |
void |
validate() |
getAccessibleContext, getUI, getUIClassID, paramString, setUIaddAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, 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, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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, validateTreeaction, 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, isEnabled, 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, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, isCycleRootpublic ActionToolbarImpl(java.lang.String place,
ActionGroup actionGroup,
boolean horizontal)
public ActionToolbarImpl(java.lang.String place,
ActionGroup actionGroup,
boolean horizontal,
boolean decorateButtons)
public ActionToolbarImpl(java.lang.String place,
ActionGroup actionGroup,
boolean horizontal,
boolean decorateButtons,
boolean updateActionsNow)
public static void updateAllToolbarsImmediately()
public ActionButton getSecondaryActionsButton()
public void updateUI()
updateUI in class javax.swing.JPanelpublic java.lang.String getPlace()
public void addNotify()
addNotify in class javax.swing.JComponentpublic void removeNotify()
removeNotify in class javax.swing.JComponentpublic javax.swing.JComponent getComponent()
getComponent in interface ActionToolbargetComponent in interface QuickActionProviderpublic int getLayoutPolicy()
getLayoutPolicy in interface ActionToolbarActionToolbar.NOWRAP_LAYOUT_POLICY,
ActionToolbar.WRAP_LAYOUT_POLICYpublic void setLayoutPolicy(int layoutPolicy)
ActionToolbarActionToolbar.WRAP_LAYOUT_POLICY and
ActionToolbar.NOWRAP_LAYOUT_POLICY values.setLayoutPolicy in interface ActionToolbarprotected java.awt.Graphics getComponentGraphics(java.awt.Graphics graphics)
getComponentGraphics in class javax.swing.JComponentpublic ActionGroup getActionGroup()
protected void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic void setSecondaryButtonPopupStateModifier(ActionToolbarImpl.PopupStateModifier popupStateModifier)
protected ActionButton createToolbarButton(AnAction action, ActionButtonLook look, java.lang.String place, Presentation presentation, java.awt.Dimension minimumSize)
public void doLayout()
doLayout in class java.awt.Containerpublic void validate()
validate in class java.awt.Containerpublic int getMaxButtonHeight()
getMaxButtonHeight in interface ActionToolbarpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentpublic void setForceMinimumSize(boolean force)
true. By default (false) the
toolbar will shrink further and show the auto popup chevron button.public void setForceShowFirstComponent(boolean showFirstComponent)
true toolbar shows at least one (the first) component plus chevron (if need)public void setSkipWindowAdjustments(boolean skipWindowAdjustments)
true size adjustments would be omittedpublic java.awt.Dimension getMinimumSize()
getMinimumSize in class javax.swing.JComponentprotected java.awt.Color getSeparatorColor()
public void adjustTheSameSize(boolean value)
ActionToolbartrue then the all button on toolbar are
the same size. It very useful when you create "Outlook" like toolbar.
Currently this method can be considered as hot fix.adjustTheSameSize in interface ActionToolbarpublic void setMinimumButtonSize(java.awt.Dimension size)
ActionToolbarsetMinimumButtonSize in interface ActionToolbarpublic void setOrientation(int orientation)
ActionToolbarsetOrientation in interface ActionToolbarSwingConstants.HORIZONTAL,
SwingConstants.VERTICALpublic int getOrientation()
public void updateActionsImmediately()
ActionToolbarupdateActionsImmediately in interface ActionToolbarpublic boolean hasVisibleActions()
hasVisibleActions in interface ActionToolbarpublic void setTargetComponent(javax.swing.JComponent component)
ActionToolbarsetTargetComponent in interface ActionToolbarpublic DataContext getToolbarDataContext()
getToolbarDataContext in interface ActionToolbarpublic void setShowSeparatorTitles(boolean showSeparatorTitles)
ActionToolbarsetShowSeparatorTitles in interface ActionToolbarprotected DataContext getDataContext()
protected void processMouseMotionEvent(java.awt.event.MouseEvent e)
processMouseMotionEvent in class javax.swing.JComponentpublic void setReservePlaceAutoPopupIcon(boolean reserve)
setReservePlaceAutoPopupIcon in interface ActionToolbarpublic void setSecondaryActionsTooltip(java.lang.String secondaryActionsTooltip)
setSecondaryActionsTooltip in interface ActionToolbarpublic void setSecondaryActionsShortcut(java.lang.String secondaryActionsShortcut)
public void setSecondaryActionsIcon(javax.swing.Icon icon)
setSecondaryActionsIcon in interface ActionToolbarpublic void setSecondaryActionsIcon(javax.swing.Icon icon,
boolean hideDropdownIcon)
setSecondaryActionsIcon in interface ActionToolbarpublic java.util.List<AnAction> getActions(boolean originalProvider)
getActions in interface QuickActionProviderpublic java.util.List<AnAction> getActions()
getActions in interface ActionToolbarpublic void setMiniMode(boolean minimalMode)
setMiniMode in interface ActionToolbarpublic Presentation getPresentation(AnAction action)
public void clearPresentationCache()