-
appendChild(obj) → {Int}
-
Append obj to children list. If obj already inside, nothing will be done.
Parameters:
Name |
Type |
Description |
obj |
Object
|
|
- Source:
Returns:
Index of obj after appending.
-
Type
-
Int
-
appendItem(item)
-
Append an attrib-object pair item in group.
Parameters:
Name |
Type |
Description |
item |
Hash
|
|
- Source:
-
appendLinkedConnector(connector)
-
Link a connector to this node.
Parameters:
- Inherited From:
- Source:
-
appendObj(obj, attributes)
-
Add object to group. If object already in group, nothing will be done.
Parameters:
- Source:
-
clearStructureFlags()
-
Clear all flags of structure object that should be changed when structure is changed.
Descendants may override this method.
- Inherited From:
- Source:
-
compareStructure(targetObj, options) → {Int}
-
Explicit set compare method to chem structure and compare to targetObj.
Parameters:
- Inherited From:
- Source:
Returns:
-
Type
-
Int
-
equalStructure(targetObj, options) → {Bool}
-
Check if this object and targetObj has equivalent chem structure.
Parameters:
- Inherited From:
- Source:
Returns:
-
Type
-
Bool
-
getAllObjs() → {Array}
-
Returns an array containing the child objects (without attribute).
- Source:
Returns:
-
Type
-
Array
-
getChildAt(index) → {Variant}
-
Get child object at index.
Parameters:
Name |
Type |
Description |
index |
Int
|
|
- Source:
Returns:
-
Type
-
Variant
-
getChildCount() → {Int}
-
Get count of child objects in root.
- Source:
Returns:
-
Type
-
Int
-
-
Get connector between this object and another object.
Parameters:
- Inherited From:
- Source:
Returns:
-
Type
-
Kekule.ChemStructureConnector
-
-
Returns self or child object that can directly linked to a connector.
For atom or other simple chem objetc, this function should just returns self,
for structure fragment, this function need to returns an anchor node.
- Inherited From:
- Source:
Returns:
-
Type
-
Kekule.ChemStructureObject
-
getItemAt(index) → {Object}
-
Get item at index of items array.
Parameters:
Name |
Type |
Description |
index |
Int
|
|
- Source:
Returns:
-
Type
-
Object
-
getItemCount() → {Int}
-
Get count of items in group.
- Source:
Returns:
-
Type
-
Int
-
-
Get linked connector object at index.
Parameters:
Name |
Type |
Description |
index |
Int
|
|
- Inherited From:
- Source:
Returns:
-
Type
-
Kekule.ChemStructureConnector
-
getLinkedConnectorCount() → {Int}
-
Return count of linkedConnectors.
- Inherited From:
- Source:
Returns:
-
Type
-
Int
-
getLinkedHydrogenAtoms() → {Array}
-
Returns linked hydrogen atoms.
- Inherited From:
- Source:
Returns:
-
Type
-
Array
-
getLinkedNonHydrogenConnectors() → {Array}
-
Returns connectors that connected to a non hydrogen node.
- Inherited From:
- Source:
Returns:
-
Type
-
Array
-
getLinkedNonHydrogenObjs() → {Array}
-
Returns linked objects except hydrogen atoms.
- Inherited From:
- Source:
Returns:
-
Type
-
Array
-
getLinkedObjsOnConnector() → {Array}
-
Returns other objects connected to this one through connector.
- Inherited From:
- Source:
Returns:
-
Type
-
Array
-
getNextSiblingOfChild(child) → {Hash}
-
Returns next sibling item to child item or object.
Parameters:
Name |
Type |
Description |
child |
Variant
|
Item or object. |
- Source:
Returns:
-
Type
-
Hash
-
getObjAt(index) → {Object}
-
Get object stored in item at index.
Parameters:
Name |
Type |
Description |
index |
Int
|
|
- Source:
Returns:
-
Type
-
Object
-
-
- Inherited From:
- Source:
Returns:
-
Type
-
Kekule.StructureFragment
-
-
- Inherited From:
- Source:
Returns:
-
Type
-
Kekule.StructureFragment
-
hasObj(obj) → {Bool}
-
Check if obj exists in items.
Parameters:
Name |
Type |
Description |
obj |
Object
|
|
- Source:
Returns:
-
Type
-
Bool
-
indexOfChild(obj) → {Int}
-
Get the index of obj (object or object-attribute item) in children list of root.
Parameters:
Name |
Type |
Description |
obj |
Variant
|
|
- Source:
Returns:
Index of obj or -1 when not found.
-
Type
-
Int
-
indexOfItem(item) → {Int}
-
Get index of item in items array.
Parameters:
Name |
Type |
Description |
item |
Object
|
|
- Source:
Returns:
Index of item in array. If not found, returns -1.
-
Type
-
Int
-
indexOfLinkedConnector(connector) → {Int}
-
Returns index of connector connected to node.
Parameters:
- Inherited From:
- Source:
Returns:
-
Type
-
Int
-
indexOfObj(obj) → {Int}
-
Get index of obj in items array.
Parameters:
Name |
Type |
Description |
obj |
Object
|
|
- Source:
Returns:
Index of object in array. If not found, returns -1.
-
Type
-
Int
-
insertBefore(item, refItem)
-
Insert attrib-object pair item before refChild in group.
If refChild is null or does not exists, item will be append to tail of list.
Parameters:
Name |
Type |
Description |
item |
Hash
|
|
refItem |
Hash
|
|
- Source:
-
insertChild(obj, index) → {Int}
-
Insert obj to index of children list. If obj already inside, its position will be changed.
Parameters:
Name |
Type |
Description |
obj |
Object
|
|
index |
Object
|
|
- Source:
Returns:
Index of obj after inserting.
-
Type
-
Int
-
insertItem(item, index)
-
Insert an attrib-object pair item in group at index.
Parameters:
Name |
Type |
Description |
item |
Hash
|
|
index |
Int
|
|
- Source:
-
insertObj(item, index, attributes)
-
Insert an attrib-object pair item in group at index.
Parameters:
Name |
Type |
Description |
item |
Hash
|
|
index |
Int
|
|
attributes |
Hash
|
Additional attributes of this object. Can be null. |
- Source:
-
notifyItemsChanged()
-
Notify Kekule.ChemStructureObjectGroup#objs property has been changed
- Source:
-
removeChild(obj)
-
Remove an object or attrib-object pair item from group.
Parameters:
Name |
Type |
Description |
obj |
Variant
|
|
- Source:
-
removeChildAt(index) → {Variant}
-
Remove a child at index.
Parameters:
Name |
Type |
Description |
index |
Int
|
|
- Source:
Returns:
Child object removed.
-
Type
-
Variant
-
removeItem(obj)
-
Remove an attrib-object pair item in group.
Parameters:
- Source:
-
removeItemAt(index)
-
Remove an attrib-object pair item at index in group.
Parameters:
Name |
Type |
Description |
index |
Int
|
|
- Source:
-
removeLinkedConnector(connector)
-
Remove a connector in linkedContainer.
Parameters:
- Inherited From:
- Source:
-
removeLinkedConnectorAt(index)
-
Remove connector at index of linkedConnectors.
Parameters:
Name |
Type |
Description |
index |
Int
|
|
- Inherited From:
- Source:
-
removeObj(obj)
-
Remove an object in group.
Parameters:
- Source:
-
removeObjAt(index)
-
Remove object at index in group.
Parameters:
Name |
Type |
Description |
index |
Int
|
|
- Source:
-
removeThisFromLinkedConnector()
-
Remove this node from all linked connectors.
Ths method should be called before a object is removed from a structure.
- Inherited From:
- Source:
-
setAttributesAt(index, attributes)
-
Set additional fields of item at index.
Parameters:
Name |
Type |
Description |
index |
Object
|
|
attributes |
Object
|
|
- Source: