## Class TColorPicker

Description

TColorPicker class.

Be aware, this control is EXPERIMENTAL and is not stablized yet.

- since: 3.0
- version: $Id: TColorPicker.php 1398 2006-09-08 19:31:03Z xue $
- author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /Web/UI/WebControls/TColorPicker.php (line 23)

    TComponent
       |
       --TApplicationComponent
          |
          --TControl
             |
             --TWebControl
                |
                --TTextBox
                   |
                   --TColorPicker

Method Summary
void addAttributesToRender (THtmlWriter $writer)
string getCancelButtonText ()
string getClientClassName ()
array getColorPickerOptions ()
string getColorPickerStyle ()
TColorPickerMode getMode ()
string getOKButtonText ()
boolean getShowColorPicker ()
void onPreRender (mixed $param)
array publishColorPickerImageAssets ()
string publishColorPickerStyle ()
void render (THtmlWriter $writer)
void setCancelButtonText (string $value)
void setColorPickerStyle (string $value)
void setMode (TColorPickerMode $value)
void setOKButtonText (string $value)
void setShowColorPicker (boolean $value)
Methods
addAttributesToRender (line 195)

Registers the javascript code to initialize the color picker.

Must use "Event.OnLoad" to initialize the color picker when the full page is loaded, otherwise IE will throw an error.

- access: protected

void addAttributesToRender (THtmlWriter $writer)

- THtmlWriter $writer: writer

Redefinition of:

TTextBox::addAttributesToRender()
  Adds attribute name-value pairs to renderer.

getCancelButtonText (line 93)

- return: text for the color picker Cancel button. Default is "Cancel".
- access: public

string getCancelButtonText ()
getClientClassName (line 239)

Gets the name of the javascript class responsible for performing postback for this control.

This method overrides the parent implementation.

- return: the javascript class name
- access: protected

string getClientClassName ()

Redefinition of:

TTextBox::getClientClassName()
  Gets the name of the javascript class responsible for performing postback for this control.

getColorPickerOptions (line 110)

Get javascript color picker options.

- return: color picker client-side options
- access: protected

array getColorPickerOptions ()
getColorPickerStyle (line 69)

- return: current color picker style
- access: public

string getColorPickerStyle ()
getMode (line 53)

- return: current color picker UI mode. Defaults to TColorPickerMode::Basic.
- access: public

TColorPickerMode getMode ()
getOKButtonText (line 77)

- return: text for the color picker OK button. Default is "OK".
- access: public

string getOKButtonText ()
getShowColorPicker (line 28)

- return: whether the color picker should pop up when the button is clicked.
- access: public

boolean getShowColorPicker ()
onPreRender (line 133)

Publish the color picker Css asset files.

- access: public

void onPreRender (mixed $param)

Redefinition of:

TControl::onPreRender()
  This method is invoked when the control enters 'OnPreRender' stage.

publishColorPickerImageAssets (line 162)

Publish the color picker image assets.

- return: list of image URLs
- access: protected

array publishColorPickerImageAssets ()
publishColorPickerStyle (line 143)

Publish the color picker style Css asset file.

- return: Css file url.
- access: protected

string publishColorPickerStyle ()
render (line 213)

Renders body content.

This method overrides parent implementation by adding additional color picker button.

- access: public

void render (THtmlWriter $writer)

- THtmlWriter $writer: writer

Redefinition of:

TWebControl::render()
  Renders the control.

setCancelButtonText (line 101)

- access: public

void setCancelButtonText (string $value)

- string $value: text for the color picker Cancel button

setColorPickerStyle (line 61)

- access: public

void setColorPickerStyle (string $value)

- string $value: set the color picker style

setMode (line 45)

- access: public

void setMode (TColorPickerMode $value)

- TColorPickerMode $value: color picker UI mode

setOKButtonText (line 85)

- access: public

void setOKButtonText (string $value)

- string $value: text for the color picker OK button

setShowColorPicker (line 37)

Sets whether to pop up the color picker when the button is clicked.

- access: public

void setShowColorPicker (boolean $value)

- boolean $value: whether to show the color picker popup

#### Inherited Methods

Inherited From TTextBox

> TTextBox::addAttributesToRender()
> TTextBox::getAutoCompleteType()
> TTextBox::getAutoPostBack()
> TTextBox::getAutoTrim()
> TTextBox::getCausesValidation()
> TTextBox::getClientClassName()
> TTextBox::getColumns()
> TTextBox::getEnableClientScript()
> TTextBox::getMaxLength()
> TTextBox::getPostBackOptions()
> TTextBox::getReadOnly()
> TTextBox::getRows()
> TTextBox::getSafeText()
> TTextBox::getSafeTextParser()
> TTextBox::getTagName()
> TTextBox::getText()
> TTextBox::getTextMode()
> TTextBox::getValidationGroup()
> TTextBox::getValidationPropertyValue()
> TTextBox::getWrap()
> TTextBox::loadPostData()
> TTextBox::onTextChanged()
> TTextBox::raisePostDataChangedEvent()
> TTextBox::renderClientControlScript()
> TTextBox::renderContents()
> TTextBox::setAutoCompleteType()
> TTextBox::setAutoPostBack()
> TTextBox::setAutoTrim()
> TTextBox::setCausesValidation()
> TTextBox::setColumns()
> TTextBox::setEnableClientScript()
> TTextBox::setMaxLength()
> TTextBox::setReadOnly()
> TTextBox::setRows()
> TTextBox::setText()
> TTextBox::setTextMode()
> TTextBox::setValidationGroup()
> TTextBox::setWrap()

Inherited From TWebControl

> TWebControl::addAttributesToRender()
> TWebControl::copyBaseAttributes()
> TWebControl::createStyle()
> TWebControl::getAccessKey()
> TWebControl::getBackColor()
> TWebControl::getBorderColor()
> TWebControl::getBorderStyle()
> TWebControl::getBorderWidth()
> TWebControl::getCssClass()
> TWebControl::getFont()
> TWebControl::getForeColor()
> TWebControl::getHasStyle()
> TWebControl::getHeight()
> TWebControl::getStyle()
> TWebControl::getTabIndex()
> TWebControl::getTagName()
> TWebControl::getToolTip()
> TWebControl::getWidth()
> TWebControl::render()
> TWebControl::renderBeginTag()
> TWebControl::renderContents()
> TWebControl::renderEndTag()
> TWebControl::setAccessKey()
> TWebControl::setBackColor()
> TWebControl::setBorderColor()
> TWebControl::setBorderStyle()
> TWebControl::setBorderWidth()
> TWebControl::setCssClass()
> TWebControl::setForeColor()
> TWebControl::setHeight()
> TWebControl::setStyle()
> TWebControl::setTabIndex()
> TWebControl::setToolTip()
> TWebControl::setWidth()

Inherited From TControl

> TControl::__construct()
> TControl::addedControl()
> TControl::addParsedObject()
> TControl::addToPostDataLoader()
> TControl::applyStyleSheetSkin()
> TControl::autoBindProperty()
> TControl::autoDataBindProperties()
> TControl::bindProperty()
> TControl::broadcastEvent()
> TControl::bubbleEvent()
> TControl::clearChildState()
> TControl::clearControlState()
> TControl::clearNamingContainer()
> TControl::clearViewState()
> TControl::createChildControls()
> TControl::createControlCollection()
> TControl::dataBind()
> TControl::dataBindChildren()
> TControl::dataBindProperties()
> TControl::ensureChildControls()
> TControl::findControl()
> TControl::findControlsByID()
> TControl::findControlsByType()
> TControl::focus()
> TControl::getAdapter()
> TControl::getAllowChildControls()
> TControl::getAttribute()
> TControl::getAttributes()
> TControl::getChildControlsCreated()
> TControl::getClientID()
> TControl::getControls()
> TControl::getControlStage()
> TControl::getControlState()
> TControl::getCustomData()
> TControl::getEnabled()
> TControl::getEnableTheming()
> TControl::getEnableViewState()
> TControl::getHasAdapter()
> TControl::getHasAttributes()
> TControl::getHasChildInitialized()
> TControl::getHasControls()
> TControl::getHasInitialized()
> TControl::getHasLoaded()
> TControl::getHasLoadedPostData()
> TControl::getHasPreRendered()
> TControl::getID()
> TControl::getNamingContainer()
> TControl::getPage()
> TControl::getParent()
> TControl::getRegisteredObject()
> TControl::getSkinID()
> TControl::getSourceTemplateControl()
> TControl::getTemplateControl()
> TControl::getUniqueID()
> TControl::getViewState()
> TControl::getVisible()
> TControl::hasAttribute()
> TControl::initRecursive()
> TControl::isDescendentOf()
> TControl::isObjectRegistered()
> TControl::loadRecursive()
> TControl::loadState()
> TControl::loadStateRecursive()
> TControl::onDataBinding()
> TControl::onInit()
> TControl::onLoad()
> TControl::onPreRender()
> TControl::onUnload()
> TControl::preRenderRecursive()
> TControl::raiseBubbleEvent()
> TControl::registerObject()
> TControl::removeAttribute()
> TControl::removedControl()
> TControl::render()
> TControl::renderChildren()
> TControl::renderControl()
> TControl::saveState()
> TControl::saveStateRecursive()
> TControl::setAdapter()
> TControl::setAttribute()
> TControl::setChildControlsCreated()
> TControl::setControlStage()
> TControl::setControlState()
> TControl::setCustomData()
> TControl::setEnabled()
> TControl::setEnableTheming()
> TControl::setEnableViewState()
> TControl::setID()
> TControl::setPage()
> TControl::setSkinID()
> TControl::setTemplateControl()
> TControl::setViewState()
> TControl::setVisible()
> TControl::traverseChildControls()
> TControl::unbindProperty()
> TControl::unloadRecursive()
> TControl::unregisterObject()
> TControl::__get()

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Class Constants

#### Inherited Constants

Inherited from TTextBox

> TTextBox::DEFAULT_COLUMNS
> TTextBox::DEFAULT_ROWS

Inherited from TControl

> TControl::AUTOMATIC_ID_PREFIX
> TControl::CLIENT_ID_SEPARATOR
> TControl::CS_CHILD_INITIALIZED
> TControl::CS_CONSTRUCTED
> TControl::CS_INITIALIZED
> TControl::CS_LOADED
> TControl::CS_PRERENDERED
> TControl::CS_STATE_LOADED
> TControl::ID_FORMAT
> TControl::ID_SEPARATOR
> TControl::IS_CHILD_CREATED
> TControl::IS_CREATING_CHILD
> TControl::IS_DISABLE_THEMING
> TControl::IS_DISABLE_VIEWSTATE
> TControl::IS_ID_SET
> TControl::IS_SKIN_APPLIED
> TControl::IS_STYLESHEET_APPLIED
> TControl::RF_ADAPTER
> TControl::RF_AUTO_BINDINGS
> TControl::RF_CHILD_STATE
> TControl::RF_CONTROLS
> TControl::RF_CONTROLSTATE
> TControl::RF_DATA_BINDINGS
> TControl::RF_EVENTS
> TControl::RF_NAMED_CONTROLS
> TControl::RF_NAMED_CONTROLS_ID
> TControl::RF_NAMED_OBJECTS
> TControl::RF_SKIN_ID

Documentation generated on Sun, 14 Jan 2007 21:41:34 -0500 by phpDocumentor 1.3.0RC4