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 |
build()
Call this method after all desired customizations have been passed to the builder.
|
TableViewerSWTBuilder |
configureTable(TableConfiguration tableConfiguration)
Configures the current table instance using the given configuration.
|
TableViewerSWTBuilder |
customizeButtons(ButtonBarBuilder builder)
Use this method to customize the way the button bar is filled.
|
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 |
customizeElementCreation(NewElementCreator<Object,org.eclipse.swt.widgets.Button> creator)
Use this method to customize the way new elements are created.
|
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()
Return the list of enabled features.
|
protected Object |
getInput() |
Set<Feature> |
getSupportedFeatures()
Returns the list of supported features.
|
protected int |
getSwtStyleBits() |
protected org.eclipse.core.databinding.observable.value.IObservableValue |
getTitle() |
protected org.eclipse.core.databinding.observable.value.IObservableValue |
getTooltip() |
disableFeature, enableFeature, getBuilder, inheritFeatures, isFeatureEnabled, isFeatureSupportedprotected 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 CompositeswtStyleBits - 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 TableViewerCompositeBuilderpublic 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 TableViewerCreatorpublic 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 ViewerComparatorpublic 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 customizeButtons(ButtonBarBuilder builder)
Use this method to customize the way the button bar is filled.
The default implementation will add an add and a remove button.
builder - the ButtonBarBuilderpublic TableViewerSWTBuilder customizeElementCreation(NewElementCreator<Object,org.eclipse.swt.widgets.Button> creator)
Use this method to customize the way new elements are created.
This may only be used in conjunction with the DefaultButtonBarBuilder
creator - the creatorpublic 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 addpublic Set<Feature> getSupportedFeatures()
AbstractFeatureAwareBuildergetSupportedFeatures in class AbstractFeatureAwareBuilder<TableViewerSWTBuilder>public Set<Feature> getEnabledFeatures()
AbstractFeatureAwareBuildergetEnabledFeatures in class AbstractFeatureAwareBuilder<TableViewerSWTBuilder>public AbstractTableViewerComposite build()
TableViewerComposite with the desired customizations.TableViewerCompositeCopyright © 2018. All rights reserved.