Base class for Kanzi nodes. More...
Classes | |
enum | ContentStretch |
Content stretch option. More... | |
enum | DepthAlignment |
Depth alignment options. More... | |
enum | HorizontalAlignment |
Horizontal alignment options. More... | |
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... | |
enum | VerticalAlignment |
Vertical alignment options. More... | |
Public Member Functions | |
ResourceManager.AcquireTask | acquireResourcesAsync (String resourceId, ResourceManager.AcquireTask.Callback callback) |
Posts an asynchronous task to acquire a resource. More... | |
boolean | addAbstractChild (Node child) |
Adds a node as child of this node. More... | |
void | addAnonymousResource (Resource resource) |
Adds anonymous resource (such as style) for object node resources. More... | |
MessageSubscriptionToken | addMessageFilter (MessageType messageType, MessageSubscriptionFunction messageHandlerFunction) |
Adds a message filter where the filter is a function. More... | |
MessageSubscriptionToken | addMessageHandler (MessageType messageType, MessageSubscriptionFunction messageHandlerFunction) |
Adds a message handler where the handler is a function. More... | |
MessageSubscriptionToken | addMessageHandler (MessageType messageType, MessageSubscriptionFunction messageHandlerFunction, Node messageSourceFilter) |
Adds a message handler where the handler is a function. More... | |
void | addNodeComponent (NodeComponent component) |
Transfers the ownership of a node component to an object node. More... | |
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. More... | |
void | addResource (String resourceId, String resourceUrl) |
Adds a resource manager resource to an object node. More... | |
MessageSubscriptionToken | addTunnelingMessageFilter (MessageType messageType, MessageSubscriptionFunction messageHandlerFunction) |
Adds a message filter where the filter is a function. More... | |
MessageSubscriptionToken | addTunnelingMessageHandler (MessageType messageType, MessageSubscriptionFunction messageHandlerFunction, Node messageSourceFilter) |
Adds a message handler where the handler is a function and you explicitly define the accepted source. More... | |
void | attachRecursive () |
Attaches a node and its children recursively. | |
boolean | containsResource (String resourceId) |
Returns if object node resource dictionary contains the resource with given ID. More... | |
void | detachRecursive () |
Detaches a node and its children recursively. | |
void | dispatchMessage (MessageType messageType, MessageArguments arguments) |
Dispatches a message from this node with specified arguments. More... | |
String | findResourceUrl (String resourceId) |
Tries to find Resource URL for Resource ID from this node. More... | |
Node | getAbstractChild (int index) |
Returns node at given child index. More... | |
int | getAbstractChildCount () |
Returns number of child nodes. More... | |
int | getAbstractChildIndex (Node node) |
Returns index of given node in list of child nodes. More... | |
float | getActualDepth () |
Gets the value of ActualDepthProperty. More... | |
float | getActualHeight () |
Gets the value of ActualHeightProperty. More... | |
float | getActualWidth () |
Gets the value of ActualWidthProperty. More... | |
float | getDepth () |
Gets the value of DepthProperty. More... | |
Vector2 | getDepthMargin () |
Gets the value of DepthMarginProperty. More... | |
float | getHeight () |
Gets the value of HeightProperty. More... | |
Vector2 | getHorizontalMargin () |
Gets the value of HorizontalMarginProperty. More... | |
String | getLocale () |
Gets the value of LocaleProperty. More... | |
String | getName () |
Gets the value of NameProperty. More... | |
float | getOpacity () |
Gets the value of OpacityProperty. More... | |
Node | getParent () |
Gets parent of this node. More... | |
String | getPath () |
Gets the value of PathProperty. More... | |
Resource | getStateManager () |
Gets the value of StateManagerProperty. More... | |
Resource | getStyle () |
Gets the value of StyleProperty. More... | |
Vector2 | getVerticalMargin () |
Gets the value of VerticalMarginProperty. More... | |
float | getWidth () |
Gets the value of WidthProperty. More... | |
boolean | isAttached () |
Checks if node is attached to ui tree. More... | |
boolean | isAttaching () |
Checks if node is in the process of attaching to ui tree. More... | |
boolean | isClipChildren () |
Gets the value of ClipChildrenProperty. More... | |
boolean | isDetaching () |
Checks if node is in the process of getting detached from ui tree. More... | |
boolean | isEffectivelyEnabled () |
Returns whether a node and its ancestor nodes are enabled. More... | |
boolean | isEffectivelyFocusable () |
Returns whether a node and its ancestor focus scope nodes are focusable. More... | |
boolean | isEffectivelyVisible () |
Returns whether a node and its ancestor nodes are visible. More... | |
boolean | isEnabled () |
Gets the value of EnabledProperty. More... | |
boolean | isFocusable () |
Gets the value of the FocusableProperty. More... | |
boolean | isFocused () |
Sets whether a node is an active focus node and can receive keyboard messages. More... | |
boolean | isHitTestable () |
Gets the value of HitTestableProperty. More... | |
boolean | isHitTestableContainer () |
Gets the value of HitTestableContainerProperty. More... | |
boolean | isHover () |
Gets the value of HoverProperty. More... | |
boolean | isInitialized () |
Checks if initialize() has been called. More... | |
boolean | isNamed (String name) |
Checks if node has a given name. More... | |
boolean | isVisible () |
Gets the value of VisibleProperty. More... | |
Iterable< NodeComponent > | iterateNodeComponents () |
Gets an Iterable object used to iterate the Node Components. More... | |
NodeComponent | lookupNodeComponentByName (String name) |
Look up a Node Component bu Name. More... | |
KanziObject | lookupObject (String path) |
Returns a KanziObject by looking it up with specified path or alias. More... | |
boolean | removeAbstractChild (Node child) |
Removes child node from this node. More... | |
void | removeAnonymousResource (Resource resource) |
Removes anonymous resource from object node resources. More... | |
void | removeMessageHandler (MessageSubscriptionToken token) |
Removes a message subscription. More... | |
void | removeNodeComponent (NodeComponent component) |
Removes the ownership of a node component from an object node. More... | |
void | removeNodeComponentWithOwner (KanziObject owner) |
Removes all node component bindings with the specified owner. More... | |
void | removeResource (String resourceId) |
Removes a resource with given ID from object node resource dictionary. More... | |
void | setActualDepth (float value) |
Sets the value of ActualDepthProperty. More... | |
void | setActualHeight (float value) |
Sets the value of ActualHeightProperty. More... | |
void | setActualWidth (float value) |
Sets the value of ActualWidthProperty. More... | |
void | setAutoHeight () |
Sets node to automatically determine height. | |
void | setAutoWidth () |
Sets node to automatically determine width. | |
void | setClipChildren (boolean value) |
Sets the value of ClipChildrenProperty. More... | |
void | setDepth (float value) |
Sets the value of DepthProperty. More... | |
void | setDepthMargin (Vector2 value) |
Sets the value of DepthMarginProperty. More... | |
void | setEnabled (boolean value) |
Sets the value of the EnabledProperty. More... | |
void | setFocusable (boolean value) |
Sets the value of the FocusableProperty. More... | |
void | setFocused (boolean value) |
Sets the value of the FocusedProperty. More... | |
void | setHeight (float value) |
Sets the value of HeightProperty. More... | |
void | setHitTestable (boolean value) |
Sets the value of HitTestableProperty. More... | |
void | setHitTestableContainer (boolean value) |
Sets the value of HitTestableContainerProperty. More... | |
void | setHorizontalMargin (Vector2 value) |
Sets the value of HorizontalMarginProperty. More... | |
void | setHover (boolean value) |
Sets the value of HoverProperty. More... | |
void | setLocale (String value) |
Sets the value of LocaleProperty. More... | |
void | setName (String name) |
Sets the value of NameProperty. More... | |
void | setOpacity (float value) |
Sets the value of OpacityProperty. More... | |
void | setStateManager (Resource value) |
Sets the value of StateManagerProperty. More... | |
void | setStyle (Resource value) |
Sets the value of StyleProperty. More... | |
void | setVerticalMargin (Vector2 value) |
Sets the value of VerticalMarginProperty. More... | |
void | setVisible (boolean value) |
Sets the value of VisibleProperty. More... | |
void | setWidth (float value) |
Sets the value of WidthProperty. More... | |
Node | trySetFocus () |
Tries to move the focus on this node. More... | |
Public Member Functions inherited from KanziObject | |
boolean | equals (Object object) |
Domain | getDomain () |
Returns the domain the object belongs to. More... | |
Metaclass | getDynamicMetaclass () |
Returns the metaclass of the dynamic type of the object. More... | |
boolean | isStale () |
Test if the object is stale i.e. More... | |
void | removeLocalValue (PropertyType propertyType) |
Removes the local value associated with the property. More... | |
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. More... | |
DynamicPropertyType< Float > | ActualHeightProperty |
The calculated height of the node when used in a layout. More... | |
DynamicPropertyType< Float > | ActualWidthProperty |
The calculated width of the node when used in a layout. More... | |
DynamicPropertyType< Boolean > | ClipChildrenProperty |
Sets whether to clip the child nodes of thos node. More... | |
DynamicPropertyType< Integer > | ContentStretchProperty |
Sets how the content that belongs to this node is stretched (as opposed to manipulating the actual node size). More... | |
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. More... | |
DynamicPropertyType< Integer > | DepthAlignmentProperty |
The alignment in depth direction the node should use when it resides under a layout. More... | |
DynamicPropertyType< Vector2 > | DepthMarginProperty |
Sets the depth distance between this node and other nodes that are adjacent to this node in a layout. More... | |
DynamicPropertyType< Float > | DepthProperty = new DynamicPropertyType<>("Node.Depth", Float.class) |
The size of the node in depth direction when used in a layout. More... | |
DynamicPropertyType< Boolean > | EffectivelyEnabledProperty |
Indicates whether this node and its ancestor nodes are enabled. More... | |
DynamicPropertyType< Boolean > | EnabledProperty |
Whether this node is enabled. More... | |
DynamicPropertyType< Boolean > | FocusableProperty |
Indicates whether the node can receive focus. More... | |
DynamicPropertyType< Boolean > | FocusedProperty |
Indicates whether the node has focus. More... | |
DynamicPropertyType< Resource > | FontFamilyProperty |
The font family used to render the text. More... | |
DynamicPropertyType< Float > | HeightProperty |
The height of the node when used in a layout. More... | |
DynamicPropertyType< Boolean > | HitTestableContainerProperty |
When enabled, Kanzi uses the layout bounds as geometry for hit testing. More... | |
DynamicPropertyType< Boolean > | HitTestableProperty |
When enabled, users can pick the node from the default Camera node of the active Scene node. More... | |
DynamicPropertyType< Integer > | HorizontalAlignmentProperty |
The alignment in horizontal direction the node should use when it resides under a layout. More... | |
DynamicPropertyType< Vector2 > | HorizontalMarginProperty |
Sets the horizontal space between this node and other nodes that are adjacent to this node in a layout. More... | |
DynamicPropertyType< Boolean > | HoverProperty |
Indicates whether a node is the foremost hit testable node under the cursor. More... | |
DynamicPropertyType< String > | LocaleProperty |
The locale of the node. More... | |
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. More... | |
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. More... | |
DynamicPropertyType< Resource > | StateManagerProperty |
Sets the State Manager to the node. More... | |
DynamicPropertyType< Resource > | StyleProperty |
Sets a style to the node. More... | |
DynamicPropertyType< Integer > | VerticalAlignmentProperty |
The alignment in vertical direction the node should use when it resides under a layout. More... | |
DynamicPropertyType< Vector2 > | VerticalMarginProperty |
Sets the vertical space between this node and other nodes that are adjacent to this node in a layout. More... | |
DynamicPropertyType< Float > | VisibleAmountInParentProperty |
Sets the amount the node is inside its parent. More... | |
DynamicPropertyType< Boolean > | VisibleProperty |
When disabled, Kanzi does not render the node. More... | |
DynamicPropertyType< Float > | WidthProperty = new DynamicPropertyType<>("Node.Width", Float.class) |
The width of the node when used in a layout. More... | |
Base class for Kanzi nodes.
ResourceManager.AcquireTask acquireResourcesAsync | ( | String | resourceId, |
ResourceManager.AcquireTask.Callback | callback | ||
) |
Posts an asynchronous task to acquire a resource.
resourceId | Name of the resource. |
callback | Callback function that this function calls when resource loading is completed. |
boolean addAbstractChild | ( | Node | child | ) |
Adds a node as child of this node.
child | Node to add as child. |
void addAnonymousResource | ( | Resource | resource | ) |
Adds anonymous resource (such as style) for object node resources.
resource | The resource to be added. |
MessageSubscriptionToken addMessageFilter | ( | MessageType | messageType, |
MessageSubscriptionFunction | 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.
messageType | The message type to listen to. |
messageHandlerFunction | The function invoked when the node that owns the filter receives a matching message. |
MessageSubscriptionToken addMessageHandler | ( | MessageType | messageType, |
MessageSubscriptionFunction | 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.
messageType | The message type to listen to. |
messageHandlerFunction | The function invoked when the node that owns the handler receives a matching message. The source of the message has to be the node itself. |
MessageSubscriptionToken addMessageHandler | ( | MessageType | messageType, |
MessageSubscriptionFunction | 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.
messageType | The message type to listen to. |
messageHandlerFunction | The function invoked when the node that owns the handler receives a matching message. |
messageSourceFilter | The handler will only be called when the message is from this source. |
void addNodeComponent | ( | NodeComponent | component | ) |
Transfers the ownership of a node component to an object node.
component | The component being added. |
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.
component | The component being added. |
owner | The Kanzi object that owns the lifetime of the component. |
void addResource | ( | String | resourceId, |
String | resourceUrl | ||
) |
MessageSubscriptionToken addTunnelingMessageFilter | ( | MessageType | messageType, |
MessageSubscriptionFunction | 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.
messageType | The message type to listen to. |
messageHandlerFunction | The function invoked when the node that owns the filter receives a matching message. |
MessageSubscriptionToken addTunnelingMessageHandler | ( | MessageType | messageType, |
MessageSubscriptionFunction | 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.
messageType | The message type to listen to. |
messageHandlerFunction | The function invoked when the node that owns the handler receives a matching message. The source of the message has to be the node itself. |
messageSourceFilter | Source node of the messages. |
boolean containsResource | ( | String | resourceId | ) |
void dispatchMessage | ( | MessageType | messageType, |
MessageArguments | arguments | ||
) |
Dispatches a message from this node with specified arguments.
messageType | The type of the dispatched message. |
arguments | The arguments of the dispatched message. |
String findResourceUrl | ( | String | resourceId | ) |
Node getAbstractChild | ( | int | index | ) |
Returns node at given child index.
index | Index of the node to get. |
int getAbstractChildCount | ( | ) |
Returns number of child nodes.
int getAbstractChildIndex | ( | Node | node | ) |
Returns index of given node in list of child nodes.
node | Node to get child index. |
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.
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.
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 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.
The ancestor focus scope lookup stops once a popup-type focus scope is reached.
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.
In a Kanzi application only one node at a time can have active focus. The default value is false.
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 isNamed | ( | String | name | ) |
Checks if node has a given name.
name | Name to check. |
boolean isVisible | ( | ) |
Gets the value of VisibleProperty.
Iterable<NodeComponent> iterateNodeComponents | ( | ) |
NodeComponent lookupNodeComponentByName | ( | String | name | ) |
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.
path | Relative path to use for lookup. |
IllegalArgumentException | Throws an IllegalArgumentException if the path is malformed. |
boolean removeAbstractChild | ( | Node | child | ) |
Removes child node from this node.
child | Child node to remove. |
void removeAnonymousResource | ( | Resource | resource | ) |
Removes anonymous resource from object node resources.
resource |
void removeMessageHandler | ( | MessageSubscriptionToken | token | ) |
Removes a message subscription.
token | The message subscription token which identifies the handler or filter. |
void removeNodeComponent | ( | NodeComponent | component | ) |
Removes the ownership of a node component from an object node.
component | The component being removed. |
void removeNodeComponentWithOwner | ( | KanziObject | owner | ) |
Removes all node component bindings with the specified owner.
owner | The Kanzi object used as the owner |
void removeResource | ( | String | resourceId | ) |
Removes a resource with given ID from object node resource dictionary.
Does not do anything if resourceID was not found.
resourceId | Resource id of resource to remove. |
void setActualDepth | ( | float | value | ) |
Sets the value of ActualDepthProperty.
value | New value. |
void setActualHeight | ( | float | value | ) |
Sets the value of ActualHeightProperty.
value | New value. |
void setActualWidth | ( | float | value | ) |
Sets the value of ActualWidthProperty.
value | New value. |
void setClipChildren | ( | boolean | value | ) |
Sets the value of ClipChildrenProperty.
value | New value. |
void setDepth | ( | float | value | ) |
Sets the value of DepthProperty.
value | New value. |
void setDepthMargin | ( | Vector2 | value | ) |
Sets the value of DepthMarginProperty.
value | New value. |
void setEnabled | ( | boolean | value | ) |
Sets the value of the EnabledProperty.
value | New value. |
void setFocusable | ( | boolean | value | ) |
Sets the value of the FocusableProperty.
value | To enable a node to get active focus and participate in focus chain navigation, set to true, |
void setFocused | ( | boolean | value | ) |
Sets the value of the FocusedProperty.
value | To set active focus, set to true. To clear focus, set to false. |
void setHeight | ( | float | value | ) |
Sets the value of HeightProperty.
value | New value. |
void setHitTestable | ( | boolean | value | ) |
Sets the value of HitTestableProperty.
value | New value. |
void setHitTestableContainer | ( | boolean | value | ) |
Sets the value of HitTestableContainerProperty.
value | New value. |
void setHorizontalMargin | ( | Vector2 | value | ) |
Sets the value of HorizontalMarginProperty.
value | New value. |
void setHover | ( | boolean | value | ) |
Sets the value of HoverProperty.
value | New value. |
void setLocale | ( | String | value | ) |
Sets the value of LocaleProperty.
value | New value. |
void setName | ( | String | name | ) |
Sets the value of NameProperty.
name | New name to assign. |
void setOpacity | ( | float | value | ) |
Sets the value of OpacityProperty.
value | New value. |
void setStateManager | ( | Resource | value | ) |
Sets the value of StateManagerProperty.
value | New value. |
void setStyle | ( | Resource | value | ) |
Sets the value of StyleProperty.
value | New style. |
void setVerticalMargin | ( | Vector2 | value | ) |
Sets the value of VerticalMarginProperty.
value | New value. |
void setVisible | ( | boolean | value | ) |
Sets the value of VisibleProperty.
value | New value. |
void setWidth | ( | float | value | ) |
Sets the value of WidthProperty.
value | New value. |
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.