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, ELLIPSIS
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred
-
Constructor Summary
ConstructorDescriptionFXPaintSelectionDialog
(Shell parent, String title) Constructs a newFXPaintSelectionDialog
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureShell
(Shell newShell) protected Control
Creates aComposite
that contains the advanced gradient picker.protected Control
createColorFillControl
(Composite parent) Creates aComposite
that contains the simple color picker.protected Control
createDialogArea
(Composite parent) protected Control
Creates aComposite
that contains the simple gradient picker.javafx.scene.paint.Paint
getPaint()
Returns the currently selectedPaint
.void
setPaint
(javafx.scene.paint.Paint paint) Changes the currently selectedPaint
to the given value.protected void
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 Details
-
FXPaintSelectionDialog
Constructs a newFXPaintSelectionDialog
.- Parameters:
parent
- The parentShell
.title
- The title for this dialog.
-
-
Method Details
-
configureShell
- Overrides:
configureShell
in classWindow
-
createAdvancedGradientFillControl
Creates aComposite
that contains the advanced gradient picker. -
createColorFillControl
Creates aComposite
that contains the simple color picker. -
createDialogArea
- Overrides:
createDialogArea
in classDialog
-
createSimpleGradientFillControl
Creates aComposite
that 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 selectedPaint
to the given value.- Parameters:
paint
- The new value for the selectedPaint
.
-
updateImageLabel
protected void updateImageLabel()Re-renders the image that visualizes the currently selectedPaint
.
-