public class FXPaintSelectionDialog extends Dialog
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.Window.IExceptionHandler
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
CANCEL, OK, resizeHasOccurred
Constructor and Description |
---|
FXPaintSelectionDialog(Shell parent,
java.lang.String title)
Constructs a new
FXPaintSelectionDialog . |
Modifier and Type | Method and Description |
---|---|
protected void |
configureShell(Shell newShell) |
protected Control |
createAdvancedGradientFillControl(Composite parent)
Creates a
Composite that contains the advanced gradient picker. |
protected Control |
createColorFillControl(Composite parent)
Creates a
Composite that contains the simple color picker. |
protected Control |
createDialogArea(Composite parent) |
protected Control |
createSimpleGradientFillControl(Composite parent)
Creates a
Composite that contains the simple gradient picker. |
javafx.scene.paint.Paint |
getPaint()
Returns the currently selected
Paint . |
void |
setPaint(javafx.scene.paint.Paint paint)
Changes the currently selected
Paint to the given value. |
protected void |
updateImageLabel()
Re-renders the image that visualizes the currently selected
Paint
. |
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
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
public FXPaintSelectionDialog(Shell parent, java.lang.String title)
FXPaintSelectionDialog
.parent
- The parent Shell
.title
- The title for this dialog.protected void configureShell(Shell newShell)
configureShell
in class Window
protected Control createAdvancedGradientFillControl(Composite parent)
Composite
that contains the advanced gradient picker.protected Control createColorFillControl(Composite parent)
Composite
that contains the simple color picker.protected Control createDialogArea(Composite parent)
createDialogArea
in class Dialog
protected Control createSimpleGradientFillControl(Composite parent)
Composite
that contains the simple gradient picker.public javafx.scene.paint.Paint getPaint()
Paint
.Paint
.public void setPaint(javafx.scene.paint.Paint paint)
Paint
to the given value.paint
- The new value for the selected Paint
.protected void updateImageLabel()
Paint
.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.