Class MultiObjectsSelectionDialogEditingSupport.Builder<T,E,W,R extends IEditableColumn<T,E,R>>
java.lang.Object
com.amalgamasimulation.desktop.ui.builders.MultiObjectsSelectionDialogEditingSupport.Builder<T,E,W,R>
- Type Parameters:
T- type of row valueE- type of column value (cell value, only list elements)W- type of list(cell value) valueR- column type
- All Implemented Interfaces:
MultiObjectsSelectionDialogEditingSupport.ActionAfterPressOkBuilder<T,,E, W, R> MultiObjectsSelectionDialogEditingSupport.ColumnsBuilder<T,,E, W, R> MultiObjectsSelectionDialogEditingSupport.ElementsBuilder<T,,E, W, R> MultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,,E, W, R> MultiObjectsSelectionDialogEditingSupport.SelectedElementsBuilder<T,E, W, R>
- Enclosing class:
MultiObjectsSelectionDialogEditingSupport
public static class MultiObjectsSelectionDialogEditingSupport.Builder<T,E,W,R extends IEditableColumn<T,E,R>>
extends Object
implements MultiObjectsSelectionDialogEditingSupport.ElementsBuilder<T,E,W,R>, MultiObjectsSelectionDialogEditingSupport.SelectedElementsBuilder<T,E,W,R>, MultiObjectsSelectionDialogEditingSupport.ColumnsBuilder<T,E,W,R>, MultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E,W,R>, MultiObjectsSelectionDialogEditingSupport.ActionAfterPressOkBuilder<T,E,W,R>
A builder class to set up the properties of a multiply objects selection dialog editing support.
Instances of this class are created by
EditableColumn objects.
The build() method is used to actually set the properties to the column.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()This is the finalization method.buttonText(String text) Set text for button, if the image is set, the text is not shownSet function that returns a value that indicates whether the cell can be editedcolumns(BiConsumer<T, Table<W>> columns) Set function that create columns in table in dialogSet function that create columns in table in dialogstatic <T1,E1, W1, R1 extends IEditableColumn<T1, E1, R1>>
MultiObjectsSelectionDialogEditingSupport.ElementsBuilder<T1, E1, W1, R1> create(R1 columnDescriptor) dialogSubTitle(String subTitle) Set sub title for the dialogdialogTitle(String title) Set title for the dialogSet the elements to be shown in the selection dialoghandler(BiConsumer<T, List<W>> listener) Set function that will be executed after losing focus on the combo box editor or after pressing the Enter buttonicon(org.eclipse.swt.graphics.Image image) Set image for button, if the image is set, the text is not shownselectedElements(Function<T, List<W>> selectedElementsExtractor) selectedElements(List<W> elements) Set the list of items that will be marked as selected in the selection dialog
-
Field Details
-
columnDescriptor
-
editingSupport
-
-
Constructor Details
-
Builder
-
-
Method Details
-
create
public static <T1,E1, MultiObjectsSelectionDialogEditingSupport.ElementsBuilder<T1,W1, R1 extends IEditableColumn<T1, E1, R1>> E1, createW1, R1> (R1 columnDescriptor) -
elements
public MultiObjectsSelectionDialogEditingSupport.SelectedElementsBuilder<T,E, elementsW, R> (org.eclipse.core.databinding.observable.list.IObservableList<W> elements) Description copied from interface:MultiObjectsSelectionDialogEditingSupport.ElementsBuilderSet the elements to be shown in the selection dialog- Specified by:
elementsin interfaceMultiObjectsSelectionDialogEditingSupport.ElementsBuilder<T,E, W, R extends IEditableColumn<T, E, R>> - Parameters:
elements- list of elements- Returns:
- builder object
-
selectedElements
public MultiObjectsSelectionDialogEditingSupport.ColumnsBuilder<T,E, selectedElementsW, R> (List<W> elements) Description copied from interface:MultiObjectsSelectionDialogEditingSupport.SelectedElementsBuilderSet the list of items that will be marked as selected in the selection dialog- Specified by:
selectedElementsin interfaceMultiObjectsSelectionDialogEditingSupport.SelectedElementsBuilder<T,E, W, R extends IEditableColumn<T, E, R>> - Parameters:
elements- list of selected elements- Returns:
- builder object
-
columns
public MultiObjectsSelectionDialogEditingSupport.ActionAfterPressOkBuilder<T,E, columnsW, R> (Consumer<Table<W>> columns) Description copied from interface:MultiObjectsSelectionDialogEditingSupport.ColumnsBuilderSet function that create columns in table in dialog- Specified by:
columnsin interfaceMultiObjectsSelectionDialogEditingSupport.ColumnsBuilder<T,E, W, R extends IEditableColumn<T, E, R>> - Parameters:
columns-- Returns:
- builder object
-
columns
public MultiObjectsSelectionDialogEditingSupport.ActionAfterPressOkBuilder<T,E, columnsW, R> (BiConsumer<T, Table<W>> columns) Description copied from interface:MultiObjectsSelectionDialogEditingSupport.ColumnsBuilderSet function that create columns in table in dialog- Specified by:
columnsin interfaceMultiObjectsSelectionDialogEditingSupport.ColumnsBuilder<T,E, W, R extends IEditableColumn<T, E, R>> - Parameters:
columns-- Returns:
- builder object
-
handler
public MultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E, handlerW, R> (BiConsumer<T, List<W>> listener) Description copied from interface:MultiObjectsSelectionDialogEditingSupport.ActionAfterPressOkBuilderSet function that will be executed after losing focus on the combo box editor or after pressing the Enter button- Specified by:
handlerin interfaceMultiObjectsSelectionDialogEditingSupport.ActionAfterPressOkBuilder<T,E, W, R extends IEditableColumn<T, E, R>> - Parameters:
listener- function to be executed- Returns:
- builder object
-
dialogTitle
Description copied from interface:MultiObjectsSelectionDialogEditingSupport.FinalBuilderSet title for the dialog- Specified by:
dialogTitlein interfaceMultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E, W, R extends IEditableColumn<T, E, R>> - Parameters:
title- dialog title- Returns:
- builder object
-
dialogSubTitle
public MultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E, dialogSubTitleW, R> (String subTitle) Description copied from interface:MultiObjectsSelectionDialogEditingSupport.FinalBuilderSet sub title for the dialog- Specified by:
dialogSubTitlein interfaceMultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E, W, R extends IEditableColumn<T, E, R>> - Parameters:
subTitle- dialog sub title- Returns:
- builder object
-
icon
public MultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E, iconW, R> (org.eclipse.swt.graphics.Image image) Description copied from interface:MultiObjectsSelectionDialogEditingSupport.FinalBuilderSet image for button, if the image is set, the text is not shown- Specified by:
iconin interfaceMultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E, W, R extends IEditableColumn<T, E, R>> - Parameters:
image-- Returns:
- builder object
-
buttonText
Description copied from interface:MultiObjectsSelectionDialogEditingSupport.FinalBuilderSet text for button, if the image is set, the text is not shown- Specified by:
buttonTextin interfaceMultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E, W, R extends IEditableColumn<T, E, R>> - Parameters:
text-- Returns:
- builder object
-
canEdit
public MultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E, canEditW, R> (Predicate<T> canEdit) Description copied from interface:MultiObjectsSelectionDialogEditingSupport.FinalBuilderSet function that returns a value that indicates whether the cell can be edited- Specified by:
canEditin interfaceMultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E, W, R extends IEditableColumn<T, E, R>> - Parameters:
canEdit-- Returns:
- builder object
-
build
Description copied from interface:MultiObjectsSelectionDialogEditingSupport.FinalBuilderThis is the finalization method. Call this method to install the auto-complete combobox editing support on a table column.- Specified by:
buildin interfaceMultiObjectsSelectionDialogEditingSupport.FinalBuilder<T,E, W, R extends IEditableColumn<T, E, R>>
-
selectedElements
public MultiObjectsSelectionDialogEditingSupport.ColumnsBuilder<T,E, selectedElementsW, R> (Function<T, List<W>> selectedElementsExtractor) - Specified by:
selectedElementsin interfaceMultiObjectsSelectionDialogEditingSupport.SelectedElementsBuilder<T,E, W, R extends IEditableColumn<T, E, R>>
-