public class DefaultTableControlSWTCustomization extends Object implements TableViewerSWTCustomization
TableViewerSWTCustomization.TableViewerSWTCustomization.ColumnDescription| Constructor and Description |
|---|
DefaultTableControlSWTCustomization() |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(TableViewerSWTCustomization.ColumnDescription columnDescription)
Adds a column to the table.
|
void |
createCompositeLayout(org.eclipse.swt.widgets.Composite parent)
Called to create the
composites. |
org.eclipse.jface.viewers.IContentProvider |
createContentProvider()
Returns the content provider to use.
|
Object |
createNewElement(org.eclipse.swt.widgets.Button button)
Gets called when a button is pressed which needs to create a new element which gets added to the list.
|
org.eclipse.jface.viewers.AbstractTableViewer |
createTableViewer(org.eclipse.swt.widgets.Composite parent)
Creates the
AbstractTableViewer. |
void |
fillButtonComposite(org.eclipse.swt.widgets.Composite buttonComposite,
org.eclipse.jface.viewers.AbstractTableViewer viewer)
This method is called to fill the given
Composite with all required buttons. |
Optional<org.eclipse.swt.widgets.Composite> |
getButtonComposite()
|
List<TableViewerSWTCustomization.ColumnDescription> |
getColumns()
Returns the column descriptions which will be used to create actual columns.
|
Optional<org.eclipse.jface.viewers.ViewerComparator> |
getComparator()
Returns the comparator to use.
|
org.eclipse.swt.dnd.DragSourceListener |
getDragListener(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
Returns the
DragSourceListener used to setup the
drag support for the viewer. |
int |
getDragOperations()
Returns the drag operations bits used to setup the
drag support for the viewer. |
org.eclipse.swt.dnd.Transfer[] |
getDragTransferTypes()
Returns the drag transfer types used to setup the
drag support for the viewer. |
org.eclipse.swt.dnd.DropTargetListener |
getDropListener(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
Returns the
DragSourceListener used to setup the
drop support for the viewer. |
int |
getDropOperations()
Returns the drag operations bits used to setup the
drop support for the viewer. |
org.eclipse.swt.dnd.Transfer[] |
getDropTransferTypes()
Returns the drag transfer types used to setup the
drop support for the viewer. |
Optional<org.eclipse.swt.widgets.Label> |
getTitleLabel()
|
Optional<List<org.eclipse.swt.widgets.Control>> |
getValidationControls()
|
org.eclipse.swt.widgets.Composite |
getViewerComposite()
|
boolean |
hasDND()
Whether DND support should be added to the table.
|
void |
setButtonBarBuilder(ButtonBarBuilder builder)
Allows the exchange the default
ButtonBarBuilder. |
void |
setContentProvider(org.eclipse.jface.viewers.IContentProvider provider)
Allows the exchange the default
IContentProvider. |
void |
setDND(DNDProvider provider)
Allows the exchange the default
DNDProvider. |
void |
setNewElementCreator(NewElementCreator<Object,org.eclipse.swt.widgets.Button> creator)
Allows the exchange the default
NewElementCreator. |
void |
setTableViewerCompositeBuilder(TableViewerCompositeBuilder builder)
Allows the exchange the default
TableViewerCompositeBuilder. |
void |
setTableViewerCreator(TableViewerCreator<? extends org.eclipse.jface.viewers.AbstractTableViewer> creator)
Allows the exchange the default
TableViewerCreator. |
void |
setViewerComparator(org.eclipse.jface.viewers.ViewerComparator comparator)
Allows the exchange the default
ViewerComparator. |
public void createCompositeLayout(org.eclipse.swt.widgets.Composite parent)
TableViewerCompositeBuildercomposites.createCompositeLayout in interface TableViewerCompositeBuilderparent - the parentpublic Optional<org.eclipse.swt.widgets.Label> getTitleLabel()
TableViewerCompositeBuildergetTitleLabel in interface TableViewerCompositeBuilderLabel if availablepublic Optional<List<org.eclipse.swt.widgets.Control>> getValidationControls()
TableViewerCompositeBuildergetValidationControls in interface TableViewerCompositeBuildercontrols.public Optional<org.eclipse.swt.widgets.Composite> getButtonComposite()
TableViewerCompositeBuildergetButtonComposite in interface TableViewerCompositeBuilderComposite for control-buttons.public org.eclipse.swt.widgets.Composite getViewerComposite()
TableViewerCompositeBuildergetViewerComposite in interface TableViewerCompositeBuilderComposite for the TableViewer.public org.eclipse.jface.viewers.AbstractTableViewer createTableViewer(org.eclipse.swt.widgets.Composite parent)
TableViewerCreatorAbstractTableViewer.createTableViewer in interface TableViewerCreator<org.eclipse.jface.viewers.AbstractTableViewer>parent - the parent Compositepublic Optional<org.eclipse.jface.viewers.ViewerComparator> getComparator()
TableViewerSWTCustomizationgetComparator in interface TableViewerSWTCustomizationViewerComparator which will be set on the viewer, if presentpublic org.eclipse.jface.viewers.IContentProvider createContentProvider()
TableViewerSWTCustomizationcreateContentProvider in interface TableViewerSWTCustomizationIContentProvider which will be set on the viewerpublic void fillButtonComposite(org.eclipse.swt.widgets.Composite buttonComposite,
org.eclipse.jface.viewers.AbstractTableViewer viewer)
ButtonBarBuilderComposite with all required buttons.fillButtonComposite in interface ButtonBarBuilderbuttonComposite - the button barviewer - the AbstractTableViewerpublic Object createNewElement(org.eclipse.swt.widgets.Button button)
ButtonBarBuildercreateNewElement in interface ButtonBarBuildercreateNewElement in interface NewElementCreator<Object,org.eclipse.swt.widgets.Button>button - the button which was pressedpublic List<TableViewerSWTCustomization.ColumnDescription> getColumns()
TableViewerSWTCustomizationgetColumns in interface TableViewerSWTCustomizationColumnDescriptionspublic void setTableViewerCompositeBuilder(TableViewerCompositeBuilder builder)
TableViewerCompositeBuilder.builder - the TableViewerCompositeBuilderpublic void setTableViewerCreator(TableViewerCreator<? extends org.eclipse.jface.viewers.AbstractTableViewer> creator)
TableViewerCreator.creator - the TableViewerCreatorpublic void setViewerComparator(org.eclipse.jface.viewers.ViewerComparator comparator)
ViewerComparator.comparator - the ViewerComparatorpublic void setContentProvider(org.eclipse.jface.viewers.IContentProvider provider)
IContentProvider.provider - the IContentProviderpublic void setButtonBarBuilder(ButtonBarBuilder builder)
ButtonBarBuilder.builder - the ButtonBarBuilderpublic void addColumn(TableViewerSWTCustomization.ColumnDescription columnDescription)
columnDescription - the
ColumnDescriptionpublic void setNewElementCreator(NewElementCreator<Object,org.eclipse.swt.widgets.Button> creator)
NewElementCreator. This may only be used if the
button bar builder was not exchanged.creator - the NewElementCreatorpublic void setDND(DNDProvider provider)
DNDProvider.provider - the DNDProviderpublic boolean hasDND()
DNDProviderhasDND in interface DNDProvidertrue if DND will be added, based on the other methods of this interface, or
false if DND should not be addedpublic int getDragOperations()
DNDProviderdrag support for the viewer.getDragOperations in interface DNDProviderpublic org.eclipse.swt.dnd.Transfer[] getDragTransferTypes()
DNDProviderdrag support for the viewer.getDragTransferTypes in interface DNDProvidertransfer typespublic org.eclipse.swt.dnd.DragSourceListener getDragListener(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
DNDProviderDragSourceListener used to setup the
drag support for the viewer.getDragListener in interface DNDProvidertableViewer - the AbstractTableViewerpublic int getDropOperations()
DNDProviderdrop support for the viewer.getDropOperations in interface DNDProviderpublic org.eclipse.swt.dnd.Transfer[] getDropTransferTypes()
DNDProviderdrop support for the viewer.getDropTransferTypes in interface DNDProvidertransfer typespublic org.eclipse.swt.dnd.DropTargetListener getDropListener(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
DNDProviderDragSourceListener used to setup the
drop support for the viewer.getDropListener in interface DNDProvidertableViewer - the AbstractTableViewerCopyright © 2017. All rights reserved.