Kanzi 3.9.10
Node Class Reference

Base class for Kanzi nodes. More...

Inheritance diagram for Node:
[legend]

Classes

interface  MessageSubscriptionFunction
 Defines the message handler invoked when a node receives a message it listens to. More...
 
class  MessageSubscriptionToken
 Message subscription token that identifies a message subscription. More...
 

Public Member Functions

ObjectRef< TResourceTypeacquireResource (ResourceID resourceId) throws ObjectNotFoundException
 Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary.
 
ResourceDictionary acquireResourceDictionary ()
 Gets a resource dictionary of a node.
 
ResourceManager.AcquireTask acquireResourcesAsync (ResourceID resourceId, ResourceManager.AcquireTask.Callback callback)
 Posts an asynchronous task to acquire a resource.
 
boolean addAbstractChild (Node child)
 Adds a node as child of this node.
 
void addAnonymousResource (Resource resource)
 Adds anonymous resource (such as style) for object node resources.
 
void addInputManipulator (InputManipulator inputManipulator)
 Attaches an input manipulator to the node.
 
MessageSubscriptionToken addMessageFilter (MessageType< MessageArgumentsType > messageType, MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction)
 Adds a message filter where the filter is a function.
 
MessageSubscriptionToken addMessageHandler (MessageType< MessageArgumentsType > messageType, MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction)
 Adds a message handler where the handler is a function.
 
MessageSubscriptionToken addMessageHandler (MessageType< MessageArgumentsType > messageType, MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction, Node messageSourceFilter)
 Adds a message handler where the handler is a function.
 
void addNodeComponent (NodeComponent component)
 Transfers the ownership of a node component to an object node.
 
void addNodeComponentWithOwner (NodeComponent component, KanziObject owner)
 Transfers the ownership of a node component to an object node and sets the owner of the node component.
 
void addResource (ResourceID resourceId, String resourceUrl)
 Adds a resource manager resource to an object node.
 
void addResourceDictionary (ResourceDictionary resourceDictionary)
 Adds a nested resource dictionary to the resource dictionary of a node.
 
MessageSubscriptionToken addTunnelingMessageFilter (MessageType< MessageArgumentsType > messageType, MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction)
 Adds a message filter where the filter is a function.
 
MessageSubscriptionToken addTunnelingMessageHandler (MessageType< MessageArgumentsType > messageType, MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction, Node messageSourceFilter)
 Adds a message handler where the handler is a function and you explicitly define the accepted source.
 
void attachRecursive ()
 Attaches a node and its children recursively.
 
void clearChangeFlag (PropertyTypeChangeFlag flag)
 Clears a change flag.
 
boolean containsResource (ResourceID resourceId)
 Returns if object node resource dictionary contains the resource with given ID.
 
void detachRecursive ()
 Detaches a node and its children recursively.
 
void dispatchMessage (MessageType< MessageArgumentsType > messageType, MessageArgumentsType arguments)
 Dispatches a message from this node with specified arguments.
 
String findResourceUrl (ResourceID resourceId)
 Tries to find Resource URL for Resource ID from this node.
 
Node getAbstractChild (int index)
 Returns node at given child index.
 
int getAbstractChildCount ()
 Returns number of child nodes.
 
int getAbstractChildIndex (Node node)
 Returns index of given node in list of child nodes.
 
float getActualDepth ()
 Gets the value of #ActualDepthProperty.
 
float getActualHeight ()
 Gets the value of #ActualHeightProperty.
 
float getActualWidth ()
 Gets the value of #ActualWidthProperty.
 
float getDepth ()
 Gets the value of #DepthProperty.
 
Vector2 getDepthMargin ()
 Gets the value of #DepthMarginProperty.
 
float getHeight ()
 Gets the value of #HeightProperty.
 
Vector2 getHorizontalMargin ()
 Gets the value of #HorizontalMarginProperty.
 
String getLocale ()
 Gets the value of #LocaleProperty.
 
String getName ()
 Gets the value of #NameProperty.
 
float getOpacity ()
 Gets the value of #OpacityProperty.
 
Node getParent ()
 Gets parent of this node.
 
String getPath ()
 Gets the value of #PathProperty.
 
ResourceDictionary getResourceDictionary ()
 If a node has a resource dictionary, returns the resource dictionary of that node.
 
Resource getStateManager ()
 Gets the value of #StateManagerProperty.
 
Resource getStyle ()
 Gets the value of #StyleProperty.
 
Vector2 getVerticalMargin ()
 Gets the value of #VerticalMarginProperty.
 
float getWidth ()
 Gets the value of #WidthProperty.
 
void invalidateArrange ()
 Invalidates arrange for the node.
 
void invalidateDraw ()
 Invalidates draw flag for the node.
 
void invalidateFinalTransform ()
 Invalidates final transform for node.
 
void invalidateMeasure ()
 Invalidates measure for the node.
 
void invalidateRender ()
 Invalidates render for the node.
 
boolean isAnyChangeFlagSet (EnumSet< PropertyTypeChangeFlag > flags)
 Checks if any of a set of change flags is set.
 
boolean isAnyChildChangeFlagSet (EnumSet< PropertyTypeChangeFlag > flags)
 Checks if any of a set of change flags is set on a child.
 
boolean isAttached ()
 Checks if node is attached to ui tree.
 
boolean isAttaching ()
 Checks if node is in the process of attaching to ui tree.
 
boolean isChangeFlagSet (PropertyTypeChangeFlag flag)
 Checks if a change flag is set.
 
boolean isChildChangeFlagSet (PropertyTypeChangeFlag flag)
 Checks if a change flag is set on a child.
 
boolean isClipChildren ()
 Gets the value of #ClipChildrenProperty.
 
boolean isDetaching ()
 Checks if node is in the process of getting detached from ui tree.
 
boolean isEffectivelyEnabled ()
 Returns whether a node and its ancestor nodes are enabled.
 
boolean isEffectivelyFocusable ()
 Returns whether a node and its ancestor focus scope nodes are focusable.
 
boolean isEffectivelyVisible ()
 Returns whether a node and its ancestor nodes are visible.
 
boolean isEnabled ()
 Gets the value of #EnabledProperty.
 
boolean isFocusable ()
 Gets the value of the #FocusableProperty.
 
boolean isFocused ()
 Sets whether a node is an active focus node and can receive keyboard messages.
 
boolean isHitTestable ()
 Gets the value of #HitTestableProperty.
 
boolean isHitTestableContainer ()
 Gets the value of #HitTestableContainerProperty.
 
boolean isHover ()
 Gets the value of #HoverProperty.
 
boolean isInitialized ()
 Checks if initialize() has been called.
 
boolean isInvalidArrange ()
 Check if the node needs arrange.
 
boolean isInvalidDraw ()
 Tells if node draw flag is invalid.
 
boolean isInvalidFinalTransform ()
 Tells if final transform flag is invalid for node.
 
boolean isInvalidMeasure ()
 Check if the node needs measure.
 
boolean isInvalidRender ()
 Returns if node render flag is invalid.
 
boolean isNamed (String name)
 Checks if node has a given name.
 
boolean isVisible ()
 Gets the value of #VisibleProperty.
 
Iterable< NodeComponentiterateNodeComponents ()
 Gets an Iterable object used to iterate the Node Components.
 
lookupNode (String path)
 Returns a node of specified type by looking it up with specified path or alias.
 
NodeComponent lookupNodeComponentByName (String name)
 Look up a Node Component by Name.
 
KanziObject lookupObject (String path)
 Returns a KanziObject by looking it up with specified path or alias.
 
void notifyResourceDictionaryModified ()
 Forces the re-evaluation of resource IDs in a node tree.
 
boolean removeAbstractChild (Node child)
 Removes child node from this node.
 
void removeAnonymousResource (Resource resource)
 Removes anonymous resource from object node resources.
 
void removeBinding (AbstractBindingRuntime bindingRuntime)
 Removes a binding runtime added earlier.
 
void removeBindingsWithOwner (KanziObject owner)
 Removes binding runtimes owned by a KanziObject.
 
void removeInputManipulator (InputManipulator inputManipulator)
 Detaches an input manipulator from the node.
 
void removeMessageHandler (MessageSubscriptionToken token)
 Removes a message subscription.
 
void removeNodeComponent (NodeComponent component)
 Removes the ownership of a node component from an object node.
 
void removeNodeComponentWithOwner (KanziObject owner)
 Removes all node component bindings with the specified owner.
 
void removeResource (ResourceID resourceId)
 Removes a resource with given ID from object node resource dictionary.
 
void setActualDepth (float value)
 Sets the value of #ActualDepthProperty.
 
void setActualHeight (float value)
 Sets the value of #ActualHeightProperty.
 
void setActualWidth (float value)
 Sets the value of #ActualWidthProperty.
 
void setAutoHeight ()
 Sets node to automatically determine height.
 
void setAutoWidth ()
 Sets node to automatically determine width.
 
AbstractBindingRuntime setBinding (AbstractBinding binding)
 Sets a binding.
 
AbstractBindingRuntime setBinding (AbstractBinding binding, PropertyType<?> propertyType)
 Sets a binding.
 
AbstractBindingRuntime setBinding (AbstractBinding binding, PropertyType<?> propertyType, PropertyField propertyField)
 Sets a binding.
 
AbstractBindingRuntime setBindingWithOwner (AbstractBinding binding, KanziObject owner, PropertyType<?> propertyType)
 Sets a binding with owner.
 
AbstractBindingRuntime setBindingWithOwner (AbstractBinding binding, KanziObject owner, PropertyType<?> propertyType, PropertyField propertyField)
 Sets a binding with owner.
 
void setChangeFlag (PropertyTypeChangeFlag flag)
 Sets a change flag.
 
void setClipChildren (boolean value)
 Sets the value of #ClipChildrenProperty.
 
void setDepth (float value)
 Sets the value of #DepthProperty.
 
void setDepthMargin (Vector2 value)
 Sets the value of #DepthMarginProperty.
 
void setEnabled (boolean value)
 Sets the value of the #EnabledProperty.
 
void setFocusable (boolean value)
 Sets the value of the #FocusableProperty.
 
void setFocused (boolean value)
 Sets the value of the #FocusedProperty.
 
void setHeight (float value)
 Sets the value of #HeightProperty.
 
void setHitTestable (boolean value)
 Sets the value of #HitTestableProperty.
 
void setHitTestableContainer (boolean value)
 Sets the value of #HitTestableContainerProperty.
 
void setHorizontalMargin (Vector2 value)
 Sets the value of #HorizontalMarginProperty.
 
void setHover (boolean value)
 Sets the value of #HoverProperty.
 
void setLocale (String value)
 Sets the value of #LocaleProperty.
 
AbstractBindingRuntime setModifierBinding (AbstractBinding binding, PropertyType<?> propertyType)
 Sets a modifier binding.
 
AbstractBindingRuntime setModifierBinding (AbstractBinding binding, PropertyType<?> propertyType, PropertyField propertyField)
 Sets a modifier binding.
 
AbstractBindingRuntime setModifierBindingWithOwner (AbstractBinding binding, KanziObject owner, PropertyType<?> propertyType)
 Sets a modifier binding with owner.
 
AbstractBindingRuntime setModifierBindingWithOwner (AbstractBinding binding, KanziObject owner, PropertyType<?> propertyType, PropertyField propertyField)
 Sets a modifier binding with owner.
 
void setName (String name)
 Sets the value of #NameProperty.
 
void setOpacity (float value)
 Sets the value of #OpacityProperty.
 
void setResourceDictionary (ResourceDictionary resourceDictionary)
 Replaces the resource dictionary of a node.
 
void setStateManager (Resource value)
 Sets the value of #StateManagerProperty.
 
void setStyle (Resource value)
 Sets the value of #StyleProperty.
 
void setVerticalMargin (Vector2 value)
 Sets the value of #VerticalMarginProperty.
 
void setVisible (boolean value)
 Sets the value of #VisibleProperty.
 
void setWidth (float value)
 Sets the value of #WidthProperty.
 
ObjectRef< TResourceTypetryAcquireResource (ResourceID resourceId)
 Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary.
 
Node trySetFocus ()
 Tries to move the focus on this node.
 
void validateArrange ()
 Validates arrange for the node.
 
void validateDraw ()
 Validates draw flags for the node.
 
void validateMeasure ()
 Validates measure for the node.
 
void validateRender ()
 Validates render for the node.
 
- 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 = com.rightware.kanzi.metadata.NodeMetadata.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.
 

Additional Inherited Members

- Public Attributes inherited from NodeMetadata
DynamicPropertyType< FloatActualDepthProperty
 The calculated size of the node in depth direction when used in a layout.
 
DynamicPropertyType< FloatActualHeightProperty
 The calculated height of the node when used in a layout.
 
DynamicPropertyType< FloatActualWidthProperty
 The calculated width of the node when used in a layout.
 
DynamicPropertyType< BooleanClipChildrenProperty
 Sets whether to clip the child nodes of this node.
 
DynamicPropertyType< NodeEnums.ContentStretchContentStretchProperty
 Sets how the content that belongs to this node is stretched (as opposed to manipulating the actual node size).
 
DynamicPropertyType< BooleanCreatedFromKZBProperty
 Kanzi internally uses this property to distinguish objects like bindings and triggers created in code from objects that are loaded from a kzb file.
 
DynamicPropertyType< NodeEnums.DepthAlignmentDepthAlignmentProperty
 The alignment in depth direction the node should use when it resides under a layout.
 
DynamicPropertyType< Vector2DepthMarginProperty
 Sets the depth distance between this node and other nodes that are adjacent to this node in a layout.
 
DynamicPropertyType< FloatDepthProperty = new DynamicPropertyType<>("Node.Depth", Float.class)
 The size of the node in depth direction when used in a layout.
 
DynamicPropertyType< BooleanEffectivelyEnabledProperty
 Indicates whether this node and its ancestor nodes are enabled.
 
DynamicPropertyType< BooleanEnabledProperty
 Whether this node is enabled.
 
DynamicPropertyType< BooleanFocusableProperty
 Indicates whether the node can receive focus.
 
DynamicPropertyType< BooleanFocusedProperty
 Indicates whether the node has the key focus.
 
DynamicPropertyType< FocusStateFocusStateProperty
 Reports the focus state of a node:
 
DynamicPropertyType< ResourceFontFamilyProperty
 The font family used to render the text.
 
DynamicPropertyType< FloatHeightProperty
 The height of the node when used in a layout.
 
DynamicPropertyType< BooleanHitTestableContainerProperty
 When enabled, Kanzi uses the layout bounds as geometry for hit testing.
 
DynamicPropertyType< BooleanHitTestableProperty
 When enabled, the node can be hit tested.
 
DynamicPropertyType< NodeEnums.HorizontalAlignmentHorizontalAlignmentProperty
 The alignment in horizontal direction the node should use when it resides under a layout.
 
DynamicPropertyType< Vector2HorizontalMarginProperty
 Sets the horizontal space between this node and other nodes that are adjacent to this node in a layout.
 
DynamicPropertyType< BooleanHoverProperty
 Indicates whether a node is the foremost hit testable node under the cursor.
 
DynamicPropertyType< String > LocaleProperty
 The locale of the node.
 
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.Node")
 Metaclass for Node.
 
DynamicPropertyType< String > NameProperty = new DynamicPropertyType<>("Node.Name", String.class)
 Node name.
 
DynamicPropertyType< FloatOpacityProperty
 Opacity of the node.
 
DynamicPropertyType< String > PathProperty = new DynamicPropertyType<>("Node.Path", String.class)
 Full path to the node.
 
DynamicPropertyType< FloatProjection2DTo3DScaleProperty
 Sets the scale factor to project pixels to 3D size.
 
DynamicPropertyType< ResourceStateManagerProperty
 Sets the State Manager to the node.
 
DynamicPropertyType< ResourceStyleProperty
 Sets a style to the node.
 
DynamicPropertyType< NodeEnums.VerticalAlignmentVerticalAlignmentProperty
 The alignment in vertical direction the node should use when it resides under a layout.
 
DynamicPropertyType< Vector2VerticalMarginProperty
 Sets the vertical space between this node and other nodes that are adjacent to this node in a layout.
 
DynamicPropertyType< FloatVisibleAmountInParentProperty
 Sets the amount the node is inside its parent.
 
DynamicPropertyType< BooleanVisibleProperty
 When disabled, Kanzi does not render the node.
 
DynamicPropertyType< FloatWidthProperty = new DynamicPropertyType<>("Node.Width", Float.class)
 The width of the node when used in a layout.
 

Detailed Description

Base class for Kanzi nodes.

Member Function Documentation

◆ acquireResource()

Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary.

If the resource id maps to a resource url, but the url doesn't map to any resource, throws an exception.

Parameters
resourceIdName of the resource.
Returns
The acquired resource
Exceptions
ObjectNotFoundExceptionThrows a ObjectNotFoundException when the resourceId is not found.

◆ acquireResourceDictionary()

ResourceDictionary acquireResourceDictionary ( )

Gets a resource dictionary of a node.

If a resource dictionary does not exist, the function creates it.

Returns
The resource dictionary of the node.

◆ acquireResourcesAsync()

ResourceManager.AcquireTask acquireResourcesAsync ( ResourceID resourceId,
ResourceManager.AcquireTask.Callback callback )

Posts an asynchronous task to acquire a resource.

Parameters
resourceIdName of the resource.
callbackCallback function that this function calls when resource loading is completed.
Returns
Handle to the async load task. You can pass the handle to ResourceManager::wait(ResourceManager.AcquireTask) to wait for the completion of the load.

◆ addAbstractChild()

boolean addAbstractChild ( Node child)

Adds a node as child of this node.

Parameters
childNode to add as child.
Returns
True if operation was successful, otherwise false.

◆ addAnonymousResource()

void addAnonymousResource ( Resource resource)

Adds anonymous resource (such as style) for object node resources.

Parameters
resourceThe resource to be added.

◆ addInputManipulator()

void addInputManipulator ( InputManipulator inputManipulator)

Attaches an input manipulator to the node.

Parameters
inputManipulatorThe input manipulator to add.

◆ addMessageFilter()

MessageSubscriptionToken addMessageFilter ( MessageType< MessageArgumentsType > messageType,
MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction )

Adds a message filter where the filter is a function.

The filter is invoked when a message of messageType bubbles through the node the filter is added to.

Parameters
messageTypeThe message type to listen to.
messageHandlerFunctionThe function invoked when the node that owns the filter receives a matching message.
<MessageArgumentsType>The message arguments class associated with the message type.
Returns
The MessageSubscriptionToken which identifies the added filter.

◆ addMessageHandler() [1/2]

MessageSubscriptionToken addMessageHandler ( MessageType< MessageArgumentsType > messageType,
MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction )

Adds a message handler where the handler is a function.

The handler is invoked when a message of messageType is signaled in the node the handler is added to.

Parameters
messageTypeThe message type to listen to.
messageHandlerFunctionThe function invoked when the node that owns the handler receives a matching message. The source of the message has to be the node itself.
<MessageArgumentsType>The message arguments class associated with the message type.
Returns
The MessageSubscriptionToken which identifies the added handler.

◆ addMessageHandler() [2/2]

MessageSubscriptionToken addMessageHandler ( MessageType< MessageArgumentsType > messageType,
MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction,
Node messageSourceFilter )

Adds a message handler where the handler is a function.

The handler is invoked when a message of messageType from the source specified is signaled in the node the handler is added to.

Parameters
messageTypeThe message type to listen to.
messageHandlerFunctionThe function invoked when the node that owns the handler receives a matching message.
messageSourceFilterThe handler will only be called when the message is from this source.
<MessageArgumentsType>The message arguments class associated with the message type.
Returns
The MessageSubscriptionToken which identifies the added handler.

◆ addNodeComponent()

void addNodeComponent ( NodeComponent component)

Transfers the ownership of a node component to an object node.

Parameters
componentThe component being added.

◆ addNodeComponentWithOwner()

void addNodeComponentWithOwner ( NodeComponent component,
KanziObject owner )

Transfers the ownership of a node component to an object node and sets the owner of the node component.

Parameters
componentThe component being added.
ownerThe Kanzi object that owns the lifetime of the component.

◆ addResource()

void addResource ( ResourceID resourceId,
String resourceUrl )

Adds a resource manager resource to an object node.

If resourceID already exists in object, removes the existing entry. If resourceURL is NULL, error is thrown.

Parameters
resourceIdResource id of the resource.
resourceUrlResource url of the resource.

◆ addResourceDictionary()

void addResourceDictionary ( ResourceDictionary resourceDictionary)

Adds a nested resource dictionary to the resource dictionary of a node.

Updates all the resource references of the child nodes.

Parameters
resourceDictionaryThe nested resource dictionary.

◆ addTunnelingMessageFilter()

MessageSubscriptionToken addTunnelingMessageFilter ( MessageType< MessageArgumentsType > messageType,
MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction )

Adds a message filter where the filter is a function.

The filter is invoked when a message of messageType tunnels through the node to which you add this filter.

Parameters
messageTypeThe message type to listen to.
messageHandlerFunctionThe function invoked when the node that owns the filter receives a matching message.
<MessageArgumentsType>The message arguments class associated with the message type.
Returns
The MessageSubscriptionToken which identifies the added filter.

◆ addTunnelingMessageHandler()

MessageSubscriptionToken addTunnelingMessageHandler ( MessageType< MessageArgumentsType > messageType,
MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction,
Node messageSourceFilter )

Adds a message handler where the handler is a function and you explicitly define the accepted source.

The handler is invoked when a message of messageType tunnels through the node to which you add the handler, but only when you dispatch it from the given source node.

Parameters
messageTypeThe message type to listen to.
messageHandlerFunctionThe function invoked when the node that owns the handler receives a matching message. The source of the message has to be the node itself.
messageSourceFilterSource node of the messages.
<MessageArgumentsType>The message arguments class associated with the message type.
Returns
The MessageSubscriptionToken which identifies the added handler.

◆ clearChangeFlag()

void clearChangeFlag ( PropertyTypeChangeFlag flag)

Clears a change flag.

Parameters
flagThe flag to clear

◆ containsResource()

boolean containsResource ( ResourceID resourceId)

Returns if object node resource dictionary contains the resource with given ID.

Resource can be any type: style, alias or resource manager resource.

Parameters
resourceIdResource id of resource to check.
Returns
True if node contains this resource, otherwise false.

◆ dispatchMessage()

void dispatchMessage ( MessageType< MessageArgumentsType > messageType,
MessageArgumentsType arguments )

Dispatches a message from this node with specified arguments.

Parameters
messageTypeThe type of the dispatched message.
argumentsThe arguments of the dispatched message.
<MessageArgumentsType>The message arguments class associated with the message type.

◆ findResourceUrl()

String findResourceUrl ( ResourceID resourceId)

Tries to find Resource URL for Resource ID from this node.

Parameters
resourceIdResource id to find.
Returns
Resource url of resource, can be null if resource was not found.

◆ getAbstractChild()

Node getAbstractChild ( int index)

Returns node at given child index.

Parameters
indexIndex of the node to get.
Returns
Node at given child index.

◆ getAbstractChildCount()

int getAbstractChildCount ( )

Returns number of child nodes.

Returns
Number of child nodes.

◆ getAbstractChildIndex()

int getAbstractChildIndex ( Node node)

Returns index of given node in list of child nodes.

Parameters
nodeNode to get child index.
Returns
Index of given node in list of child nodes.

◆ getActualDepth()

float getActualDepth ( )

Gets the value of #ActualDepthProperty.

Returns
Current value.

◆ getActualHeight()

float getActualHeight ( )

Gets the value of #ActualHeightProperty.

Returns
Current value.

◆ getActualWidth()

float getActualWidth ( )

Gets the value of #ActualWidthProperty.

Returns
Current value.

◆ getDepth()

float getDepth ( )

Gets the value of #DepthProperty.

Returns
Current value.

◆ getDepthMargin()

Vector2 getDepthMargin ( )

Gets the value of #DepthMarginProperty.

Returns
Current value.

◆ getHeight()

float getHeight ( )

Gets the value of #HeightProperty.

Returns
Current value.

◆ getHorizontalMargin()

Vector2 getHorizontalMargin ( )

Gets the value of #HorizontalMarginProperty.

Returns
Current value.

◆ getLocale()

String getLocale ( )

Gets the value of #LocaleProperty.

Returns
Current value.

◆ getName()

String getName ( )

Gets the value of #NameProperty.

Returns
Name of the node.

◆ getOpacity()

float getOpacity ( )

Gets the value of #OpacityProperty.

Returns
Current value.

◆ getParent()

Node getParent ( )

Gets parent of this node.

Returns
Parent of this node.

◆ getPath()

String getPath ( )

Gets the value of #PathProperty.

Returns
Path of the node.

◆ getResourceDictionary()

ResourceDictionary getResourceDictionary ( )

If a node has a resource dictionary, returns the resource dictionary of that node.

Returns
The resource dictionary of the node. If the node does not have a resource dictionary, returns null.

◆ getStateManager()

Resource getStateManager ( )

Gets the value of #StateManagerProperty.

Returns
Current value of #StateManagerProperty.

◆ getStyle()

Resource getStyle ( )

Gets the value of #StyleProperty.

Returns
Current value of the #StyleProperty.

◆ getVerticalMargin()

Vector2 getVerticalMargin ( )

Gets the value of #VerticalMarginProperty.

Returns
Current value.

◆ getWidth()

float getWidth ( )

Gets the value of #WidthProperty.

Returns
Current value.

◆ isAnyChangeFlagSet()

boolean isAnyChangeFlagSet ( EnumSet< PropertyTypeChangeFlag > flags)

Checks if any of a set of change flags is set.

Parameters
flagsThe set of flags to check
Returns
True if any of the flags is set, else false.

◆ isAnyChildChangeFlagSet()

boolean isAnyChildChangeFlagSet ( EnumSet< PropertyTypeChangeFlag > flags)

Checks if any of a set of change flags is set on a child.

Parameters
flagsThe set of flags to check
Returns
True if any of the flags is set, else false.

◆ isAttached()

boolean isAttached ( )

Checks if node is attached to ui tree.

Returns
Returns true if the node is attached to a ui tree, otherwise false.

◆ isAttaching()

boolean isAttaching ( )

Checks if node is in the process of attaching to ui tree.

Returns
Returns true if the node is in the process of attaching to a ui tree, otherwise false.

◆ isChangeFlagSet()

boolean isChangeFlagSet ( PropertyTypeChangeFlag flag)

Checks if a change flag is set.

Parameters
flagThe flag to check
Returns
True if the flag is set, else false.

◆ isChildChangeFlagSet()

boolean isChildChangeFlagSet ( PropertyTypeChangeFlag flag)

Checks if a change flag is set on a child.

Parameters
flagThe flag to check
Returns
True if the flag is set, else false.

◆ isClipChildren()

boolean isClipChildren ( )

Gets the value of #ClipChildrenProperty.

Returns
Current value.

◆ isDetaching()

boolean isDetaching ( )

Checks if node is in the process of getting detached from ui tree.

Returns
Returns true if the node is in the process of getting detached from a ui tree, otherwise false.

◆ isEffectivelyEnabled()

boolean isEffectivelyEnabled ( )

Returns whether a node and its ancestor nodes are enabled.

Returns
True if node and its ancestor nodes are enabled.

◆ isEffectivelyFocusable()

boolean isEffectivelyFocusable ( )

Returns whether a node and its ancestor focus scope nodes are focusable.

The ancestor focus scope lookup stops once a popup-type focus scope is reached.

Returns
If the node is focusable, returns true. If the node is in a focus scope that is not focusable, or the node is not focusable, returns false.

◆ isEffectivelyVisible()

boolean isEffectivelyVisible ( )

Returns whether a node and its ancestor nodes are visible.

Returns
True if node and its ancestor nodes are visible.

◆ isEnabled()

boolean isEnabled ( )

Gets the value of #EnabledProperty.

Returns
Current value.

◆ isFocusable()

boolean isFocusable ( )

Gets the value of the #FocusableProperty.

Returns
Current value.

◆ isFocused()

boolean isFocused ( )

Sets whether a node is an active focus node and can receive keyboard messages.

In a Kanzi application only one node at a time can have active focus. The default value is false.

Returns
Current value of #FocusedProperty.

◆ isHitTestable()

boolean isHitTestable ( )

Gets the value of #HitTestableProperty.

Returns
Current value.

◆ isHitTestableContainer()

boolean isHitTestableContainer ( )

Gets the value of #HitTestableContainerProperty.

Returns
Current value.

◆ isHover()

boolean isHover ( )

Gets the value of #HoverProperty.

Returns
Current value.

◆ isInitialized()

boolean isInitialized ( )

Checks if initialize() has been called.

Returns
True if initialize() has been called, false otherwise.

◆ isInvalidArrange()

boolean isInvalidArrange ( )

Check if the node needs arrange.

Returns
True if the arrange change flag is set, else false.

◆ isInvalidDraw()

boolean isInvalidDraw ( )

Tells if node draw flag is invalid.

Returns
True if the Draw change flag is set, else false.

◆ isInvalidFinalTransform()

boolean isInvalidFinalTransform ( )

Tells if final transform flag is invalid for node.

Returns
True if the final transform change flag is set, else false.

◆ isInvalidMeasure()

boolean isInvalidMeasure ( )

Check if the node needs measure.

Returns
True if the measure change flag is set, else false.

◆ isInvalidRender()

boolean isInvalidRender ( )

Returns if node render flag is invalid.

Returns
True if the render change flag is set, else false.

◆ isNamed()

boolean isNamed ( String name)

Checks if node has a given name.

Parameters
nameName to check.
Returns
True if node name matches the passed argument, otherwise false.

◆ isVisible()

boolean isVisible ( )

Gets the value of #VisibleProperty.

Returns
Current value.

◆ iterateNodeComponents()

Iterable< NodeComponent > iterateNodeComponents ( )

Gets an Iterable object used to iterate the Node Components.

Returns
An iterable of Node Components.

◆ lookupNode()

T lookupNode ( String path)

Returns a node of specified type by looking it up with specified path or alias.

Parameters
pathPath to use for relative lookup.
<T>Type of the node.
Returns
Node that was found, or null if the node was not found.
Exceptions
IllegalArgumentExceptionThrows an IllegalArgumentException if the path is malformed.

◆ lookupNodeComponentByName()

NodeComponent lookupNodeComponentByName ( String name)

Look up a Node Component by Name.

Parameters
nameThe search name
Returns
The Node Component that has been found, or null if no node component was found.

◆ lookupObject()

KanziObject lookupObject ( String path)

Returns a KanziObject by looking it up with specified path or alias.

Object found may be another node or a resource within a node.

Parameters
pathRelative path to use for lookup.
Returns
Item found as KanziObject. May be null if no object found.
Exceptions
IllegalArgumentExceptionThrows an IllegalArgumentException if the path is malformed.

◆ notifyResourceDictionaryModified()

void notifyResourceDictionaryModified ( )

Forces the re-evaluation of resource IDs in a node tree.

If you modify a resource dictionary of a node that is already attached, you can use this function to update the resource properties. Note that you need to use this function only if you modify the dictionary directly through com.rightware.kanzi.Node#getResourceDictionary() or com.rightware.kanzi.Node#acquireResourceDictionary(). If you use other Node class functions like addResource(ResourceID, String) or com.rightware.kanzi.Node#setResourceDictionary(ResourceDictionary), you do not need to call this function.

◆ removeAbstractChild()

boolean removeAbstractChild ( Node child)

Removes child node from this node.

Parameters
childChild node to remove.
Returns
True if the operation was successful, otherwise false.

◆ removeAnonymousResource()

void removeAnonymousResource ( Resource resource)

Removes anonymous resource from object node resources.

Parameters
resourceThe resource to be removed.

◆ removeBinding()

void removeBinding ( AbstractBindingRuntime bindingRuntime)

Removes a binding runtime added earlier.

Parameters
bindingRuntimeBinding runtime to remove.

◆ removeBindingsWithOwner()

void removeBindingsWithOwner ( KanziObject owner)

Removes binding runtimes owned by a KanziObject.

Parameters
ownerThe Kanzi Object owning the bindings to be removed.

◆ removeInputManipulator()

void removeInputManipulator ( InputManipulator inputManipulator)

Detaches an input manipulator from the node.

Parameters
inputManipulatorThe input manipulator to remove.

◆ removeMessageHandler()

void removeMessageHandler ( MessageSubscriptionToken token)

Removes a message subscription.

Parameters
tokenThe message subscription token which identifies the handler or filter.

◆ removeNodeComponent()

void removeNodeComponent ( NodeComponent component)

Removes the ownership of a node component from an object node.

Parameters
componentThe component being removed.

◆ removeNodeComponentWithOwner()

void removeNodeComponentWithOwner ( KanziObject owner)

Removes all node component bindings with the specified owner.

Parameters
ownerThe Kanzi object used as the owner

◆ removeResource()

void removeResource ( ResourceID resourceId)

Removes a resource with given ID from object node resource dictionary.

Does not do anything if resourceID was not found.

Parameters
resourceIdResource id of resource to remove.

◆ setActualDepth()

void setActualDepth ( float value)

Sets the value of #ActualDepthProperty.

Parameters
valueNew value.

◆ setActualHeight()

void setActualHeight ( float value)

Sets the value of #ActualHeightProperty.

Parameters
valueNew value.

◆ setActualWidth()

void setActualWidth ( float value)

Sets the value of #ActualWidthProperty.

Parameters
valueNew value.

◆ setBinding() [1/3]

AbstractBindingRuntime setBinding ( AbstractBinding binding)

Sets a binding.

Local precedence is used.

Parameters
bindingBinding to set.
Returns
Binding runtime created for the binding.

◆ setBinding() [2/3]

AbstractBindingRuntime setBinding ( AbstractBinding binding,
PropertyType<?> propertyType )

Sets a binding.

Local precedence is used.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
Returns
Binding runtime created for the binding.

◆ setBinding() [3/3]

AbstractBindingRuntime setBinding ( AbstractBinding binding,
PropertyType<?> propertyType,
PropertyField propertyField )

Sets a binding.

Local precedence is used.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
propertyFieldProperty field.
Returns
Binding runtime created for the binding.

◆ setBindingWithOwner() [1/2]

AbstractBindingRuntime setBindingWithOwner ( AbstractBinding binding,
KanziObject owner,
PropertyType<?> propertyType )

Sets a binding with owner.

Local precedence is used.

Parameters
bindingBinding to set.
ownerThe Kanzi Object owning this binding.
propertyTypeTarget property type.
Returns
Binding runtime created for the binding.

◆ setBindingWithOwner() [2/2]

AbstractBindingRuntime setBindingWithOwner ( AbstractBinding binding,
KanziObject owner,
PropertyType<?> propertyType,
PropertyField propertyField )

Sets a binding with owner.

Local precedence is used.

Parameters
bindingBinding to set.
ownerThe Kanzi Object owning this binding.
propertyTypeTarget property type.
propertyFieldProperty field.
Returns
Binding runtime created for the binding.

◆ setChangeFlag()

void setChangeFlag ( PropertyTypeChangeFlag flag)

Sets a change flag.

Parameters
flagThe flag to set

◆ setClipChildren()

void setClipChildren ( boolean value)

Sets the value of #ClipChildrenProperty.

Parameters
valueNew value.

◆ setDepth()

void setDepth ( float value)

Sets the value of #DepthProperty.

Parameters
valueNew value.

◆ setDepthMargin()

void setDepthMargin ( Vector2 value)

Sets the value of #DepthMarginProperty.

Parameters
valueNew value.

◆ setEnabled()

void setEnabled ( boolean value)

Sets the value of the #EnabledProperty.

Parameters
valueNew value.

◆ setFocusable()

void setFocusable ( boolean value)

Sets the value of the #FocusableProperty.

Parameters
valueTo enable a node to get active focus and participate in focus chain navigation, set to true,

◆ setFocused()

void setFocused ( boolean value)

Sets the value of the #FocusedProperty.

Parameters
valueTo set active focus, set to true. To clear focus, set to false.

◆ setHeight()

void setHeight ( float value)

Sets the value of #HeightProperty.

Parameters
valueNew value.

◆ setHitTestable()

void setHitTestable ( boolean value)

Sets the value of #HitTestableProperty.

Parameters
valueNew value.

◆ setHitTestableContainer()

void setHitTestableContainer ( boolean value)

Sets the value of #HitTestableContainerProperty.

Parameters
valueNew value.

◆ setHorizontalMargin()

void setHorizontalMargin ( Vector2 value)

Sets the value of #HorizontalMarginProperty.

Parameters
valueNew value.

◆ setHover()

void setHover ( boolean value)

Sets the value of #HoverProperty.

Parameters
valueNew value.

◆ setLocale()

void setLocale ( String value)

Sets the value of #LocaleProperty.

Parameters
valueNew value.

◆ setModifierBinding() [1/2]

AbstractBindingRuntime setModifierBinding ( AbstractBinding binding,
PropertyType<?> propertyType )

Sets a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
Returns
Binding runtime created for the binding.

◆ setModifierBinding() [2/2]

AbstractBindingRuntime setModifierBinding ( AbstractBinding binding,
PropertyType<?> propertyType,
PropertyField propertyField )

Sets a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
propertyFieldProperty field.
Returns
Binding runtime created for the binding.

◆ setModifierBindingWithOwner() [1/2]

AbstractBindingRuntime setModifierBindingWithOwner ( AbstractBinding binding,
KanziObject owner,
PropertyType<?> propertyType )

Sets a modifier binding with owner.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
ownerThe Kanzi Object owning this binding.
propertyTypeTarget property type.
Returns
Binding runtime created for the binding.

◆ setModifierBindingWithOwner() [2/2]

AbstractBindingRuntime setModifierBindingWithOwner ( AbstractBinding binding,
KanziObject owner,
PropertyType<?> propertyType,
PropertyField propertyField )

Sets a modifier binding with owner.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
ownerThe Kanzi Object owning this binding.
propertyTypeTarget property type.
propertyFieldProperty field.
Returns
Binding runtime created for the binding.

◆ setName()

void setName ( String name)

Sets the value of #NameProperty.

Parameters
nameNew name to assign.

◆ setOpacity()

void setOpacity ( float value)

Sets the value of #OpacityProperty.

Parameters
valueNew value.

◆ setResourceDictionary()

void setResourceDictionary ( ResourceDictionary resourceDictionary)

Replaces the resource dictionary of a node.

Updates all the resource references of the child nodes.

Parameters
resourceDictionaryThe resource dictionary.

◆ setStateManager()

void setStateManager ( Resource value)

Sets the value of #StateManagerProperty.

Parameters
valueNew value.

◆ setStyle()

void setStyle ( Resource value)

Sets the value of #StyleProperty.

Parameters
valueNew style.

◆ setVerticalMargin()

void setVerticalMargin ( Vector2 value)

Sets the value of #VerticalMarginProperty.

Parameters
valueNew value.

◆ setVisible()

void setVisible ( boolean value)

Sets the value of #VisibleProperty.

Parameters
valueNew value.

◆ setWidth()

void setWidth ( float value)

Sets the value of #WidthProperty.

Parameters
valueNew value.

◆ tryAcquireResource()

ObjectRef< TResourceType > tryAcquireResource ( ResourceID resourceId)

Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary.

Parameters
resourceIdName of the resource.
Returns
The acquired resource, or null if the resource id or resource url doesn't map to any resource.

◆ trySetFocus()

Node trySetFocus ( )

Tries to move the focus on this node.

If this node is a focus scope node, this method tries to focus the preserved focus of the focus scope, or tries to focus on the first focusable descendant node of this node.

Returns
If this method successfully moved focus, returns this node or a descendant node of this node. If this method did not move focus, returns null.