ubiware.core.visualizer
Interface SubtreesTreeModel

All Superinterfaces:
javax.swing.tree.TreeModel
All Known Implementing Classes:
BeliefContainerTreeModel, BeliefTreeModel, SemanticStatementElementTreeModel, StringLiteralTreeModel

public interface SubtreesTreeModel
extends javax.swing.tree.TreeModel

A SubtreesTreeModel is a tree model which does not solely handle the whole tree structure, but instead, it handles only its very own immediate children. Children of its children and further down are responsibility of their own immediate parents and this tree will pass queries further down, to its own children, if it is not the parent of a query.

Classes which implement this interface will usually have as children other SubtreesTreeModels but this is not necessary. The children should at least, though, be able to handle queries themselves, since this tree will pass down the queries if it is not the parent of the child.

Generally, for each method mXXX of this interface, the operation will be something like:

 public Object mXXX(Object parent, Object child) {
        if (parent == this)
                return myOwnResult(parent, child);
        return TreeModel.class.cast(parent).mXXX(parent, child);
 }
 

Author:
Nikos Mouchtaris

Method Summary
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged