Kanzi 3.9.10
NodeComponent Class Reference

NodeComponent is the base class for all node components. More...

Inheritance diagram for NodeComponent:
[legend]

Classes

interface  DirectorInterface
 

Public Member Functions

void close ()
 Close the object, and release native resources.
 
String getName ()
 Gets the value of #NameProperty.
 
Node getNode ()
 Returns the node the node component is attached to or null if node component is not attached to a node.
 
NodeComponentState getState ()
 Gets the state of node component indicating if component is attached to a node, detached from any node or in process of attaching/detaching.
 
boolean isAttached ()
 Indicates whether node component is attached to a node.
 
boolean isAttaching ()
 Indicates whether node component is in the process of attaching to a node.
 
boolean isAttachingOrAttached ()
 Indicates whether node component is in the process of attaching to a node or already attached.
 
boolean isDetached ()
 Indicates whether node component is detached from any node.
 
boolean isDetaching ()
 Indicates whether node component currently detaching from the node.
 
boolean isDetachingOrDetached ()
 Indicates whether node component is in the process of detaching from the node or already detached.
 
void setName (String value)
 Sets the value of #NameProperty.
 
- Public Member Functions inherited from KanziObject
boolean equals (Object object)
 
Domain getDomain ()
 Returns the domain the object belongs to.
 
Metaclass getDynamicMetaclass ()
 Returns the metaclass of the dynamic type of the object.
 
long getNative ()
 Gets a pointer to the backing C++ instance.
 
TDataType getOptionalProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type, but does not use the default value if there are no inputs to the property value.
 
TDataType getProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type.
 
int hashCode ()
 
boolean hasValue (PropertyType< TDataType > propertyType)
 Evaluates whether there are any inputs into the property value.
 
boolean isStale ()
 Test if the object is stale i.e.
 
void removeLocalValue (PropertyType< TDataType > propertyType)
 Removes the local value associated with the property.
 
void setProperty (PropertyType< TDataType > propertyType, TDataType value)
 Sets the local value of a property type.
 
ObjectRef< TTypetryCreateObjectRef (Class< TType > clazz)
 Tries to create an owning ObjectRef instance to this KanziObject.
 

Static Public Attributes

static final Metaclass metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from KanziObject
static final Metaclass metaclass = new AbstractMetaclass("Kanzi.Object")
 The Metaclass for the class.
 

Protected Member Functions

 NodeComponent (Domain domain, long handle, Metaclass metaclass)
 Wraps a given native Node Component.
 
void attachOverride ()
 Called when the Trigger is attached to a node.
 
void detachOverride ()
 Called when a Trigger is detached from a Node.
 
void initialize ()
 Initializes the Node Component.
 
void removeNodeComponentMessageFilter (Node.MessageSubscriptionToken token)
 Removes message handler added via com.rightware.kanzi.NodeComponent#addNodeComponentMessageHandler function.
 

Static Protected Member Functions

static< Derived extends NodeComponent > ObjectRef< DerivedcreateDerived (Domain domain, String name, Metaclass metaclass)
 Creates a derived class instance.
 

Additional Inherited Members

- Public Attributes inherited from NodeComponentMetadata
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.NodeComponent")
 Metaclass for NodeComponent.
 
DynamicPropertyType< String > NameProperty
 Name.
 

Detailed Description

NodeComponent is the base class for all node components.

Node component is an isolated piece of logic which can be attached to any node in order to add additional functionality to it. Examples of node component could be Trigger which performs specific actions when certain conditions are met or AnimationPlayer which animates specific properties of the node it is attached to and its child nodes.

Node component can only be attached to a single node at a time. After node component is detached from one node, it can be attached to any other node.

Node component starts to perform its logic after it is attached to a certain node. After node component is detached from its node it becomes inactive and stops to perform its logic.

Constructor & Destructor Documentation

◆ NodeComponent()

NodeComponent ( Domain domain,
long handle,
Metaclass metaclass )
protected

Wraps a given native Node Component.

Called by KanziObject.connectObject(long) when connecting to a native node component.

Parameters
domainUI Domain where this node belongs.
handleNative object that is backing this node component.
metaclassMetaclass data for this node component.

Member Function Documentation

◆ attachOverride()

void attachOverride ( )
protected

Called when the Trigger is attached to a node.

Reimplemented in Trigger.

◆ close()

void close ( )

Close the object, and release native resources.

Reimplemented in ActivityCodeBehind, CodeBehind, and Trigger.

◆ createDerived()

static< Derived extends NodeComponent > ObjectRef< Derived > createDerived ( Domain domain,
String name,
Metaclass metaclass )
staticprotected

Creates a derived class instance.

Call this method as part of the create method for a derived class.

Parameters
domainUI Domain where this node component belongs.
nameName of the node component
metaclassMetaclass data of the node component.
Returns
An ObjectRef that holds the created instance.

Reimplemented in ActivityCodeBehind, CodeBehind, and Trigger.

◆ detachOverride()

void detachOverride ( )
protected

Called when a Trigger is detached from a Node.

Reimplemented in Trigger.

◆ getName()

String getName ( )

Gets the value of #NameProperty.

Returns
Current value.

◆ getNode()

Node getNode ( )

Returns the node the node component is attached to or null if node component is not attached to a node.

Returns
Node the node component is attached to.

◆ getState()

NodeComponentState getState ( )

Gets the state of node component indicating if component is attached to a node, detached from any node or in process of attaching/detaching.

Returns
State of node component.

◆ initialize()

void initialize ( )
protected

Initializes the Node Component.

Reimplemented in ActivityCodeBehind, CodeBehind, and Trigger.

◆ isAttached()

boolean isAttached ( )

Indicates whether node component is attached to a node.

Returns
true if node component is attached, false otherwise.

◆ isAttaching()

boolean isAttaching ( )

Indicates whether node component is in the process of attaching to a node.

Returns
true if node component is in the process of attaching, false otherwise.

◆ isAttachingOrAttached()

boolean isAttachingOrAttached ( )

Indicates whether node component is in the process of attaching to a node or already attached.

Returns
true if node component is in the process of attaching or already attached, false otherwise.

◆ isDetached()

boolean isDetached ( )

Indicates whether node component is detached from any node.

Returns
true if node component is detached, false otherwise.

◆ isDetaching()

boolean isDetaching ( )

Indicates whether node component currently detaching from the node.

Returns
true if node component currently detaching, false otherwise.

◆ isDetachingOrDetached()

boolean isDetachingOrDetached ( )

Indicates whether node component is in the process of detaching from the node or already detached.

Returns
true if node component is in the process of detaching or already detached, false otherwise.

◆ removeNodeComponentMessageFilter()

void removeNodeComponentMessageFilter ( Node.MessageSubscriptionToken token)
protected

Removes message handler added via com.rightware.kanzi.NodeComponent#addNodeComponentMessageHandler function.

Parameters
tokenSubscription token of message handler to remove.

◆ setName()

void setName ( String value)

Sets the value of #NameProperty.

Parameters
valueNew value.

Member Data Documentation

◆ metaclass

final Metaclass metaclass
static
Initial value:
=
com.rightware.kanzi.metadata.NodeComponentMetadata.metaclass

The Metaclass for the class.