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

public class ContainerColorAWTDialog<T> extends Object
This class creates and opens a color editing dialog.
Author:
Ionov Ivan
  • Field Details

    • parentShell

      protected org.eclipse.swt.widgets.Shell parentShell
  • Constructor Details

    • ContainerColorAWTDialog

      public ContainerColorAWTDialog(org.eclipse.swt.widgets.Shell parentShell, T owner, Function<T,Color> getter, BiConsumer<T,Color> handler)
  • Method Details

    • getColor

      protected Color getColor()
      Get the value to set to the dialog Subclasses should overwrite.
      Returns:
      the value shown
    • doAction

      protected void doAction(Color newColor)
      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.