Base class for Kanzi nodes. More...
Public Member Functions | |
| 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 | attachRecursive () |
| Attaches an object node and its children recursively. | |
| 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. | |
| KanziObject | lookupObject (String relativePath) |
| Lookup for an object from a node. | |
| void | notifyResourceDictionaryModified () |
| Forces the re-evaluation of resource IDs in a node tree. | |
| 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< TType > | tryCreateObjectRef (Class< TType > clazz) |
| Tries to create an owning ObjectRef instance to this KanziObject. | |
Static Public Member Functions | |
| 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. | |
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< Float > | ActualDepthProperty |
| The calculated size of the node in depth direction when used in a layout. | |
| DynamicPropertyType< Float > | ActualHeightProperty |
| The calculated height of the node when used in a layout. | |
| DynamicPropertyType< Float > | ActualWidthProperty |
| The calculated width of the node when used in a layout. | |
| DynamicPropertyType< Boolean > | ClipChildrenProperty |
| Sets whether to clip the child nodes of this node. | |
| DynamicPropertyType< NodeEnums.ContentStretch > | ContentStretchProperty |
| Sets how the content that belongs to this node is stretched (as opposed to manipulating the actual node size). | |
| DynamicPropertyType< Boolean > | CreatedFromKZBProperty |
| 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.DepthAlignment > | DepthAlignmentProperty |
| The alignment in depth direction the node should use when it resides under a layout. | |
| DynamicPropertyType< Vector2 > | DepthMarginProperty |
| Sets the depth distance between this node and other nodes that are adjacent to this node in a layout. | |
| DynamicPropertyType< Float > | DepthProperty = new DynamicPropertyType<>("Node.Depth", Float.class) |
| The size of the node in depth direction when used in a layout. | |
| DynamicPropertyType< Boolean > | EffectivelyEnabledProperty |
| Indicates whether this node and its ancestor nodes are enabled. | |
| DynamicPropertyType< Boolean > | EnabledProperty |
| Whether this node is enabled. | |
| DynamicPropertyType< Boolean > | FocusableProperty |
| Indicates whether the node can receive focus. | |
| DynamicPropertyType< Boolean > | FocusedProperty |
| Indicates whether the node has the key focus. | |
| DynamicPropertyType< FocusState > | FocusStateProperty |
| Reports the focus state of a node: | |
| DynamicPropertyType< Resource > | FontFamilyProperty |
| The font family used to render the text. | |
| DynamicPropertyType< Float > | HeightProperty |
| The height of the node when used in a layout. | |
| DynamicPropertyType< Boolean > | HitTestableContainerProperty |
| When enabled, Kanzi uses the layout bounds as geometry for hit testing. | |
| DynamicPropertyType< Boolean > | HitTestableProperty |
| When enabled, the node can be hit tested. | |
| DynamicPropertyType< NodeEnums.HorizontalAlignment > | HorizontalAlignmentProperty |
| The alignment in horizontal direction the node should use when it resides under a layout. | |
| DynamicPropertyType< Vector2 > | HorizontalMarginProperty |
| Sets the horizontal space between this node and other nodes that are adjacent to this node in a layout. | |
| DynamicPropertyType< Boolean > | HoverProperty |
| 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< Float > | OpacityProperty |
| Opacity of the node. | |
| DynamicPropertyType< String > | PathProperty = new DynamicPropertyType<>("Node.Path", String.class) |
| Full path to the node. | |
| DynamicPropertyType< Float > | Projection2DTo3DScaleProperty |
| Sets the scale factor to project pixels to 3D size. | |
| DynamicPropertyType< Resource > | StateManagerProperty |
| Sets the State Manager to the node. | |
| DynamicPropertyType< Resource > | StyleProperty |
| Sets a style to the node. | |
| DynamicPropertyType< NodeEnums.VerticalAlignment > | VerticalAlignmentProperty |
| The alignment in vertical direction the node should use when it resides under a layout. | |
| DynamicPropertyType< Vector2 > | VerticalMarginProperty |
| Sets the vertical space between this node and other nodes that are adjacent to this node in a layout. | |
| DynamicPropertyType< Float > | VisibleAmountInParentProperty |
| Sets the amount the node is inside its parent. | |
| DynamicPropertyType< Boolean > | VisibleProperty |
| When disabled, Kanzi does not render the node. | |
| DynamicPropertyType< Float > | WidthProperty = new DynamicPropertyType<>("Node.Width", Float.class) |
| The width of the node when used in a layout. | |
Base class for Kanzi nodes.
| ResourceDictionary acquireResourceDictionary | ( | ) |
Gets a resource dictionary of a node.
If a resource dictionary does not exist, the function creates it.
| void addInputManipulator | ( | InputManipulator | inputManipulator | ) |
Transfers the ownership and attaches an input manipulator to an object node.
| inputManipulator | The input manipulator to add. |
| 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.
| 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.
| resourceDictionary | The nested resource dictionary. |
| void attachRecursive | ( | ) |
Attaches an object node and its children recursively.
Reimplemented in Node.
| 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.
| 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 isEffectivelyFocusable | ( | ) |
Returns whether a node is focusable.
A node is focusable when it is a focus scope node or has FocusableProperty attached and set to true, or both.
| boolean isInitialized | ( | ) |
Gets the initialized status.
| boolean isNamed | ( | String | name | ) |
Checks if the node has the given name.
| name | Name to compare against. |
Indicates whether a value is an unbound layout value.
| layoutValue | Value to test if it is unbound layout value. |
Indicates whether a value is valid layout value.
Valid layout value is a non-negative floating point number. Valid layout value can be positive infinity (unbounded layout value).
| value | Value to test if it is unbound layout value. |
| KanziObject lookupObject | ( | String | relativePath | ) |
Lookup for an object from a node.
Object found may be another node or a resource within a node.
| relativePath | Relative path to use for lookup. |
Reimplemented in Node.
| 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 getResourceDictionary or acquireResourceDictionary. If you use other Node class functions like addResource or setResourceDictionary, you do not need to call this function.
Reimplemented in Node.
| void removeInputManipulator | ( | InputManipulator | inputManipulator | ) |
Removes the ownership and detaches an input manipulator from an object node.
| inputManipulator | The input manipulator to remove. |
| void removeResource | ( | ResourceID | resourceId | ) |
Removes a resource with given ID from object node resource dictionary.
Does not do anything if resourceID was not found.
| void setResourceDictionary | ( | ResourceDictionary | resourceDictionary | ) |
Replaces the resource dictionary of a node.
Updates all the resource references of the child nodes.
| resourceDictionary | The resource dictionary. |
| Node trySetFocus | ( | ) |
Tries to move the focus to 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. This is a convenience function of the FocusManager.trySetFocus(), that uses the node as target 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.
| fallbackOption | The fallback behavior: This moves the focus to the last-focused node of that overlay. |