photonui.Field Class
Base class for fields.
wEvents:
-
value-changed:
- description: called when the value was modified.
- callback: function(widget, value)
-
value-changed-final:
- description: called when the value is no more modified after continuous changes
- callback: function(widget, value)
-
keydown:
- description: called when a key is pressed.
- callback: function(widget, event)
-
keyup:
- description: called when a key is released.
- callback: function(widget, event)
-
keypress:
- description: called just before the insertion of a char.
- callback: function(widget, event)
-
selection-changed:
- description: called when the selection was changed.
- callback: function(widget, selectionStart, selectionEnd, selectedText, event)
Constructor
photonui.Field
()
Item Index
Methods
Methods
__debValueChangedFinal
()
private
Debounced version of __forValueChangedFinal.
__forValueChangedFinal
()
private
To be called indirectly through __debValueChangedFinal().
__onContextMenu
(
private
-
event
Called when the context menu should be displayed.
Parameters:
-
event
Object
__onLocaleChanged
()
private
Called when the locale is changed.
_bindEvent
(
private
-
id
-
element
-
evName
-
callback
-
[options]
Javascript event binding (for internal use).
Parameters:
_bindFieldEvents
()
private
Bind Field events.
_buildHtml
()
private
Build the widget HTML.
_callCallbacks
(
private
-
wEvent
-
params
Call all callbacks for the given wEvent.
NOTE: the first argument passed to the callback is the current widget.
NOTEĀ²: if the thisArg of the callback is null, this will be binded to the current widget.
_updateProperties
(
deprecated
private
-
properties
Force the update of the given properties.
This method is deprecated.
One should use '@photonui-update' abitbol's annotation on concerned properties.
Parameters:
-
properties
ArrayThe properties to update.
_visibilityChanged
(
private
-
visibility
Called when the visibility changes.
Parameters:
-
visibility
BooleanCurrent visibility state (otptional, defaut=this.visible)
addClass
(
-
className
Add a class to the outer HTML element of the widget.
Parameters:
-
className
StringThe class to add.
destroy
()
Destroy the widget.
hide
()
Hide the widget (equivalent to widget.visible = false).
registerCallback
(
-
id
-
wEvent
-
callback
-
thisArg
Register a callback for any PhotonUI/Widget event (called wEvent).
Callback signature:
function (Object(Base/Widget) [, arg1 [, arg2 [, ...]]])
removeClass
(
-
className
Remove a class from the outer HTML element of the widget.
Parameters:
-
className
StringThe class to remove.
show
()
Display the widget (equivalent to widget.visible = true).
unparent
()
Detache the widget from its parent.