V - the concrete viewer typepublic class TableActionBar<V extends org.eclipse.jface.viewers.AbstractTableViewer> extends Object implements ActionBar<V>
| Constructor and Description |
|---|
TableActionBar(ActionConfiguration configuration)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addControl(String id,
org.eclipse.swt.widgets.Control control)
Add a control to the action bar.
|
protected void |
applyLayout(org.eclipse.swt.widgets.Composite composite)
Applies a layout to the action bar composite.
|
void |
fillComposite(org.eclipse.swt.widgets.Composite composite,
V viewer)
This method is called to fill the given
Composite with action controls. |
int |
getActionCount()
Get the number of currently registered actions.
|
protected Collection<Action> |
getActions()
Returns a list of known actions.
|
Optional<org.eclipse.swt.widgets.Control> |
getControlById(String id)
Get a control by its action ID.
|
int |
getControlCount()
Get the number of currently registered controls.
|
void |
updateActionBar()
Updates the controls of this action bar.
|
public TableActionBar(ActionConfiguration configuration)
configuration - the ActionConfiguration to usepublic void fillComposite(org.eclipse.swt.widgets.Composite composite,
V viewer)
ActionBarComposite with action controls.fillComposite in interface ActionBar<V extends org.eclipse.jface.viewers.AbstractTableViewer>composite - the compositeviewer - the AbstractTableViewerprotected void applyLayout(org.eclipse.swt.widgets.Composite composite)
composite - the composite to apply a layout toprotected Collection<Action> getActions()
protected void addControl(String id, org.eclipse.swt.widgets.Control control)
id - the ID of the control (typically the same as the ID of the bound action)control - the control instancepublic Optional<org.eclipse.swt.widgets.Control> getControlById(String id)
ActionBargetControlById in interface ActionBar<V extends org.eclipse.jface.viewers.AbstractTableViewer>id - the action ID to get the control forpublic int getControlCount()
ActionBargetControlCount in interface ActionBar<V extends org.eclipse.jface.viewers.AbstractTableViewer>public int getActionCount()
ActionBargetActionCount in interface ActionBar<V extends org.eclipse.jface.viewers.AbstractTableViewer>public void updateActionBar()
Invokes canExecute() on all bound actions and updates the enabled state for each control accordingly.
updateActionBar in interface ActionBar<V extends org.eclipse.jface.viewers.AbstractTableViewer>Copyright © 2020. All rights reserved.