Class ColorDialog
- java.lang.Object
-
- org.eclipse.jface.window.Window
-
- org.eclipse.jface.dialogs.Dialog
-
- org.eclipse.jface.dialogs.TrayDialog
-
- org.eclipse.jface.dialogs.TitleAreaDialog
-
- com._1c.g5.v8.dt.md.ui.dialogs.color.ColorDialog
-
- All Implemented Interfaces:
IChooseValueDialog<Color>
,org.eclipse.jface.window.IShellProvider
public final class ColorDialog extends org.eclipse.jface.dialogs.TitleAreaDialog implements IChooseValueDialog<Color>
Represents dialog to pick a color from. It contains many controls to provide the means for it: lists of predefined colors, color wheel, controls for specifying color in RGB format, etc.
-
-
Field Summary
-
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
-
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
-
-
Constructor Summary
Constructors Constructor Description ColorDialog(org.eclipse.swt.widgets.Shell parentShell, Color initialColor, Map<String,Color> styleColors, Map<String,Color> webColors, Map<String,Color> systemColors, Map<String,Color> styleItemColors)
Constructor.ColorDialog(org.eclipse.swt.widgets.Shell parentShell, Map<String,Color> styleColors, Map<String,Color> webColors, Map<String,Color> systemColors, Map<String,Color> styleItemColors)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureShell(org.eclipse.swt.widgets.Shell shell)
void
create()
protected org.eclipse.swt.widgets.Control
createDialogArea(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.graphics.Point
getInitialSize()
Color
getValue()
Returns aColor
object that defines a color that user chose in this dialog.protected void
okPressed()
-
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
createContents, getErrorMessage, getMessage, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
-
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
-
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createButtonsForButtonBar, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
-
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.ui.dialog.IChooseValueDialog
open
-
-
-
-
Constructor Detail
-
ColorDialog
public ColorDialog(org.eclipse.swt.widgets.Shell parentShell, Map<String,Color> styleColors, Map<String,Color> webColors, Map<String,Color> systemColors, Map<String,Color> styleItemColors)
Constructor.- Parameters:
parentShell
- the parent shell, cannot benull
styleColors
- the style colors, cannot benull
webColors
- the web colors, cannot benull
systemColors
- the system colors, cannot benull
styleItemColors
- the style item colors, cannot benull
-
ColorDialog
public ColorDialog(org.eclipse.swt.widgets.Shell parentShell, Color initialColor, Map<String,Color> styleColors, Map<String,Color> webColors, Map<String,Color> systemColors, Map<String,Color> styleItemColors)
Constructor.- Parameters:
parentShell
- the parent shell, cannot benull
initialColor
- the initial color, can benull
styleColors
- the style colors, cannot benull
webColors
- the web colors, cannot benull
systemColors
- the system colors, cannot benull
styleItemColors
- the style item colors, cannot benull
-
-
Method Detail
-
create
public void create()
- Overrides:
create
in classorg.eclipse.jface.dialogs.Dialog
-
getValue
public Color getValue()
Returns aColor
object that defines a color that user chose in this dialog.- Specified by:
getValue
in interfaceIChooseValueDialog<Color>
-
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
- Overrides:
createDialogArea
in classorg.eclipse.jface.dialogs.TitleAreaDialog
-
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell shell)
- Overrides:
configureShell
in classorg.eclipse.jface.window.Window
-
getInitialSize
protected org.eclipse.swt.graphics.Point getInitialSize()
- Overrides:
getInitialSize
in classorg.eclipse.jface.dialogs.TitleAreaDialog
-
okPressed
protected void okPressed()
- Overrides:
okPressed
in classorg.eclipse.jface.dialogs.Dialog
-
-