Class: ColorEditor

Kekule.PropertyEditor. ColorEditor

new ColorEditor()

A property editor that use a color drop down text box to edit color property value.
Source:

Extends

Methods

createEditWidget(parentWidget) → {Kekule.Widget.BaseWidget}

Create a custom edit widget and put old property value in it.
Parameters:
Name Type Description
parentWidget Kekule.Widget.BaseWidget
Inherited From:
Source:
Returns:
Type
Kekule.Widget.BaseWidget

getAttributes() → {Int}

Returns attribute of editor. Different attribute causes different behavior and outlook in object inspector. Descendants may override this method.
Inherited From:
Source:
Returns:
Type
Int

getDescription() → {String}

Returns property description. Usually propInfo.description. Descendants seldom need to override this method.
Inherited From:
Source:
Returns:
Type
String

getEditWidget() → {Kekule.Widget.BaseWidget}

Returns currently created edit widget.
Inherited From:
Source:
Returns:
Type
Kekule.Widget.BaseWidget

getHint() → {String}

Returns property hint to display in object inspector. Usually this value is same with getTitle(). Descendants seldom need to override this method.
Inherited From:
Source:
Returns:
Type
String

getSubPropertyEditors(propScopes) → {Array}

Returns child property editors. This method will be used when SUBPROPS flag in property editor's attribute. In object inspector, rows will be expanded according to child property editors. Descendants may override this method.
Parameters:
Name Type Description
propScopes Array
Inherited From:
Source:
Returns:
Type
Array

getTitle() → {String}

Returns property title to display in object inspector. Usually propInfo.title or propInfo.name. Descendants seldom need to override this method.
Inherited From:
Source:
Returns:
Type
String

getValue() → {Variant}

Returns property value of all objects. Descendants may override this method.
Inherited From:
Source:
Returns:
Type
Variant

getValueText() → {String}

Returns display text of property value. Descendants may override this method.
Inherited From:
Source:
Returns:
Type
String

hasSubPropertyEditors() → {Bool}

Whether the editor has sub property editors.
Inherited From:
Source:
Returns:
Type
Bool

isReadOnly() → {Bool}

Whether the editor is a read only one.
Inherited From:
Source:
Returns:
Type
Bool

notifyChildEditorValueChange(fieldName, fieldValue)

This method is called by child property editor (such as enum item editor) to notify the child property has been changed.
Parameters:
Name Type Description
fieldName
fieldValue
Inherited From:
Source:

saveEditValue() → {Variant}

Save edit value in edit widget back to property. If the original value is not changed, false should be returned. Else true should be returned.
Inherited From:
Source:
Returns:
Type
Variant

setValue(value)

Save property value back to objects.
Parameters:
Name Type Description
value Variant
Inherited From:
Source:

setValueText(valueText)

Convert string into proper type of value and feedback to properties of objects. Descendants may override this method.
Parameters:
Name Type Description
valueText String
Inherited From:
Source: