public class FXFillSelectionDialog extends Dialog
FXFillSelectionDialog
is a Dialog
that allows to select a
JavaFX fill, i.e. a 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 |
---|
FXFillSelectionDialog(Shell parent,
java.lang.String title)
Constructs a new
FXFillSelectionDialog . |
Modifier and Type | Method and Description |
---|---|
protected void |
configureShell(Shell newShell) |
protected Composite |
createAdvancedGradientFillComposite(Composite optionsComposite)
Creates a
Composite that contains the advanced gradient picker. |
Composite |
createColorFillComposite(Composite optionsComposite)
Creates a
Composite that contains the simple color picker. |
protected Control |
createDialogArea(Composite parent) |
protected Composite |
createNoFillComposite(Composite optionsComposite)
Creates a
Composite that contains nothing to represent "no fill". |
protected static ImageData |
createPaintImage(int width,
int height,
javafx.scene.paint.Paint paint)
Creates a rectangular
Image to visualize the given Paint . |
protected Composite |
createSimpleGradientFillComposite(Composite optionsComposite)
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 FXFillSelectionDialog(Shell parent, java.lang.String title)
FXFillSelectionDialog
.parent
- The parent Shell
.title
- The title for this dialog.protected static ImageData createPaintImage(int width, int height, javafx.scene.paint.Paint paint)
Image
to visualize the given Paint
.protected void configureShell(Shell newShell)
configureShell
in class Window
protected Composite createAdvancedGradientFillComposite(Composite optionsComposite)
Composite
that contains the advanced gradient picker.public Composite createColorFillComposite(Composite optionsComposite)
Composite
that contains the simple color picker.protected Control createDialogArea(Composite parent)
createDialogArea
in class Dialog
protected Composite createNoFillComposite(Composite optionsComposite)
Composite
that contains nothing to represent "no fill".protected Composite createSimpleGradientFillComposite(Composite optionsComposite)
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 itemis AG and others. All rights reserved.