Zimlet JavaScript API Reference - DwtColorPicker

Class DwtColorPicker


Extends DwtControl.

Instances of this class may be used with DwtMenu to create a DwtColorPicker menu. Clicking on a color cell generates a DwtSelectionEvent the detail attribute of which contains the color string associated the cell on which the user clicked

Defined in: DwtColorPicker.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtColorPicker(params)
Creates a color picker displaying "Web safe" colors.
Method Summary
Method Attributes Method Name and Description
 
Adds a listener to be notified when the button is pressed.
 
Gets the input color.
 
Removes a selection listener.
Methods borrowed from class DwtControl:
addClassName, addControlListener, addDisposeListener, addListener, appendElement, blur, clearContent, clearHandler, condClassName, delClassName, dispose, focus, getBounds, getClassName, getContent, getCursor, getData, getDragBox, getDragSource, getDropTarget, getEnabled, getFocusElement, getH, getHtmlElement, getHTMLElId, getInsetBounds, getInsets, getLocation, getMargins, getOpacity, getOuterSize, getPosition, getScrollContainer, getScrollStyle, getSize, getTabGroupMember, getTooltipBase, getToolTipContent, getVisibility, getVisible, getW, getX, getXW, getY, getYH, getZIndex, hasFocus, isAlertShown, isDisposed, isInitialized, isListenerRegistered, notifyListeners, preventContextMenu, preventSelection, removeAllListeners, removeControlListener, removeDisposeListener, removeListener, reparent, reparentHtmlElement, replaceElement, setBounds, setClassName, setContent, setCursor, setData, setDisplay, setDisplayState, setDragBox, setDragSource, setDropTarget, setEnabled, setEventPropagation, setFocusElement, setHandler, setHtmlElementId, setLocation, setOpacity, setPosition, setScrollStyle, setSize, setToolTipContent, setVisibility, setVisible, setZIndex, showAlert, zShow
Class Detail
DwtColorPicker(params)
Creates a color picker displaying "Web safe" colors.
Author: Ross Dargahi.
Parameters:
{hash} params
a hash of parameters
{DwtComposite} params.parent
the parent widget
{string} params.className
a CSS class
{constant} params.posStyle
the positioning style
{boolean} params.hideNoFill
True to hide the no-fill/use-default option
{string} params.noFillLabel
the no-fill label
{boolean} params.allowColorInput
if true, allow a text field to allow user to input their customized RGB value
{string} params.defaultColor
Default color.
Method Detail
addSelectionListener(listener)
Adds a listener to be notified when the button is pressed.
Parameters:
{AjxListener} listener
a listener

{string} getInputColor()
Gets the input color.
Returns:
{string} the color (in hex) from the input color field

removeSelectionListener(listener)
Removes a selection listener.
Parameters:
{AjxListener} listener
a listener

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:27 GMT-0400 (EDT)