Class Index | File Index

Classes


Class ColorButton


Defined in: ColorButton.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ColorButton(preferences, observer)
A component to select a color through a dialog, after clicking a button.
Method Summary
Method Attributes Method Name and Description
 
Returns the color displayed by this button.
 
Returns the title of color dialog displayed when this button is pressed.
 
setColor(color)
Sets the color displayed by this button.
 
setColorDialogTitle(colorDialogTitle)
Sets the title of color dialog displayed when this button is pressed.
 
setEnabled(enabled)
Enables or disables this component.
Class Detail
ColorButton(preferences, observer)
A component to select a color through a dialog, after clicking a button.
Author: Louis Grignon, Emmanuel Puybaret.
Parameters:
{UserPreferences} preferences
{{ colorChanged: function(number) }} observer Optional
the observer that will be notified when the color of the button changed. It may define colorChanged called with selected color, as ARGB int, when a color is selected
Method Detail
{number} getColor()
Returns the color displayed by this button.
Returns:
{number} the RGB code of the color of this button or null.

getColorDialogTitle()
Returns the title of color dialog displayed when this button is pressed.

setColor(color)
Sets the color displayed by this button.
Parameters:
{number} color
RGB code of the color or null.

setColorDialogTitle(colorDialogTitle)
Sets the title of color dialog displayed when this button is pressed.
Parameters:
{string} colorDialogTitle

setEnabled(enabled)
Enables or disables this component.
Parameters:
{boolean} enabled

© Copyright 2024 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Thu Apr 04 2024 17:30:25 GMT+0200 (CEST)