PHP Класс Prado\Web\UI\WebControls\TColorPicker

TColorPicker displays a text box for color input purpose. Next to the textbox there's a button filled with the current chosen color. Users can write a color name directly in the text box as an hex triplet (also known as HTML notation, eg: #FF00FF). Alternatively, if the ShowColorPicker property is enabled (it is by default), users can click the button to have a color picker UI appear. A color chan be chosen directly by clicking on the color picker. TColorPicker has three different color picker UI Modes: # Simple - Grid with 12 simple colors. # Basic - Grid with the most common 70 colors. This is the default mode. # Full - Full-featured color picker. The CssClass property can be used to override the CSS class name for the color picker panel. The ColorStyle property sets the packages styles available. E.g. default. If the Mode property is set to Full, the color picker panel will display an "Ok" and "Cancel" buttons. You can customize the button labels setting the OKButtonText and CancelButtonText properties.
С версии: 3.0
Наследование: extends TTextBox
Показать файл Открыть проект

Открытые методы

Метод Описание
getCancelButtonText ( ) : string
getClientSide ( ) : TColorPickerClientSide
getColorPickerStyle ( ) : string
getMode ( ) : TColorPickerMode
getOKButtonText ( ) : string
getShowColorPicker ( ) : boolean
onPreRender ( $param ) Publish the color picker Css asset files.
renderEndTag ( $writer ) Renders additional body content.
setCancelButtonText ( $value )
setColorPickerStyle ( $value )
setMode ( $value )
setOKButtonText ( $value )
setShowColorPicker ( $value ) Sets whether to pop up the color picker when the button is clicked.

Защищенные методы

Метод Описание
createClientSide ( ) : TColorPickerClientSide
getAssetUrl ( $file = '' ) : string
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing postback for this control.
getPostBackOptions ( ) : array Get javascript color picker options.
publishColorPickerAssets ( ) Publish the color picker assets.

Описание методов

createClientSide() защищенный Метод

protected createClientSide ( ) : TColorPickerClientSide
Результат TColorPickerClientSide javascript validator event options.

getAssetUrl() защищенный Метод

protected getAssetUrl ( $file = '' ) : string
Результат string asset file url.

getCancelButtonText() публичный Метод

public getCancelButtonText ( ) : string
Результат string text for the color picker Cancel button. Default is "Cancel".

getClientClassName() защищенный Метод

This method overrides the parent implementation.
protected getClientClassName ( ) : string
Результат string the javascript class name

getClientSide() публичный Метод

public getClientSide ( ) : TColorPickerClientSide
Результат TColorPickerClientSide javascript event options.

getColorPickerStyle() публичный Метод

public getColorPickerStyle ( ) : string
Результат string current color picker style

getMode() публичный Метод

public getMode ( ) : TColorPickerMode
Результат TColorPickerMode current color picker UI mode. Defaults to TColorPickerMode::Basic.

getOKButtonText() публичный Метод

public getOKButtonText ( ) : string
Результат string text for the color picker OK button. Default is "OK".

getPostBackOptions() защищенный Метод

Get javascript color picker options.
protected getPostBackOptions ( ) : array
Результат array color picker client-side options

getShowColorPicker() публичный Метод

public getShowColorPicker ( ) : boolean
Результат boolean whether the color picker should pop up when the button is clicked.

onPreRender() публичный Метод

Publish the color picker Css asset files.
public onPreRender ( $param )

publishColorPickerAssets() защищенный Метод

Publish the color picker assets.
protected publishColorPickerAssets ( )

renderEndTag() публичный Метод

This method overrides parent implementation by adding additional color picker button.
public renderEndTag ( $writer )

setCancelButtonText() публичный Метод

public setCancelButtonText ( $value )

setColorPickerStyle() публичный Метод

public setColorPickerStyle ( $value )

setMode() публичный Метод

public setMode ( $value )

setOKButtonText() публичный Метод

public setOKButtonText ( $value )

setShowColorPicker() публичный Метод

Sets whether to pop up the color picker when the button is clicked.
public setShowColorPicker ( $value )