public abstract class ToolbarDecorator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ToolbarDecorator.ElementActionButton
Marker interface, button will be disabled if no selected element
|
Modifier and Type | Field and Description |
---|---|
protected AnActionButtonRunnable |
myAddAction |
protected boolean |
myAddActionEnabled |
protected AnActionButtonRunnable |
myDownAction |
protected boolean |
myDownActionEnabled |
protected AnActionButtonRunnable |
myEditAction |
protected boolean |
myEditActionEnabled |
protected javax.swing.border.Border |
myPanelBorder |
protected AnActionButtonRunnable |
myRemoveAction |
protected boolean |
myRemoveActionEnabled |
protected javax.swing.border.Border |
myScrollPaneBorder |
protected javax.swing.border.Border |
myToolbarBorder |
protected AnActionButtonRunnable |
myUpAction |
protected boolean |
myUpActionEnabled |
Constructor and Description |
---|
ToolbarDecorator() |
protected javax.swing.border.Border myPanelBorder
protected javax.swing.border.Border myToolbarBorder
protected javax.swing.border.Border myScrollPaneBorder
protected boolean myAddActionEnabled
protected boolean myEditActionEnabled
protected boolean myRemoveActionEnabled
protected boolean myUpActionEnabled
protected boolean myDownActionEnabled
protected AnActionButtonRunnable myAddAction
protected AnActionButtonRunnable myEditAction
protected AnActionButtonRunnable myRemoveAction
protected AnActionButtonRunnable myUpAction
protected AnActionButtonRunnable myDownAction
protected abstract javax.swing.JComponent getComponent()
protected abstract void updateButtons()
protected void updateExtraElementActions(boolean someElementSelected)
public final CommonActionsPanel getActionsPanel()
public ToolbarDecorator initPosition()
@Deprecated public ToolbarDecorator setAsUsualTopToolbar()
decorator
.setToolbarPosition(ActionToolbarPosition.TOP)
.setPanelBorder(JBUI.Borders.empty())
setScrollPaneBorder(Border)
public static ToolbarDecorator createDecorator(javax.swing.JTable table)
public static ToolbarDecorator createDecorator(javax.swing.JTree tree)
public static ToolbarDecorator createDecorator(javax.swing.JList list)
public static ToolbarDecorator createDecorator(javax.swing.JList list, EditableModel editableModel)
public static <T> ToolbarDecorator createDecorator(TableView<T> table, ElementProducer<T> producer)
public ToolbarDecorator disableAddAction()
public ToolbarDecorator disableRemoveAction()
public ToolbarDecorator disableUpAction()
public ToolbarDecorator disableUpDownActions()
public ToolbarDecorator disableDownAction()
public ToolbarDecorator setPanelBorder(javax.swing.border.Border border)
public ToolbarDecorator setToolbarBorder(javax.swing.border.Border border)
public ToolbarDecorator setScrollPaneBorder(javax.swing.border.Border border)
public ToolbarDecorator setButtonComparator(java.util.Comparator<AnActionButton> buttonComparator)
public ToolbarDecorator setButtonComparator(java.lang.String... actionNames)
public ToolbarDecorator addExtraAction(AnActionButton action)
public ToolbarDecorator addExtraActions(AnActionButton... actions)
public ToolbarDecorator setToolbarPosition(ActionToolbarPosition position)
public ToolbarDecorator setAddAction(AnActionButtonRunnable action)
public ToolbarDecorator setEditAction(AnActionButtonRunnable action)
public ToolbarDecorator setRemoveAction(AnActionButtonRunnable action)
public ToolbarDecorator setMoveUpAction(AnActionButtonRunnable action)
public ToolbarDecorator setMoveDownAction(AnActionButtonRunnable action)
public ToolbarDecorator setAddActionName(java.lang.String name)
public ToolbarDecorator setEditActionName(java.lang.String name)
public ToolbarDecorator setRemoveActionName(java.lang.String name)
public ToolbarDecorator setMoveUpActionName(java.lang.String name)
public ToolbarDecorator setMoveDownActionName(java.lang.String name)
public ToolbarDecorator setAddActionUpdater(AnActionButtonUpdater updater)
public ToolbarDecorator setRemoveActionUpdater(AnActionButtonUpdater updater)
public ToolbarDecorator setEditActionUpdater(AnActionButtonUpdater updater)
public ToolbarDecorator setMoveUpActionUpdater(AnActionButtonUpdater updater)
public ToolbarDecorator setMoveDownActionUpdater(AnActionButtonUpdater updater)
public ToolbarDecorator setForcedDnD()
public ToolbarDecorator setActionGroup(ActionGroup actionGroup)
public ToolbarDecorator setPreferredSize(java.awt.Dimension size)
public ToolbarDecorator setMinimumSize(java.awt.Dimension size)
public ToolbarDecorator setVisibleRowCount(int rowCount)
public ToolbarDecorator setAddIcon(javax.swing.Icon addIcon)
public javax.swing.JPanel createPanel()
protected void installDnD()
protected abstract void installDnDSupport()
protected abstract boolean isModelEditable()
public CommonActionsPanel.Listener createListener(CommonActionsPanel panel)
public static AnActionButton findAddButton(javax.swing.JComponent container)
public static AnActionButton findEditButton(javax.swing.JComponent container)
public static AnActionButton findRemoveButton(javax.swing.JComponent container)
public static AnActionButton findUpButton(javax.swing.JComponent container)
public static AnActionButton findDownButton(javax.swing.JComponent container)