Package org.eclipse.gef.fx.jface
Class FXPaintSelectionDialog
- java.lang.Object
-
- org.eclipse.jface.window.Window
-
- org.eclipse.jface.dialogs.Dialog
-
- org.eclipse.gef.fx.jface.FXPaintSelectionDialog
-
- All Implemented Interfaces:
IShellProvider
public class FXPaintSelectionDialog extends Dialog
TheFXPaintSelectionDialogis aDialogthat allows to select a JavaFXPaint. It provides a simple color picker, a simple gradient picker, and an advanced gradient picker.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
Window.IExceptionHandler
-
-
Field Summary
-
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
-
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred
-
-
Constructor Summary
Constructors Constructor Description FXPaintSelectionDialog(Shell parent, java.lang.String title)Constructs a newFXPaintSelectionDialog.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigureShell(Shell newShell)protected ControlcreateAdvancedGradientFillControl(Composite parent)Creates aCompositethat contains the advanced gradient picker.protected ControlcreateColorFillControl(Composite parent)Creates aCompositethat contains the simple color picker.protected ControlcreateDialogArea(Composite parent)protected ControlcreateSimpleGradientFillControl(Composite parent)Creates aCompositethat contains the simple gradient picker.javafx.scene.paint.PaintgetPaint()Returns the currently selectedPaint.voidsetPaint(javafx.scene.paint.Paint paint)Changes the currently selectedPaintto the given value.protected voidupdateImageLabel()Re-renders the image that visualizes the currently selectedPaint.-
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
-
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
-
-
-
Constructor Detail
-
FXPaintSelectionDialog
public FXPaintSelectionDialog(Shell parent, java.lang.String title)
Constructs a newFXPaintSelectionDialog.- Parameters:
parent- The parentShell.title- The title for this dialog.
-
-
Method Detail
-
configureShell
protected void configureShell(Shell newShell)
- Overrides:
configureShellin classWindow
-
createAdvancedGradientFillControl
protected Control createAdvancedGradientFillControl(Composite parent)
Creates aCompositethat contains the advanced gradient picker.
-
createColorFillControl
protected Control createColorFillControl(Composite parent)
Creates aCompositethat contains the simple color picker.
-
createDialogArea
protected Control createDialogArea(Composite parent)
- Overrides:
createDialogAreain classDialog
-
createSimpleGradientFillControl
protected Control createSimpleGradientFillControl(Composite parent)
Creates aCompositethat contains the simple gradient picker.
-
getPaint
public javafx.scene.paint.Paint getPaint()
Returns the currently selectedPaint.- Returns:
- The currently selected
Paint.
-
setPaint
public void setPaint(javafx.scene.paint.Paint paint)
Changes the currently selectedPaintto the given value.- Parameters:
paint- The new value for the selectedPaint.
-
updateImageLabel
protected void updateImageLabel()
Re-renders the image that visualizes the currently selectedPaint.
-
-