Class ContainerColorAWTDialog<T>
java.lang.Object
com.amalgamasimulation.desktop.binding.dialogs.ContainerColorAWTDialog<T>
- Type Parameters:
T- the type of object in which the color is stored
- Direct Known Subclasses:
EMFColorAWTDialog
This class creates and opens a color editing dialog.
- Author:
- Ionov Ivan
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionContainerColorAWTDialog(org.eclipse.swt.widgets.Shell parentShell, T owner, Function<T, Color> getter, BiConsumer<T, Color> handler) -
Method Summary
-
Field Details
-
parentShell
protected org.eclipse.swt.widgets.Shell parentShell
-
-
Constructor Details
-
ContainerColorAWTDialog
-
-
Method Details
-
getColor
Get the value to set to the dialog Subclasses should overwrite.- Returns:
- the value shown
-
doAction
Sets the new value Subclasses should overwrite.- Parameters:
newColor- the new color
-
open
public org.eclipse.swt.graphics.RGB open()Opens a dialog with the color editor.- Returns:
- RGB object with data about edit color.
-