public class TableViewerSWTBuilder extends Object
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(boolean resizeable,
boolean moveable,
int styleBits,
int weight,
int minWidth,
org.eclipse.core.databinding.observable.value.IObservableValue columnText,
org.eclipse.core.databinding.observable.value.IObservableValue tooltipText,
org.eclipse.jface.viewers.CellLabelProvider labelProvider)
Adds a read-only column.
|
TableViewerSWTBuilder |
addColumn(boolean resizeable,
boolean moveable,
int styleBits,
int weight,
int minWidth,
org.eclipse.core.databinding.observable.value.IObservableValue columnText,
org.eclipse.core.databinding.observable.value.IObservableValue tooltipText,
org.eclipse.jface.viewers.CellLabelProvider labelProvider,
EditingSupportCreator editingSupport)
Adds a column.
|
TableViewerSWTBuilder |
addColumn(boolean resizeable,
boolean moveable,
int styleBits,
int weight,
int minWidth,
org.eclipse.core.databinding.observable.value.IObservableValue columnText,
org.eclipse.core.databinding.observable.value.IObservableValue tooltipText,
org.eclipse.jface.viewers.CellLabelProvider labelProvider,
EditingSupportCreator editingSupport,
org.eclipse.swt.graphics.Image image)
Adds a column.
|
TableViewerSWTBuilder |
addColumn(boolean resizeable,
boolean moveable,
int styleBits,
int weight,
int minWidth,
org.eclipse.core.databinding.observable.value.IObservableValue columnText,
org.eclipse.core.databinding.observable.value.IObservableValue tooltipText,
CellLabelProviderFactory labelProvider,
EditingSupportCreator editingSupport,
org.eclipse.swt.graphics.Image image)
Adds a column.
|
TableViewerSWTBuilder |
addColumn(boolean resizeable,
boolean moveable,
int styleBits,
int weight,
int minWidth,
String columnText,
String tooltipText,
org.eclipse.jface.viewers.CellLabelProvider labelProvider)
Adds a read-only column.
|
TableViewerSWTBuilder |
addColumn(boolean resizeable,
boolean moveable,
int styleBits,
int weight,
int minWidth,
String columnText,
String tooltipText,
org.eclipse.jface.viewers.CellLabelProvider labelProvider,
EditingSupportCreator editingSupport)
Adds a column.
|
TableViewerSWTBuilder |
addColumn(boolean resizeable,
boolean moveable,
int styleBits,
int weight,
int minWidth,
String columnText,
String tooltipText,
org.eclipse.jface.viewers.CellLabelProvider labelProvider,
EditingSupportCreator editingSupport,
org.eclipse.swt.graphics.Image image)
Adds a column.
|
TableViewerSWTBuilder |
addColumn(org.eclipse.core.databinding.observable.value.IObservableValue columnText,
org.eclipse.core.databinding.observable.value.IObservableValue tooltipText,
org.eclipse.jface.viewers.CellLabelProvider labelProvider)
Adds a read-only column.
|
TableViewerSWTBuilder |
addColumn(org.eclipse.core.databinding.observable.value.IObservableValue columnText,
org.eclipse.core.databinding.observable.value.IObservableValue tooltipText,
org.eclipse.jface.viewers.CellLabelProvider labelProvider,
EditingSupportCreator editingSupport)
Adds a column.
|
TableViewerSWTBuilder |
addColumn(String columnText,
String tooltipText,
org.eclipse.jface.viewers.CellLabelProvider labelProvider)
Adds a read-only column.
|
TableViewerSWTBuilder |
addColumn(String columnText,
String tooltipText,
org.eclipse.jface.viewers.CellLabelProvider labelProvider,
EditingSupportCreator editingSupport)
Adds a column.
|
AbstractTableViewerComposite |
create()
Call this method after all desired customizations have been passed to the builder.
|
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 creator)
Use this method to create the actual TableViewer.
|
protected org.eclipse.swt.widgets.Composite |
getComposite() |
protected DefaultTableControlSWTCustomization |
getCustomization() |
protected Object |
getInput() |
protected int |
getSwtStyleBits() |
protected org.eclipse.core.databinding.observable.value.IObservableValue |
getTitle() |
protected org.eclipse.core.databinding.observable.value.IObservableValue |
getTooltip() |
void |
setData(String key,
Object value)
Add an arbitrary key/value pair.
|
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 CompositeswtStyleBits - the swt style bitsinput - the input objecttitle - the titletooltip - the tooltipprotected org.eclipse.swt.widgets.Composite getComposite()
protected int getSwtStyleBits()
protected Object getInput()
protected DefaultTableControlSWTCustomization 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 creator)
Use this method to create the actual TableViewer.
The default implementation will create a viewer with the SWT.MULTI, SWT.V_SCROLL,
SWT.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 void setData(String key, Object value)
key - literalvalue - objectpublic TableViewerSWTBuilder addColumn(boolean resizeable, boolean moveable, int styleBits, int weight, int minWidth, org.eclipse.core.databinding.observable.value.IObservableValue columnText, org.eclipse.core.databinding.observable.value.IObservableValue tooltipText, CellLabelProviderFactory labelProvider, EditingSupportCreator editingSupport, org.eclipse.swt.graphics.Image image)
resizeable - whether the column is resizeable or notmoveable - whether the column is moveable or notstyleBits - the style bits for the columnweight - the weight of the columnminWidth - the min width in pixelscolumnText - the column texttooltipText - the tooltip textlabelProvider - the label providereditingSupport - the editing supportimage - the column imagepublic TableViewerSWTBuilder addColumn(boolean resizeable, boolean moveable, int styleBits, int weight, int minWidth, org.eclipse.core.databinding.observable.value.IObservableValue columnText, org.eclipse.core.databinding.observable.value.IObservableValue tooltipText, org.eclipse.jface.viewers.CellLabelProvider labelProvider, EditingSupportCreator editingSupport, org.eclipse.swt.graphics.Image image)
resizeable - whether the column is resizeable or notmoveable - whether the column is moveable or notstyleBits - the style bits for the columnweight - the weight of the columnminWidth - the min width in pixelscolumnText - the column texttooltipText - the tooltip textlabelProvider - the label providereditingSupport - the editing supportimage - the column imagepublic TableViewerSWTBuilder addColumn(boolean resizeable, boolean moveable, int styleBits, int weight, int minWidth, String columnText, String tooltipText, org.eclipse.jface.viewers.CellLabelProvider labelProvider, EditingSupportCreator editingSupport, org.eclipse.swt.graphics.Image image)
resizeable - whether the column is resizeable or notmoveable - whether the column is moveable or notstyleBits - the style bits for the columnweight - the weight of the columnminWidth - the min width in pixelscolumnText - the column texttooltipText - the tooltip textlabelProvider - the label providereditingSupport - the editing supportimage - the column imagepublic TableViewerSWTBuilder addColumn(boolean resizeable, boolean moveable, int styleBits, int weight, int minWidth, org.eclipse.core.databinding.observable.value.IObservableValue columnText, org.eclipse.core.databinding.observable.value.IObservableValue tooltipText, org.eclipse.jface.viewers.CellLabelProvider labelProvider, EditingSupportCreator editingSupport)
resizeable - whether the column is resizeable or notmoveable - whether the column is moveable or notstyleBits - the style bits for the columnweight - the weight of the columnminWidth - the min width in pixelscolumnText - the column texttooltipText - the tooltip textlabelProvider - the label providereditingSupport - the editing supportpublic TableViewerSWTBuilder addColumn(boolean resizeable, boolean moveable, int styleBits, int weight, int minWidth, String columnText, String tooltipText, org.eclipse.jface.viewers.CellLabelProvider labelProvider, EditingSupportCreator editingSupport)
resizeable - whether the column is resizeable or notmoveable - whether the column is moveable or notstyleBits - the style bits for the columnweight - the weight of the columnminWidth - the min width in pixelscolumnText - the column texttooltipText - the tooltip textlabelProvider - the label providereditingSupport - the editing supportpublic TableViewerSWTBuilder addColumn(org.eclipse.core.databinding.observable.value.IObservableValue columnText, org.eclipse.core.databinding.observable.value.IObservableValue tooltipText, org.eclipse.jface.viewers.CellLabelProvider labelProvider, EditingSupportCreator editingSupport)
SWT.NONE style bit, has a weight of 100
and a min width of 0 pixel.columnText - the column texttooltipText - the tooltip textlabelProvider - the label providereditingSupport - the editing supportpublic TableViewerSWTBuilder addColumn(String columnText, String tooltipText, org.eclipse.jface.viewers.CellLabelProvider labelProvider, EditingSupportCreator editingSupport)
SWT.NONE style bit, has a weight of 100
and a min width of 0 pixel.columnText - the column texttooltipText - the tooltip textlabelProvider - the label providereditingSupport - the editing supportpublic TableViewerSWTBuilder addColumn(boolean resizeable, boolean moveable, int styleBits, int weight, int minWidth, org.eclipse.core.databinding.observable.value.IObservableValue columnText, org.eclipse.core.databinding.observable.value.IObservableValue tooltipText, org.eclipse.jface.viewers.CellLabelProvider labelProvider)
resizeable - whether the column is resizeable or notmoveable - whether the column is moveable or notstyleBits - the style bits for the columnweight - the weight of the columnminWidth - the min width in pixelscolumnText - the column texttooltipText - the tooltip textlabelProvider - the label providerpublic TableViewerSWTBuilder addColumn(boolean resizeable, boolean moveable, int styleBits, int weight, int minWidth, String columnText, String tooltipText, org.eclipse.jface.viewers.CellLabelProvider labelProvider)
resizeable - whether the column is resizeable or notmoveable - whether the column is moveable or notstyleBits - the style bits for the columnweight - the weight of the columnminWidth - the min width in pixelscolumnText - the column texttooltipText - the tooltip textlabelProvider - the label providerpublic TableViewerSWTBuilder addColumn(org.eclipse.core.databinding.observable.value.IObservableValue columnText, org.eclipse.core.databinding.observable.value.IObservableValue tooltipText, org.eclipse.jface.viewers.CellLabelProvider labelProvider)
SWT.NONE style bit, has a
weight of 100 and a min width of 0 pixel.columnText - the column texttooltipText - the tooltip textlabelProvider - the label providerpublic TableViewerSWTBuilder addColumn(String columnText, String tooltipText, org.eclipse.jface.viewers.CellLabelProvider labelProvider)
SWT.NONE style bit, has a
weight of 100 and a min width of 0 pixel.columnText - the column texttooltipText - the tooltip textlabelProvider - the label providerpublic AbstractTableViewerComposite create()
TableViewerComposite with the desired customizations.TableViewerCompositeCopyright © 2016. All rights reserved.