Kanzi 4.1.1
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.
 
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.
 
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 addNodeComponentWithOwner (NodeComponent component, KanziObject owner)
 Transfers the ownership of a node component to an object node and sets the owner of the node component.
 
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 an object node and its children recursively.
 
void clearChangeFlag (PropertyTypeChangeFlag flag)
 Clears a change flag.
 
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 NodeMetadata::ActualDepthProperty.
 
float getActualHeight ()
 Gets the value of NodeMetadata::ActualHeightProperty.
 
float getActualWidth ()
 Gets the value of NodeMetadata::ActualWidthProperty.
 
float getDepth ()
 Gets the value of NodeMetadata::DepthProperty.
 
Vector2 getDepthMargin ()
 Gets the value of NodeMetadata::DepthMarginProperty.
 
float getHeight ()
 Gets the value of NodeMetadata::HeightProperty.
 
Vector2 getHorizontalMargin ()
 Gets the value of NodeMetadata::HorizontalMarginProperty.
 
String getLocale ()
 Gets the value of NodeMetadata::LocaleProperty.
 
String getName ()
 Gets the value of NodeMetadata::NameProperty.
 
float getOpacity ()
 Gets the value of NodeMetadata::OpacityProperty.
 
Node getParent ()
 Gets parent of this node.
 
String getPath ()
 Gets the value of NodeMetadata::PathProperty.
 
Resource getStateManager ()
 Gets the value of NodeMetadata::StateManagerProperty.
 
Resource getStyle ()
 Gets the value of NodeMetadata::StyleProperty.
 
Vector2 getVerticalMargin ()
 Gets the value of NodeMetadata::VerticalMarginProperty.
 
float getWidth ()
 Gets the value of NodeMetadata::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 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 NodeMetadata::ClipChildrenProperty.
 
boolean isEnabled ()
 Gets the value of NodeMetadata::EnabledProperty.
 
boolean isFocusable ()
 Gets the value of the NodeMetadata::FocusableProperty.
 
boolean isFocused ()
 Sets whether a node is an active focus node and can receive keyboard messages.
 
boolean isHitTestable ()
 Gets the value of NodeMetadata::HitTestableProperty.
 
boolean isHitTestableContainer ()
 Gets the value of NodeMetadata::HitTestableContainerProperty.
 
boolean isHover ()
 Gets the value of NodeMetadata::HoverProperty.
 
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 isVisible ()
 Gets the value of NodeMetadata::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 removeBinding (AbstractBindingRuntime bindingRuntime)
 Removes a binding runtime added earlier.
 
void removeBindingsWithOwner (KanziObject owner)
 Removes binding runtimes owned by a KanziObject.
 
void removeMessageHandler (MessageSubscriptionToken token)
 Removes a message subscription.
 
void removeNodeComponentWithOwner (KanziObject owner)
 Removes all node component bindings with the specified owner.
 
void setActualDepth (float value)
 Sets the value of NodeMetadata::ActualDepthProperty.
 
void setActualHeight (float value)
 Sets the value of NodeMetadata::ActualHeightProperty.
 
void setActualWidth (float value)
 Sets the value of NodeMetadata::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 NodeMetadata::ClipChildrenProperty.
 
void setDepth (float value)
 Sets the value of NodeMetadata::DepthProperty.
 
void setDepthMargin (Vector2 value)
 Sets the value of NodeMetadata::DepthMarginProperty.
 
void setEnabled (boolean value)
 Sets the value of the NodeMetadata::EnabledProperty.
 
void setFocusable (boolean value)
 Sets the value of the NodeMetadata::FocusableProperty.
 
void setFocused (boolean value)
 Sets the value of the NodeMetadata::FocusedProperty.
 
void setHeight (float value)
 Sets the value of NodeMetadata::HeightProperty.
 
void setHitTestable (boolean value)
 Sets the value of NodeMetadata::HitTestableProperty.
 
void setHitTestableContainer (boolean value)
 Sets the value of NodeMetadata::HitTestableContainerProperty.
 
void setHorizontalMargin (Vector2 value)
 Sets the value of NodeMetadata::HorizontalMarginProperty.
 
void setHover (boolean value)
 Sets the value of NodeMetadata::HoverProperty.
 
void setLocale (String value)
 Sets the value of NodeMetadata::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 NodeMetadata::NameProperty.
 
void setOpacity (float value)
 Sets the value of NodeMetadata::OpacityProperty.
 
void setStateManager (Resource value)
 Sets the value of NodeMetadata::StateManagerProperty.
 
void setStyle (Resource value)
 Sets the value of NodeMetadata::StyleProperty.
 
void setVerticalMargin (Vector2 value)
 Sets the value of NodeMetadata::VerticalMarginProperty.
 
void setVisible (boolean value)
 Sets the value of NodeMetadata::VisibleProperty.
 
void setWidth (float value)
 Sets the value of NodeMetadata::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.
 
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 NodeProxy
ResourceDictionary acquireResourceDictionary ()
 Gets a resource dictionary of a node.
 
boolean addAbstractChildOverride (Node child)
 
void addAnonymousResource (Resource resource)
 Adds anonymous resource (such as style) for object node resources.
 
void addInputManipulator (InputManipulator inputManipulator)
 Transfers the ownership and attaches an input manipulator to an object node.
 
void addNodeComponent (NodeComponent nodeComponent)
 Transfers the ownership of a node component to an object node.
 
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.
 
void clearChangeFlag (long 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 descendants.
 
int getAbstractChildCountOverride ()
 
int getAbstractChildIndexOverride (Node node)
 
Node getAbstractChildOverride (int index)
 
long getChangeFlags ()
 Get current change flags.
 
long getChildChangeFlags ()
 Get current child change flags.
 
ResourceDictionary getResourceDictionary ()
 If a node has a resource dictionary, returns the resource dictionary of that node.
 
boolean isAttached ()
 Gets the attached status.
 
boolean isAttaching ()
 Gets the attaching status.
 
boolean isDetaching ()
 Gets the detaching status.
 
boolean isEffectivelyEnabled ()
 Returns the value of EffectivelyEnabledProperty.
 
boolean isEffectivelyFocusable ()
 Returns whether a node is focusable.
 
boolean isEffectivelyVisible ()
 Returns whether a node and its ancestor nodes are visible.
 
boolean isInitialized ()
 Gets the initialized status.
 
boolean isNamed (String name)
 Checks if the node has the given name.
 
boolean removeAbstractChildOverride (Node child)
 
void removeAnonymousResource (Resource resource)
 Removes anonymous resource from object node resources.
 
void removeInputManipulator (InputManipulator inputManipulator)
 Removes the ownership and detaches an input manipulator from an object node.
 
void removeNodeComponent (NodeComponent nodeComponent)
 Removes the ownership of a node component from an object node.
 
void removeResource (ResourceID resourceId)
 Removes a resource with given ID from object node resource dictionary.
 
void setChangeFlag (long flag)
 Sets a change flag.
 
void setResourceDictionary (ResourceDictionary resourceDictionary)
 Replaces the resource dictionary of a node.
 
Node trySetFocus ()
 Tries to move the focus to this node.
 
Node trySetFocus (FocusFallback fallbackOption)
 Tries to set the focus to the newFocusNode using FocusManager.trySetFocus() but with a fallback behavior in case the node does not gain focus.
 
- 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 setFlagKeepDuringPatching (PropertyType< TDataType > propertyType)
 Sets the flag to indicate that the property was loaded from KZB.
 
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 NodeProxy
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

- Static Public Member Functions inherited from NodeProxy
static boolean isUnboundedLayoutValue (float layoutValue)
 Indicates whether a value is an unbound layout value.
 
static boolean isValidLayoutValue (float value)
 Indicates whether a value is valid layout value.
 
static float unboundedLayoutValue ()
 Returns an unbounded layout value.
 

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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ attachRecursive()

void attachRecursive ( )

Attaches an object node and its children recursively.

Reimplemented from NodeProxy.

◆ clearChangeFlag()

void clearChangeFlag ( PropertyTypeChangeFlag flag)

Clears a change flag.

Parameters
flagThe flag to clear

◆ 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 NodeMetadata::ActualDepthProperty.

Returns
Current value.

◆ getActualHeight()

float getActualHeight ( )

Gets the value of NodeMetadata::ActualHeightProperty.

Returns
Current value.

◆ getActualWidth()

float getActualWidth ( )

Gets the value of NodeMetadata::ActualWidthProperty.

Returns
Current value.

◆ getDepth()

float getDepth ( )

Gets the value of NodeMetadata::DepthProperty.

Returns
Current value.

◆ getDepthMargin()

Vector2 getDepthMargin ( )

Gets the value of NodeMetadata::DepthMarginProperty.

Returns
Current value.

◆ getHeight()

float getHeight ( )

Gets the value of NodeMetadata::HeightProperty.

Returns
Current value.

◆ getHorizontalMargin()

Vector2 getHorizontalMargin ( )

Gets the value of NodeMetadata::HorizontalMarginProperty.

Returns
Current value.

◆ getLocale()

String getLocale ( )

Gets the value of NodeMetadata::LocaleProperty.

Returns
Current value.

◆ getName()

String getName ( )

Gets the value of NodeMetadata::NameProperty.

Returns
Name of the node.

◆ getOpacity()

float getOpacity ( )

Gets the value of NodeMetadata::OpacityProperty.

Returns
Current value.

◆ getParent()

Node getParent ( )

Gets parent of this node.

Returns
Parent of this node.

◆ getPath()

String getPath ( )

Gets the value of NodeMetadata::PathProperty.

Returns
Path of the node.

◆ getStateManager()

Resource getStateManager ( )

Gets the value of NodeMetadata::StateManagerProperty.

Returns
Current value of NodeMetadata::StateManagerProperty.

◆ getStyle()

Resource getStyle ( )

Gets the value of NodeMetadata::StyleProperty.

Returns
Current value of the NodeMetadata::StyleProperty.

◆ getVerticalMargin()

Vector2 getVerticalMargin ( )

Gets the value of NodeMetadata::VerticalMarginProperty.

Returns
Current value.

◆ getWidth()

float getWidth ( )

Gets the value of NodeMetadata::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.

◆ 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 NodeMetadata::ClipChildrenProperty.

Returns
Current value.

◆ isEnabled()

boolean isEnabled ( )

Gets the value of NodeMetadata::EnabledProperty.

Returns
Current value.

◆ isFocusable()

boolean isFocusable ( )

Gets the value of the NodeMetadata::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 NodeMetadata::FocusedProperty.

◆ isHitTestable()

boolean isHitTestable ( )

Gets the value of NodeMetadata::HitTestableProperty.

Returns
Current value.

◆ isHitTestableContainer()

boolean isHitTestableContainer ( )

Gets the value of NodeMetadata::HitTestableContainerProperty.

Returns
Current value.

◆ isHover()

boolean isHover ( )

Gets the value of NodeMetadata::HoverProperty.

Returns
Current value.

◆ 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.

◆ isVisible()

boolean isVisible ( )

Gets the value of NodeMetadata::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.

Reimplemented from NodeProxy.

◆ 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.

Reimplemented from NodeProxy.

◆ 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.

◆ 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.

◆ removeMessageHandler()

void removeMessageHandler ( MessageSubscriptionToken token)

Removes a message subscription.

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

◆ removeNodeComponentWithOwner()

void removeNodeComponentWithOwner ( KanziObject owner)

Removes all node component bindings with the specified owner.

Parameters
ownerThe Kanzi object used as the owner

◆ setActualDepth()

void setActualDepth ( float value)

Sets the value of NodeMetadata::ActualDepthProperty.

Parameters
valueNew value.

◆ setActualHeight()

void setActualHeight ( float value)

Sets the value of NodeMetadata::ActualHeightProperty.

Parameters
valueNew value.

◆ setActualWidth()

void setActualWidth ( float value)

Sets the value of NodeMetadata::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 NodeMetadata::ClipChildrenProperty.

Parameters
valueNew value.

◆ setDepth()

void setDepth ( float value)

Sets the value of NodeMetadata::DepthProperty.

Parameters
valueNew value.

◆ setDepthMargin()

void setDepthMargin ( Vector2 value)

Sets the value of NodeMetadata::DepthMarginProperty.

Parameters
valueNew value.

◆ setEnabled()

void setEnabled ( boolean value)

Sets the value of the NodeMetadata::EnabledProperty.

Parameters
valueNew value.

◆ setFocusable()

void setFocusable ( boolean value)

Sets the value of the NodeMetadata::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 NodeMetadata::FocusedProperty.

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

◆ setHeight()

void setHeight ( float value)

Sets the value of NodeMetadata::HeightProperty.

Parameters
valueNew value.

◆ setHitTestable()

void setHitTestable ( boolean value)

Sets the value of NodeMetadata::HitTestableProperty.

Parameters
valueNew value.

◆ setHitTestableContainer()

void setHitTestableContainer ( boolean value)

Sets the value of NodeMetadata::HitTestableContainerProperty.

Parameters
valueNew value.

◆ setHorizontalMargin()

void setHorizontalMargin ( Vector2 value)

Sets the value of NodeMetadata::HorizontalMarginProperty.

Parameters
valueNew value.

◆ setHover()

void setHover ( boolean value)

Sets the value of NodeMetadata::HoverProperty.

Parameters
valueNew value.

◆ setLocale()

void setLocale ( String value)

Sets the value of NodeMetadata::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 NodeMetadata::NameProperty.

Parameters
nameNew name to assign.

◆ setOpacity()

void setOpacity ( float value)

Sets the value of NodeMetadata::OpacityProperty.

Parameters
valueNew value.

◆ setStateManager()

void setStateManager ( Resource value)

Sets the value of NodeMetadata::StateManagerProperty.

Parameters
valueNew value.

◆ setStyle()

void setStyle ( Resource value)

Sets the value of NodeMetadata::StyleProperty.

Parameters
valueNew style.

◆ setVerticalMargin()

void setVerticalMargin ( Vector2 value)

Sets the value of NodeMetadata::VerticalMarginProperty.

Parameters
valueNew value.

◆ setVisible()

void setVisible ( boolean value)

Sets the value of NodeMetadata::VisibleProperty.

Parameters
valueNew value.

◆ setWidth()

void setWidth ( float value)

Sets the value of NodeMetadata::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.