public interface ActionToolbar
Modifier and Type | Interface and Description |
---|---|
static interface |
ActionToolbar.LayoutPolicy |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_TOOLBAR_PROPERTY_KEY |
static int |
AUTO_LAYOUT_POLICY
This is experimental layout policy which allow toolbar auto-hide and show buttons that don't fit into actual side
|
static java.awt.Dimension |
DEFAULT_MINIMUM_BUTTON_SIZE
This is default minimum size of the toolbar button
|
static java.awt.Dimension |
NAVBAR_MINIMUM_BUTTON_SIZE |
static int |
NOWRAP_LAYOUT_POLICY
This is default layout policy for the toolbar.
|
static int |
WRAP_LAYOUT_POLICY
This is experimental layout policy which allow toolbar to
wrap components in multiple rows.
|
Modifier and Type | Method and Description |
---|---|
void |
adjustTheSameSize(boolean value)
If the value is
true then the all button on toolbar are
the same size. |
java.util.List<AnAction> |
getActions() |
javax.swing.JComponent |
getComponent() |
int |
getLayoutPolicy() |
int |
getMaxButtonHeight() |
DataContext |
getToolbarDataContext() |
boolean |
hasVisibleActions() |
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 |
setSecondaryActionsTooltip(java.lang.String secondaryActionsTooltip) |
default void |
setShowSeparatorTitles(boolean showSeparatorTitles)
Enables showing titles of separators as labels in the toolbar (off by default).
|
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 final java.lang.String ACTION_TOOLBAR_PROPERTY_KEY
static final int NOWRAP_LAYOUT_POLICY
static final int WRAP_LAYOUT_POLICY
static final int AUTO_LAYOUT_POLICY
static final java.awt.Dimension DEFAULT_MINIMUM_BUTTON_SIZE
static final java.awt.Dimension NAVBAR_MINIMUM_BUTTON_SIZE
javax.swing.JComponent getComponent()
int getLayoutPolicy()
NOWRAP_LAYOUT_POLICY
,
WRAP_LAYOUT_POLICY
void setLayoutPolicy(int layoutPolicy)
WRAP_LAYOUT_POLICY
and
NOWRAP_LAYOUT_POLICY
values.void adjustTheSameSize(boolean value)
true
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.void setMinimumButtonSize(java.awt.Dimension size)
java.lang.IllegalArgumentException
- if size
is null
void setOrientation(int orientation)
SwingConstants.HORIZONTAL
,
SwingConstants.VERTICAL
int getMaxButtonHeight()
void updateActionsImmediately()
boolean hasVisibleActions()
void setTargetComponent(javax.swing.JComponent component)
void setReservePlaceAutoPopupIcon(boolean reserve)
void setSecondaryActionsTooltip(java.lang.String secondaryActionsTooltip)
void setSecondaryActionsIcon(javax.swing.Icon icon)
void setSecondaryActionsIcon(javax.swing.Icon icon, boolean hideDropdownIcon)
java.util.List<AnAction> getActions()
void setMiniMode(boolean minimalMode)
DataContext getToolbarDataContext()
default void setShowSeparatorTitles(boolean showSeparatorTitles)