public class TableViewerSWTBuilder extends AbstractFeatureAwareBuilder<TableViewerSWTBuilder>
TableViewerComposite
.Modifier | Constructor and Description |
---|---|
protected |
TableViewerSWTBuilder(org.eclipse.swt.widgets.Composite composite,
int swtStyleBits,
Object input,
org.eclipse.core.databinding.observable.value.IObservableValue title,
org.eclipse.core.databinding.observable.value.IObservableValue tooltip) |
Modifier and Type | Method and Description |
---|---|
TableViewerSWTBuilder |
addColumn(ColumnConfiguration columnConfiguration)
Adds a new column.
|
AbstractTableViewerComposite<? extends org.eclipse.jface.viewers.AbstractTableViewer> |
build()
Call this method after all desired customizations have been passed to the builder.
|
TableViewerSWTBuilder |
columnRegexFilter(boolean columnRegexFilter)
Set whether support for users to show a regular expression filter on columns
is installed.
|
TableViewerSWTBuilder |
columnSubstringFilter(boolean columnSubstringFilter)
Set whether support for users to show a simple substring-matching filter on columns
is installed.
|
TableViewerSWTBuilder |
configureTable(TableConfiguration tableConfiguration)
Configures the current table instance using the given configuration.
|
TableViewerSWTBuilder |
customizeActionBar(ActionBar<? extends org.eclipse.jface.viewers.Viewer> actionBar)
Use this method to customize the way the button bar is filled.
|
TableViewerSWTBuilder |
customizeActionConfiguration(ActionConfiguration actionConfiguration)
Use this method to customize the key bindings for the table viewer.
|
TableViewerSWTBuilder |
customizeComparator(org.eclipse.jface.viewers.ViewerComparator comparator)
Use this method to set a
ViewerComparator on the table. |
TableViewerSWTBuilder |
customizeCompositeStructure(TableViewerCompositeBuilder builder)
Use this method to customize the way title, validation, buttons and the tableviewer are arranged.
|
TableViewerSWTBuilder |
customizeContentProvider(org.eclipse.jface.viewers.IContentProvider provider)
Use this method to set a different content provider on the viewer.
|
TableViewerSWTBuilder |
customizeDragAndDrop(DNDProvider provider)
Use this method to customize drag&drop.
|
TableViewerSWTBuilder |
customizeTableViewerCreation(TableViewerCreator<? extends org.eclipse.jface.viewers.AbstractTableViewer> creator)
Use this method to create the actual TableViewer.
|
protected org.eclipse.swt.widgets.Composite |
getComposite() |
TableViewerSWTCustomization<?> |
getCustomization() |
Set<Feature> |
getEnabledFeatures()
Deprecated.
Since 1.21, use the
showHideColumns(boolean) and similar
builder methods, instead |
protected Object |
getInput() |
Set<Feature> |
getSupportedFeatures()
Deprecated.
Since 1.21, use the
showHideColumns(boolean) and similar
builder methods, instead |
protected int |
getSwtStyleBits() |
protected org.eclipse.core.databinding.observable.value.IObservableValue |
getTitle() |
protected org.eclipse.core.databinding.observable.value.IObservableValue |
getTooltip() |
TableViewerSWTBuilder |
showHideColumns(boolean showHideColumns)
Set whether support for users to show and hide columns is installed.
|
disableFeature, enableFeature, getBuilder, inheritFeatures, isFeatureEnabled, isFeatureSupported
protected TableViewerSWTBuilder(org.eclipse.swt.widgets.Composite composite, int swtStyleBits, Object input, org.eclipse.core.databinding.observable.value.IObservableValue title, org.eclipse.core.databinding.observable.value.IObservableValue tooltip)
composite
- the parent Composite
swtStyleBits
- the swt style bitsinput
- the input objecttitle
- the titletooltip
- the tooltipprotected org.eclipse.swt.widgets.Composite getComposite()
protected int getSwtStyleBits()
protected Object getInput()
public TableViewerSWTCustomization<?> getCustomization()
protected org.eclipse.core.databinding.observable.value.IObservableValue getTitle()
protected org.eclipse.core.databinding.observable.value.IObservableValue getTooltip()
public TableViewerSWTBuilder customizeCompositeStructure(TableViewerCompositeBuilder builder)
Use this method to customize the way title, validation, buttons and the tableviewer are arranged.
The default implementation will create a title bar with title to left, a validation label in the middle and a button bar on the right. Below the title bar the viewer will be created
builder
- the TableViewerCompositeBuilder
public TableViewerSWTBuilder customizeTableViewerCreation(TableViewerCreator<? extends org.eclipse.jface.viewers.AbstractTableViewer> creator)
Use this method to create the actual TableViewer.
The default implementation will create a viewer with the SWT#MULTI, SWT#V_SCROLL,
FULL_SELECTION and SWT#BORDER style bits. The table will show the
header
and will show
lines
.
creator
- the TableViewerCreator
public TableViewerSWTBuilder customizeComparator(org.eclipse.jface.viewers.ViewerComparator comparator)
Use this method to set a ViewerComparator
on the table.
The default implementation does not add a comparator.
comparator
- the ViewerComparator
public TableViewerSWTBuilder customizeContentProvider(org.eclipse.jface.viewers.IContentProvider provider)
Use this method to set a different content provider on the viewer.
The default implementation uses a ObservableListContentProvider
.
provider
- the IContentProvider
to usepublic TableViewerSWTBuilder customizeActionBar(ActionBar<? extends org.eclipse.jface.viewers.Viewer> actionBar)
Use this method to customize the way the button bar is filled.
The default behavior will not add any buttons.
actionBar
- the ActionBar
public TableViewerSWTBuilder customizeActionConfiguration(ActionConfiguration actionConfiguration)
Use this method to customize the key bindings for the table viewer.
The default behavior will not register any bindings.
actionConfiguration
- the ActionConfiguration
public TableViewerSWTBuilder customizeDragAndDrop(DNDProvider provider)
Use this method to customize drag&drop.
The default behaviour disables drag&drop.
provider
- the providerpublic TableViewerSWTBuilder configureTable(TableConfiguration tableConfiguration)
tableConfiguration
- the TableConfiguration
to addpublic TableViewerSWTBuilder addColumn(ColumnConfiguration columnConfiguration)
columnConfiguration
- the ColumnConfiguration
to add@Deprecated public Set<Feature> getSupportedFeatures()
showHideColumns(boolean)
and similar
builder methods, insteadAbstractFeatureAwareBuilder
getSupportedFeatures
in class AbstractFeatureAwareBuilder<TableViewerSWTBuilder>
showHideColumns(boolean)
,
columnSubstringFilter(boolean)
,
columnRegexFilter(boolean)
@Deprecated public Set<Feature> getEnabledFeatures()
showHideColumns(boolean)
and similar
builder methods, insteadAbstractFeatureAwareBuilder
getEnabledFeatures
in class AbstractFeatureAwareBuilder<TableViewerSWTBuilder>
showHideColumns(boolean)
,
columnSubstringFilter(boolean)
,
columnRegexFilter(boolean)
public TableViewerSWTBuilder showHideColumns(boolean showHideColumns)
showHideColumns
- true
to enable showing and hiding of columns; false
to disable itpublic TableViewerSWTBuilder columnSubstringFilter(boolean columnSubstringFilter)
columnSubstringFilter
- true
to enable the substring filter; false
to disable itpublic TableViewerSWTBuilder columnRegexFilter(boolean columnRegexFilter)
columnRegexFilter
- true
to enable the regex filter; false
to disable itpublic AbstractTableViewerComposite<? extends org.eclipse.jface.viewers.AbstractTableViewer> build()
TableViewerComposite
with the desired customizations.TableViewerComposite
Copyright © 2019. All rights reserved.