org.eclipse.nebula.widgets.nattable.style.editor
Class ColorPicker

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by org.eclipse.swt.widgets.Canvas
                      extended by org.eclipse.swt.custom.CLabel
                          extended by org.eclipse.nebula.widgets.nattable.style.editor.ColorPicker
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class ColorPicker
extends org.eclipse.swt.custom.CLabel

A button that displays a solid block of color and allows the user to pick a color. The user can double click on the button in order to change the selected color which also changes the background color of the button.


Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
view
 
Constructor Summary
ColorPicker(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.graphics.Color originalColor)
           
 
Method Summary
 void dispose()
           
 org.eclipse.swt.graphics.Color getSelectedColor()
           
 void setSelectedColor(org.eclipse.swt.graphics.Color backgroundColor)
          Set the current selected color that will be displayed by the picker.
 
Methods inherited from class org.eclipse.swt.custom.CLabel
computeSize, getAlignment, getImage, getStyle, getText, getToolTipText, setAlignment, setBackground, setBackground, setBackground, setBackground, setFont, setImage, setText, setToolTipText, shortenText
 
Methods inherited from class org.eclipse.swt.widgets.Canvas
drawBackground, getCaret, getIME, scroll, setCaret, setIME
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColorPicker

public ColorPicker(org.eclipse.swt.widgets.Composite parent,
                   org.eclipse.swt.graphics.Color originalColor)
Method Detail

getSelectedColor

public org.eclipse.swt.graphics.Color getSelectedColor()
Returns:
the Color most recently selected by the user. Note that it is the responsibility of the client to dispose this resource

setSelectedColor

public void setSelectedColor(org.eclipse.swt.graphics.Color backgroundColor)
Set the current selected color that will be displayed by the picker. Note that this class is not responsible for destroying the given Color object. It does not take ownership. Instead it will create its own internal copy of the given Color resource.

Parameters:
backgroundColor -

dispose

public void dispose()
Overrides:
dispose in class org.eclipse.swt.widgets.Widget


Copyright © 2015. All rights reserved.