public abstract class nUIObject
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
nUIEventListener |
event_listener
Deprecated.
property will be private
|
boolean |
event_listener_exclusive
Deprecated.
property will be private
|
nUIObject |
first_child
Deprecated.
property will be protected
|
nUIObject |
last_child
Deprecated.
property will be protected
|
nUIObject |
next_sibling
Deprecated.
property will be protected
|
int |
nuiid
Deprecated.
property will be private
|
nUIObject |
parent
Deprecated.
property will be protected
|
nUIObject |
prev_sibling
Deprecated.
property will be protected
|
boolean |
unlink_children_on_removal_from_parent
Deprecated.
property will be private
|
Constructor and Description |
---|
nUIObject(int nuiid) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(nUIObject to_add)
Add a nUIObject as a child of this one.
|
void |
addEventListener(nUIEventListener listener,
boolean exclusive)
Adds a new event-listener, replacing any previously defined listener
|
nUIObject |
childElementAt(int index)
Gets the child nUIObject at a given index (starting from 0).
|
int |
childIndexOf(nUIObject object)
Find the index of this nUIObject inside its parent.
|
java.lang.Object |
getTag()
Gets user-defined data
|
boolean |
insertAfter(nUIObject object,
nUIObject to_add)
Insert a nUIObject as a child of this one, and place it after an existing child.
|
boolean |
insertAt(int index,
nUIObject to_add)
Insert a nUIObject as a child of this one, at the given index.
|
boolean |
insertBefore(nUIObject object,
nUIObject to_add)
Insert a nUIObject as a child of this one, and place it before an existing child.
|
void |
onRemoved()
The method will be called immediately after this object has has been
removed from its parent.
|
void |
outputChildHierarchy(java.lang.String prefix,
boolean dimensions)
Debugs to the console the hierarchy of this object and all its children
|
boolean |
remove(int index)
Remove a child nUIObject from this one.
|
boolean |
remove(nUIObject to_remove)
Remove a child nUIObject from this one.
|
void |
removeEventListener(nUIEventListener listener)
Removes an existing event-listener
|
boolean |
replace(int index,
nUIObject to_add)
Replace the child nUIObject at a given index.
|
boolean |
replace(nUIObject object,
nUIObject to_add)
Replace a current child of this nUIObject with another nUIObject.
|
void |
setTag(java.lang.Object tag)
Sets user-defined data
|
public int nuiid
public nUIObject parent
public nUIObject prev_sibling
public nUIObject next_sibling
public nUIObject first_child
public nUIObject last_child
public boolean unlink_children_on_removal_from_parent
public nUIEventListener event_listener
public boolean event_listener_exclusive
public nUIObject(int nuiid)
nuiid
- Unique Native UI ID (or -1 if unidentified)public java.lang.Object getTag()
public void setTag(java.lang.Object tag)
tag
- public nUIObject childElementAt(int index)
null
will be returned.index
- the index of the child element to get.public int childIndexOf(nUIObject object)
object
- the nUIObject to find.public boolean add(nUIObject to_add)
to_add
- the child nUIObject to add.public boolean insertAt(int index, nUIObject to_add)
index
- The index to add a new objectto_add
- The new object to addpublic void onRemoved()
unlink_children_on_removal_from_parent
is set to
false
, references to children will be retained.public boolean remove(nUIObject to_remove)
to_remove
- the nUIObject to remove.public boolean remove(int index)
index
- the index of the nUIObjectpublic boolean insertBefore(nUIObject object, nUIObject to_add)
object
- the object to insert beforeto_add
- the object to addpublic boolean insertAfter(nUIObject object, nUIObject to_add)
object
- the nUIObject to insert afterto_add
- the new nUIObject to add.public boolean replace(nUIObject object, nUIObject to_add)
object
- the child nUIObject to replaceto_add
- the new nUIObejct to insertpublic boolean replace(int index, nUIObject to_add)
index
- the index of the child to replace.to_add
- the new nUIObject to insert.public void addEventListener(nUIEventListener listener, boolean exclusive)
listener
- The new listenerexclusive
- If only this listener should be called (not the generic listener)public void removeEventListener(nUIEventListener listener)
listener
- The listener to removepublic void outputChildHierarchy(java.lang.String prefix, boolean dimensions)
prefix
- String prefix to prepend to output - will be appended with ">" for each depthdimensions
- Should x/y/w/h dimensions by output