Dali Provisional API
Release 3.2

org.eclipse.jpt.common.utility.model.value
Interface TreeNodeValueModel<V>

Type Parameters:
V - the type of values held by the model
All Superinterfaces:
Model, ModifiablePropertyValueModel<V>, PropertyValueModel<V>

public interface TreeNodeValueModel<V>
extends ModifiablePropertyValueModel<V>

Extend ModifiablePropertyValueModel to better support org.eclipse.jpt.common.utility.internal.model.value.swing.TreeModelAdapter.

Implementors of this interface should fire a "state change" event whenever the node's internal state changes in a way that the tree listeners should be notified.

Implementors of this interface should also fire a "value property change" event whenever the node's value changes. Typically, only nodes that hold "primitive" data will fire this event.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

See Also:
org.eclipse.jpt.common.utility.internal.model.value.AbstractTreeNodeValueModel

Nested Class Summary
static class TreeNodeValueModel.ParentTransformer<V>
           
 
Field Summary
static org.eclipse.jpt.common.utility.transformer.Transformer PARENT_TRANSFORMER
           
 
Fields inherited from interface org.eclipse.jpt.common.utility.model.value.PropertyValueModel
VALUE
 
Method Summary
 TreeNodeValueModel<V> child(int index)
          Return the node's child at the specified index.
 ListValueModel<TreeNodeValueModel<V>> childrenModel()
          Return a list value model of the node's child nodes.
 int childrenSize()
          Return the size of the node's list of children.
 int indexOfChild(TreeNodeValueModel<V> child)
          Return the index in the node's list of children of the specified child.
 boolean isLeaf()
          Return whether the node is a leaf (i.e. it has no children)
 TreeNodeValueModel<V> parent()
          Return the node's parent node; null if the node is the root.
 TreeNodeValueModel<V>[] path()
          Return the path to the node.
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel
setValue
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.value.PropertyValueModel
getValue
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener
 

Field Detail

PARENT_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer PARENT_TRANSFORMER
Method Detail

parent

TreeNodeValueModel<V> parent()
Return the node's parent node; null if the node is the root.


path

TreeNodeValueModel<V>[] path()
Return the path to the node.


childrenModel

ListValueModel<TreeNodeValueModel<V>> childrenModel()
Return a list value model of the node's child nodes.


child

TreeNodeValueModel<V> child(int index)
Return the node's child at the specified index.


childrenSize

int childrenSize()
Return the size of the node's list of children.


indexOfChild

int indexOfChild(TreeNodeValueModel<V> child)
Return the index in the node's list of children of the specified child.


isLeaf

boolean isLeaf()
Return whether the node is a leaf (i.e. it has no children)


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.