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
The
FXPaintSelectionDialog is a Dialog that allows to select
a JavaFX Paint. 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, ELLIPSISFields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred -
Constructor Summary
ConstructorsConstructorDescriptionFXPaintSelectionDialog(Shell parent, String title) Constructs a newFXPaintSelectionDialog. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureShell(Shell newShell) protected ControlCreates aCompositethat contains the advanced gradient picker.protected ControlcreateColorFillControl(Composite parent) Creates aCompositethat contains the simple color picker.protected ControlcreateDialogArea(Composite parent) protected ControlCreates 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 voidRe-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, shortenTextMethods 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 Details
-
FXPaintSelectionDialog
Constructs a newFXPaintSelectionDialog.- Parameters:
parent- The parentShell.title- The title for this dialog.
-
-
Method Details
-
configureShell
- Overrides:
configureShellin classWindow
-
createAdvancedGradientFillControl
Creates aCompositethat contains the advanced gradient picker. -
createColorFillControl
Creates aCompositethat contains the simple color picker. -
createDialogArea
- Overrides:
createDialogAreain classDialog
-
createSimpleGradientFillControl
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.
-