Class ColorAWTDialog

java.lang.Object
com.amalgamasimulation.desktop.binding.dialogs.ColorAWTDialog

public class ColorAWTDialog 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

    • ColorAWTDialog

      public ColorAWTDialog(org.eclipse.swt.widgets.Shell parentShell, Supplier<Color> getter, Consumer<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.