public class DefaultTableControlSWTCustomization extends Object implements TableViewerSWTCustomization
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.
|
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<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 |
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)
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 org.eclipse.jface.viewers.AbstractTableViewer createTableViewer(org.eclipse.swt.widgets.Composite parent)
TableViewerCreator
AbstractTableViewer
.createTableViewer
in interface TableViewerCreator
parent
- the parent Composite
public Optional<org.eclipse.jface.viewers.ViewerComparator> getComparator()
TableViewerSWTCustomization
getComparator
in interface TableViewerSWTCustomization
ViewerComparator
which will be set on the viewer, if presentpublic org.eclipse.jface.viewers.IContentProvider createContentProvider()
TableViewerSWTCustomization
createContentProvider
in interface TableViewerSWTCustomization
IContentProvider
which will be set on the viewerpublic void fillButtonComposite(org.eclipse.swt.widgets.Composite buttonComposite, org.eclipse.jface.viewers.AbstractTableViewer viewer)
ButtonBarBuilder
Composite
with all required buttons.fillButtonComposite
in interface ButtonBarBuilder
buttonComposite
- the button barviewer
- the AbstractTableViewer
public Object createNewElement(org.eclipse.swt.widgets.Button button)
ButtonBarBuilder
createNewElement
in interface ButtonBarBuilder
button
- the button which was pressedpublic TableConfiguration getTableConfiguration()
TableViewerSWTCustomization
getTableConfiguration
in interface TableViewerSWTCustomization
TableConfiguration
public List<ColumnConfiguration> getColumnConfigurations()
TableViewerSWTCustomization
getColumnConfigurations
in interface TableViewerSWTCustomization
ColumnConfiguration
public void setTableViewerCompositeBuilder(TableViewerCompositeBuilder builder)
TableViewerCompositeBuilder
.builder
- the TableViewerCompositeBuilder
public void setTableViewerCreator(TableViewerCreator<? extends org.eclipse.jface.viewers.AbstractTableViewer> 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 setButtonBarBuilder(ButtonBarBuilder builder)
ButtonBarBuilder
.builder
- the ButtonBarBuilder
public void configureTable(TableConfiguration tableConfiguration)
tableConfiguration
- the TableConfiguration
public void addColumn(ColumnConfiguration columnConfiguration)
columnConfiguration
- the
ColumnDescription
public 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 NewElementCreator
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 © 2018. All rights reserved.