public interface IlvDataContainer
IlvProjectDocument
Modifier and Type | Field and Description |
---|---|
static String |
NODE_TITLE_PROPERTY
Bound property name for the title of a node.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptChild(Object parent,
String category)
Determines whether the specified
parent node can have
a child added with the specified category . |
void |
addDataContainerListener(DataContainerListener listener)
Adds the specified data container listener to receive data container
events from this container.
|
boolean |
canRemove(Object parent,
Object node)
Determines whether the specified
node can be removed
from this data container. |
String |
getCategory(Object node)
Returns the category of the
node . |
Object |
getChildAt(Object parent,
int index)
Returns the child node at the specified
index in
the child array of the parent node. |
int |
getChildCount(Object parent)
Returns the number of children of the
parent node. |
int |
getIndexOfChild(Object parent,
Object child)
Returns the index of the
child node in the
child array of the parent node. |
Object |
getNodeProperty(Object node,
String propertyName)
Returns the value of the
node property with the specified
propertyName . |
Object |
getParent(Object node)
Returns the parent node of the specified
node . |
String |
getTitle(Object node)
Returns the title of the specified
node . |
void |
insertNode(Object parent,
Object node,
int index)
Inserts the specified
node among the children of the
specified parent node at a specified position. |
void |
removeDataContainerListener(DataContainerListener listener)
Removes the specified data container listener, so that it no longer receives
data container events from the data container.
|
boolean |
removeNode(Object parent,
Object node)
Removes the specified
node from the list of child nodes of the
specified parent node. |
void |
setNodeProperty(Object node,
String propertyName,
Object value)
Sets a new value to the property of the specified
node
with the specified propertyName . |
void |
setTitle(Object node,
String title)
Sets a title for the specified
node . |
static final String NODE_TITLE_PROPERTY
Object getParent(Object node)
node
.node
- The node to retrieve the parent from.null
if the specified node is a
root node.Object getChildAt(Object parent, int index)
index
in
the child array of the parent
node.parent
- The parent node to add a child to.index
- The index of the node to return.parent
is null
,
the root node at the specified index
will be returned.getChildCount(java.lang.Object)
int getChildCount(Object parent)
parent
node. If
parent is null
, it will return the number of root nodes.getChildAt(java.lang.Object, int)
int getIndexOfChild(Object parent, Object child)
child
node in the
child array of the parent
node.parent
- The parent node.child
- The child node.String getTitle(Object node)
node
.
The implementation method should return the value of the
NODE_TITLE_PROPERTY
of the specified node.node
- The node to get the title of.setTitle(java.lang.Object, java.lang.String)
,
getNodeProperty(java.lang.Object, java.lang.String)
void setTitle(Object node, String title)
node
.
The NODE_TITLE_PROPERTY
of the node must be set to the
specified title.node
- The node to set the title to.title
- The new title of the node.getTitle(java.lang.Object)
,
setNodeProperty(java.lang.Object, java.lang.String, java.lang.Object)
Object getNodeProperty(Object node, String propertyName)
node
property with the specified
propertyName
.node
- The node to get the property value from.propertyName
- The name of the property to return the value from.setNodeProperty(java.lang.Object, java.lang.String, java.lang.Object)
void setNodeProperty(Object node, String propertyName, Object value)
node
with the specified propertyName
.
NodePropertyChangeEvent
is triggered to notify of this
node property change.node
- The node to change the property of.propertyName
- The name of the property to change the value of.value
- The new value of the property.getNodeProperty(java.lang.Object, java.lang.String)
String getCategory(Object node)
node
.
Categories of nodes group nodes with the same logical type. For example,
the same icons are used to represent nodes with the same category
in an IlvExplorerView
.node
- The node to get a category from.void insertNode(Object parent, Object node, int index)
node
among the children of the
specified parent
node at a specified position.parent
- The node to insert a new child node in.node
- The new node to insert.index
- Specifies the position at which to insert the node
.
If equal to -1
, the node
will be added at the last
position of the child array of the parent
.removeNode(java.lang.Object, java.lang.Object)
boolean removeNode(Object parent, Object node)
node
from the list of child nodes of the
specified parent
node.parent
- The node to remove a child node from.node
- The node to remove.true
if the node was previously added to data container
as a child of the parent
; false
otherwise.insertNode(java.lang.Object, java.lang.Object, int)
,
canRemove(java.lang.Object, java.lang.Object)
boolean acceptChild(Object parent, String category)
parent
node can have
a child added with the specified category
.parent
- The parent node.category
- The category of nodes to add.true
if the parent
accepts
a node with the specified category as a child; false
otherwise.boolean canRemove(Object parent, Object node)
node
can be removed
from this data container.parent
- The parent node of the specified node
-
can be null
.node
- The node to remove.true
if the node
can be removed;
false
otherwise.removeNode(java.lang.Object, java.lang.Object)
void addDataContainerListener(DataContainerListener listener)
listener
is null
,
no exception will be thrown and no action will be performed.listener
- The data container listener to add.removeDataContainerListener(ilog.views.appframe.docview.project.DataContainerListener)
void removeDataContainerListener(DataContainerListener listener)
listener
is null
, no exception will be thrown and
no action will be performed.listener
- The data container listener to remove.addDataContainerListener(ilog.views.appframe.docview.project.DataContainerListener)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.