Class ColorCompareWidget
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- org.eclipse.swt.widgets.Canvas
-
- com._1c.g5.v8.dt.common.ui.widgets.color.ColorCompareWidget
-
- All Implemented Interfaces:
IColorPicker
,org.eclipse.swt.graphics.Drawable
public class ColorCompareWidget extends org.eclipse.swt.widgets.Canvas implements IColorPicker
This widget serves as a tool for comparing two colors: the old one and the new one. It contains two rectangles one near the other; the right one depicts the old color, the left one shows the new color.
The control is created with the old color value, and initially both left and right rectangles show the old color. Calling
-
-
Constructor Summary
Constructors Constructor Description ColorCompareWidget(org.eclipse.swt.widgets.Composite parent, int style, org.eclipse.swt.graphics.RGB oldColorRGB)
Creates a newColorCompareWidget
widget.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.graphics.RGB
getValue()
Retrieves aColor
object representing current value of the control.void
setValue(org.eclipse.swt.graphics.RGB newColorRGB)
Sets the value of the control to the color represented by the givenColor
object.-
Methods inherited from class org.eclipse.swt.widgets.Canvas
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
-
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
-
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
-
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
-
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
-
-
-
-
Constructor Detail
-
ColorCompareWidget
public ColorCompareWidget(org.eclipse.swt.widgets.Composite parent, int style, org.eclipse.swt.graphics.RGB oldColorRGB)
Creates a newColorCompareWidget
widget.- Parameters:
oldColorRGB
- the old color to compare against- See Also:
Canvas(Composite, int)
-
-
Method Detail
-
getValue
public org.eclipse.swt.graphics.RGB getValue()
Description copied from interface:IColorPicker
Retrieves aColor
object representing current value of the control.- Specified by:
getValue
in interfaceIColorPicker
-
setValue
public void setValue(org.eclipse.swt.graphics.RGB newColorRGB)
Description copied from interface:IColorPicker
Sets the value of the control to the color represented by the givenColor
object.- Specified by:
setValue
in interfaceIColorPicker
-
-