T
- the concrete table viewer implementation to usepublic class DefaultTableControlSWTCustomization<T extends org.eclipse.jface.viewers.AbstractTableViewer> extends Object implements TableViewerSWTCustomization<T>
TableViewerSWTCustomization
.Constructor and Description |
---|
DefaultTableControlSWTCustomization() |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(ColumnConfiguration columnConfiguration)
Adds a column to the table.
|
void |
configureTable(TableConfiguration tableConfiguration)
Sets the table configuration.
|
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.
|
T |
createTableViewer(org.eclipse.swt.widgets.Composite parent)
Creates the
AbstractTableViewer . |
Optional<ActionBar<T>> |
getActionBar()
Get the action bar instance (if it exists).
|
Optional<ActionConfiguration> |
getActionConfiguration()
Returns the action configuration which will be used to register defined key bindings on the viewer.
|
Optional<org.eclipse.swt.widgets.Composite> |
getButtonComposite()
|
List<ColumnConfiguration> |
getColumnConfigurations()
Returns the column configurations which will be used to configure 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. |
TableConfiguration |
getTableConfiguration()
Returns the table configuration which will be used to configure the table instance.
|
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 |
setActionBar(ActionBar<T> actionBar)
Allows the customize the
ActionBar . |
void |
setActionConfiguration(ActionConfiguration actionConfiguration)
Allows to customize the
ActionConfiguration . |
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 |
setTableViewerCompositeBuilder(TableViewerCompositeBuilder builder)
Allows the exchange the default
TableViewerCompositeBuilder . |
void |
setTableViewerCreator(TableViewerCreator<T> 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)
TableViewerCompositeBuilder
composites
.createCompositeLayout
in interface TableViewerCompositeBuilder
parent
- the parentpublic Optional<org.eclipse.swt.widgets.Label> getTitleLabel()
TableViewerCompositeBuilder
getTitleLabel
in interface TableViewerCompositeBuilder
Label
if availablepublic Optional<List<org.eclipse.swt.widgets.Control>> getValidationControls()
TableViewerCompositeBuilder
getValidationControls
in interface TableViewerCompositeBuilder
controls
.public Optional<org.eclipse.swt.widgets.Composite> getButtonComposite()
TableViewerCompositeBuilder
getButtonComposite
in interface TableViewerCompositeBuilder
Composite
for control-buttons
.public org.eclipse.swt.widgets.Composite getViewerComposite()
TableViewerCompositeBuilder
getViewerComposite
in interface TableViewerCompositeBuilder
Composite
for the TableViewer
.public T createTableViewer(org.eclipse.swt.widgets.Composite parent)
TableViewerCreator
AbstractTableViewer
.createTableViewer
in interface TableViewerCreator<T extends org.eclipse.jface.viewers.AbstractTableViewer>
parent
- the parent Composite
public Optional<org.eclipse.jface.viewers.ViewerComparator> getComparator()
TableViewerSWTCustomization
getComparator
in interface TableViewerSWTCustomization<T extends org.eclipse.jface.viewers.AbstractTableViewer>
ViewerComparator
which will be set on the viewer, if presentpublic org.eclipse.jface.viewers.IContentProvider createContentProvider()
TableViewerSWTCustomization
createContentProvider
in interface TableViewerSWTCustomization<T extends org.eclipse.jface.viewers.AbstractTableViewer>
IContentProvider
which will be set on the viewerpublic TableConfiguration getTableConfiguration()
TableViewerSWTCustomization
getTableConfiguration
in interface TableViewerSWTCustomization<T extends org.eclipse.jface.viewers.AbstractTableViewer>
TableConfiguration
public List<ColumnConfiguration> getColumnConfigurations()
TableViewerSWTCustomization
getColumnConfigurations
in interface TableViewerSWTCustomization<T extends org.eclipse.jface.viewers.AbstractTableViewer>
ColumnConfiguration
public void setTableViewerCompositeBuilder(TableViewerCompositeBuilder builder)
TableViewerCompositeBuilder
.builder
- the TableViewerCompositeBuilder
public void setTableViewerCreator(TableViewerCreator<T> creator)
TableViewerCreator
.creator
- the TableViewerCreator
public void setViewerComparator(org.eclipse.jface.viewers.ViewerComparator comparator)
ViewerComparator
.comparator
- the ViewerComparator
public void setContentProvider(org.eclipse.jface.viewers.IContentProvider provider)
IContentProvider
.provider
- the IContentProvider
public void setActionBar(ActionBar<T> actionBar)
ActionBar
.actionBar
- the ActionBar
public Optional<ActionBar<T>> getActionBar()
getActionBar
in interface ActionBarProvider<T extends org.eclipse.jface.viewers.AbstractTableViewer>
public void configureTable(TableConfiguration tableConfiguration)
tableConfiguration
- the TableConfiguration
public void addColumn(ColumnConfiguration columnConfiguration)
columnConfiguration
- the
ColumnDescription
public Optional<ActionConfiguration> getActionConfiguration()
ActionConfigurationProvider
getActionConfiguration
in interface ActionConfigurationProvider
ActionConfiguration
, if anypublic void setActionConfiguration(ActionConfiguration actionConfiguration)
ActionConfiguration
.actionConfiguration
- The ActionConfiguration
getActionConfiguration()
public void setDND(DNDProvider provider)
DNDProvider
.provider
- the DNDProvider
public boolean hasDND()
DNDProvider
hasDND
in interface DNDProvider
true
if DND will be added, based on the other methods of this interface, or
false
if DND should not be addedpublic int getDragOperations()
DNDProvider
drag support
for the viewer.getDragOperations
in interface DNDProvider
public org.eclipse.swt.dnd.Transfer[] getDragTransferTypes()
DNDProvider
drag support
for the viewer.getDragTransferTypes
in interface DNDProvider
transfer types
public org.eclipse.swt.dnd.DragSourceListener getDragListener(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
DNDProvider
DragSourceListener
used to setup the
drag support
for the viewer.getDragListener
in interface DNDProvider
tableViewer
- the AbstractTableViewerpublic int getDropOperations()
DNDProvider
drop support
for the viewer.getDropOperations
in interface DNDProvider
public org.eclipse.swt.dnd.Transfer[] getDropTransferTypes()
DNDProvider
drop support
for the viewer.getDropTransferTypes
in interface DNDProvider
transfer types
public org.eclipse.swt.dnd.DropTargetListener getDropListener(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
DNDProvider
DragSourceListener
used to setup the
drop support
for the viewer.getDropListener
in interface DNDProvider
tableViewer
- the AbstractTableViewerCopyright © 2019. All rights reserved.