Class ColorCompareWidget

  • All Implemented Interfaces:

    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
    • Field Summary

      • Fields inherited from class org.eclipse.swt.widgets.Control

    • Constructor Summary

      Constructor Description
      ColorCompareWidget​(org.eclipse.swt.widgets.Composite parent, int style, oldColorRGB)
      Creates a new ColorCompareWidget widget.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description getValue()
      Retrieves a Color object representing current value of the control.
      void setValue​( newColorRGB)
      Sets the value of the control to the color represented by the given Color 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
      • Methods inherited from interface

    • Constructor Detail

      • ColorCompareWidget

        public ColorCompareWidget​(org.eclipse.swt.widgets.Composite parent,
                                  int style,
        Creates a new ColorCompareWidget widget.
        oldColorRGB - the old color to compare against
        See Also:
        Canvas(Composite, int)
    • Method Detail

      • getValue

        public getValue()
        Description copied from interface: IColorPicker
        Retrieves a Color object representing current value of the control.
        Specified by:
        getValue in interface IColorPicker
      • setValue

        public void setValue​( newColorRGB)
        Description copied from interface: IColorPicker
        Sets the value of the control to the color represented by the given Color object.
        Specified by:
        setValue in interface IColorPicker