Kanzi  3.9.6
Java API
ListBoxItemGenerator3D Class Referenceabstract

The ListBoxItemGenerator3D manages a list of items for a 3D List Box. More...

Inheritance diagram for ListBoxItemGenerator3D:
[legend]

Public Member Functions

Node3D acquireItem (int index)
 Gets the object to display at the given index. More...
 
void attach (Node3D node)
 Attaches the object generator. More...
 
void close ()
 Closes the object, and release the native resources.
 
void detach (Node3D node)
 Detaches the object generator. More...
 
int getCount ()
 Gets the number of objects known to the object generator. More...
 
int getItemIndex (Node3D object)
 Gets the index of the object returned by getObject. More...
 
Vector3 getItemSize (int index)
 Gets the size of the object to display at the given index. More...
 
void releaseItem (Node3D object)
 Frees the object returned by getObject. 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...
 
long getNative ()
 Gets a pointer to the backing C++ instance. More...
 
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. More...
 
TDataType getProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type. More...
 
EnumType getProperty (PropertyType< Integer > propertyType, Class< EnumType > enumClass)
 Returns the current value of an integer property type converted to a matching constant from specified enumeration. More...
 
int hashCode ()
 
boolean hasValue (PropertyType< TDataType > propertyType)
 Evaluates whether there are any inputs into the property value. More...
 
boolean isStale ()
 Test if the object is stale i.e. More...
 
void removeLocalValue (PropertyType< TDataType > propertyType)
 Removes the local value associated with the property. More...
 
void setProperty (PropertyType< TDataType > propertyType, TDataType value)
 Sets the local value of a property type. More...
 
void setProperty (PropertyType< Integer > propertyType, EnumType value)
 Sets the local value of an integer property type using a constant from an enumeration. More...
 
ObjectRef< TType > tryCreateObjectRef (Class< TType > clazz)
 Tries to create an owning ObjectRef instance to this KanziObject. More...
 

Static Public Attributes

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

Protected Member Functions

 ListBoxItemGenerator3D (Domain domain, long handle, Metaclass metaclass)
 Wraps a given native ListBoxItemGenerator3D. More...
 
void initialize ()
 Initializes the ListBoxItemGenerator3D.
 

Static Protected Member Functions

static< Derived extends ListBoxItemGenerator3D > ObjectRef< Derived > createDerived (Domain domain, Metaclass metaclass)
 Creates a derived class instance. More...
 

Additional Inherited Members

- Public Attributes inherited from ListBoxItemGenerator3DMetadata
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.ListBoxItemGenerator3D")
 Metaclass for ListBoxItemGenerator3D.
 

Detailed Description

The ListBoxItemGenerator3D manages a list of items for a 3D List Box.

Constructor & Destructor Documentation

◆ ListBoxItemGenerator3D()

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

Wraps a given native ListBoxItemGenerator3D.

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

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

Member Function Documentation

◆ acquireItem()

Node3D acquireItem ( int  index)

Gets the object to display at the given index.

If the object already exists and was not freed, the method returns the object from cache.

Parameters
indexThe index of the object to get.
Returns
The object to display at the given index.

◆ attach()

void attach ( Node3D  node)

Attaches the object generator.

Parameters
nodeThe node to which to attach the object generator.

◆ createDerived()

static <Derived extends ListBoxItemGenerator3D> ObjectRef<Derived> createDerived ( Domain  domain,
Metaclass  metaclass 
)
staticprotected

Creates a derived class instance.

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

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

◆ detach()

void detach ( Node3D  node)

Detaches the object generator.

Parameters
nodeThe node from which to detach the object generator.

◆ getCount()

int getCount ( )

Gets the number of objects known to the object generator.

You can calculate the index of the last item as 'count' - 1.

Returns
The number of objects known to the object generator.

◆ getItemIndex()

int getItemIndex ( Node3D  object)

Gets the index of the object returned by getObject.

Parameters
objectThe object for which to get the index.
Returns
The index of the object. If the object does not exist, -1.

◆ getItemSize()

Vector3 getItemSize ( int  index)

Gets the size of the object to display at the given index.

If you do not provide an object prototype to the list box, Kanzi uses the size that this method returns. If it is not possible to determine the item size without acquiring the item first, returns an unbounded layout value. It is recommended to cache the sizes of objects.

Parameters
indexThe index of the object for which to get the size.
Returns
The item size.

◆ releaseItem()

void releaseItem ( Node3D  object)

Frees the object returned by getObject.

Parameters
objectThe object to free.

Member Data Documentation

◆ metaclass

final Metaclass metaclass
static