V
- the TableViewer implementation to usepublic abstract class AbstractTableViewerComposite<V extends org.eclipse.jface.viewers.AbstractTableViewer>
extends org.eclipse.swt.widgets.Composite
Modifier | Constructor and Description |
---|---|
protected |
AbstractTableViewerComposite(org.eclipse.swt.widgets.Composite parent,
int style,
Object inputObject,
TableViewerSWTCustomization<V> customization,
org.eclipse.core.databinding.observable.value.IObservableValue title,
org.eclipse.core.databinding.observable.value.IObservableValue tooltip)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
addColumnListener(org.eclipse.swt.events.ControlListener columnlistener)
Adds a new
column listener . |
protected void |
configureContextMenu(V tableViewer)
Configures the context menu for the given TableViewer instance.
|
protected void |
configureViewerFilters(V tableViewer)
Configures viewer filters for the given TableViewer instance.
|
protected abstract org.eclipse.jface.viewers.ViewerColumn |
createColumn(ColumnConfiguration columnDescription,
org.eclipse.emf.databinding.EMFDataBindingContext emfDataBindingContext,
V tableViewer)
Creates a new
ViewerColumn . |
protected static org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy |
createColumnViewerActivationStrategy(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
Creates a new
ColumnViewerEditorActivationStrategy for the given table viewer. |
protected abstract org.eclipse.jface.layout.AbstractColumnLayout |
createLayout(org.eclipse.swt.widgets.Composite viewerComposite)
Sets the layout of the given
Composite . |
protected abstract V |
createTableViewer(TableViewerSWTCustomization<V> customization,
org.eclipse.swt.widgets.Composite viewerComposite)
Creates the table viewer.
|
void |
dispose() |
Optional<ActionBar<V>> |
getActionBar()
If present, returns the
ActionBar configuring actions and corresponding control for this composite's
viewer. |
ColumnConfiguration |
getColumnConfiguration(org.eclipse.swt.widgets.Widget columnWidget)
Returns the
ColumnConfiguration of the given widget instance. |
abstract org.eclipse.swt.widgets.Widget[] |
getColumns()
Returns the list of columns of the table viewer.
|
Set<Feature> |
getEnabledFeatures() |
abstract TableControl |
getTableControl()
Returns the
TableControl . |
abstract V |
getTableViewer() |
Optional<List<org.eclipse.swt.widgets.Control>> |
getValidationControls() |
abstract void |
setComparator(TableViewerComparator comparator,
List<Integer> sortableColumns)
Sets the comparator of the table viewer.
|
abstract void |
setCompareColumn(int column)
Allow to set an initial sort.
|
protected void |
viewerSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
This method gets called when the selection on the
TableViewer (see getTableViewer() ) has
changed. |
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
protected AbstractTableViewerComposite(org.eclipse.swt.widgets.Composite parent, int style, Object inputObject, TableViewerSWTCustomization<V> customization, org.eclipse.core.databinding.observable.value.IObservableValue title, org.eclipse.core.databinding.observable.value.IObservableValue tooltip)
parent
- the parent Composite
style
- the style bitsinputObject
- the input objectcustomization
- the TableViewerSWTCustomization
title
- the titletooltip
- the tooltippublic Optional<ActionBar<V>> getActionBar()
ActionBar
configuring actions and corresponding control for this composite's
viewer.ActionBar
, if anypublic abstract V getTableViewer()
AbstractTableViewer
public Optional<List<org.eclipse.swt.widgets.Control>> getValidationControls()
protected void configureContextMenu(V tableViewer)
tableViewer
- the table viewer to configureprotected void configureViewerFilters(V tableViewer)
tableViewer
- the table viewer to configurepublic abstract org.eclipse.swt.widgets.Widget[] getColumns()
protected abstract org.eclipse.jface.layout.AbstractColumnLayout createLayout(org.eclipse.swt.widgets.Composite viewerComposite)
Composite
.viewerComposite
- the target compositeprotected abstract V createTableViewer(TableViewerSWTCustomization<V> customization, org.eclipse.swt.widgets.Composite viewerComposite)
customization
- the TableViewerSWTCustomization
to useviewerComposite
- the parent compositeprotected abstract org.eclipse.jface.viewers.ViewerColumn createColumn(ColumnConfiguration columnDescription, org.eclipse.emf.databinding.EMFDataBindingContext emfDataBindingContext, V tableViewer)
ViewerColumn
.columnDescription
- the column description to usetableViewer
- the parent AbstractTableViewer
emfDataBindingContext
- the data binding context to usepublic ColumnConfiguration getColumnConfiguration(org.eclipse.swt.widgets.Widget columnWidget)
ColumnConfiguration
of the given widget instance.columnWidget
- the widget to fetch the column configuration forColumnConfigurationImpl
protected void viewerSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
TableViewer
(see getTableViewer()
) has
changed.
If you override this method make sure to call super.
event
- the SelectionChangedEvent
protected static org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy createColumnViewerActivationStrategy(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
ColumnViewerEditorActivationStrategy
for the given table viewer.tableViewer
- the target table viewer.public void dispose()
dispose
in class org.eclipse.swt.widgets.Widget
public abstract void addColumnListener(org.eclipse.swt.events.ControlListener columnlistener)
column listener
.columnlistener
- the listener to addpublic abstract TableControl getTableControl()
TableControl
.public abstract void setComparator(TableViewerComparator comparator, List<Integer> sortableColumns)
comparator
- the TableViewerComparator
to setsortableColumns
- the list of columns that can be sortedpublic abstract void setCompareColumn(int column)
column
- The column to sortCopyright © 2019. All rights reserved.