The ListBoxItemGenerator2D manages a list of items for a 2D List Box. More...
Public Member Functions | |
Node2D | acquireItem (int index) |
Gets the object to display at the given index. More... | |
void | attach (Node2D node) |
Attaches the object generator. More... | |
void | close () |
Closes the object, and releases the native resources. | |
void | detach (Node2D node) |
Detaches the object generator. More... | |
int | getCount () |
Gets the number of objects known to the object generator. More... | |
int | getItemIndex (Node2D object) |
Gets the index of the object returned by getObject. More... | |
Vector2 | getItemSize (int index) |
Gets the size of the object to display at the given index. More... | |
void | releaseItem (Node2D 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... | |
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... | |
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 | |
ListBoxItemGenerator2D (Domain domain, long handle, Metaclass metaclass) | |
Wraps a given native ListBoxItemGenerator2D. More... | |
void | initialize () |
Initializes the ListBoxItemGenerator3D. | |
Static Protected Member Functions | |
static< Derived extends ListBoxItemGenerator2D > ObjectRef< Derived > | createDerived (Domain domain, Metaclass metaclass) |
Creates a derived class instance. More... | |
Additional Inherited Members | |
Public Attributes inherited from ListBoxItemGenerator2DMetadata | |
AbstractMetaclass | metaclass = new AbstractMetaclass("Kanzi.ListBoxItemGenerator2D") |
Metaclass for ListBoxItemGenerator2D. | |
The ListBoxItemGenerator2D manages a list of items for a 2D List Box.
|
protected |
Wraps a given native ListBoxItemGenerator2D.
Called by KanziObject.connectObject(long) when connecting to a native node component.
Node2D 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.
index | The index of the object to get. |
void attach | ( | Node2D | node | ) |
Attaches the object generator.
node | The node to which to attach the object generator. |
|
staticprotected |
Creates a derived class instance.
Call this method as part of the create method for a derived class.
domain | UI Domain where this ListBoxItemGenerator2D belongs. |
metaclass | Metaclass data of the ListBoxItemGenerator2D. |
void detach | ( | Node2D | node | ) |
Detaches the object generator.
node | The node from which to detach the object generator. |
int getCount | ( | ) |
Gets the number of objects known to the object generator.
You can calculate the index of the last item as 'count' - 1.
int getItemIndex | ( | Node2D | object | ) |
Gets the index of the object returned by getObject.
object | The object for which to get the index. |
Vector2 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.
index | The index of the object for which to get the size. |
void releaseItem | ( | Node2D | object | ) |
Frees the object returned by getObject.
object | The object to free. |