KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > swing > outline > OutlineModel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.swing.outline;
21
22 import javax.swing.table.TableModel JavaDoc;
23 import javax.swing.tree.AbstractLayoutCache JavaDoc;
24 import javax.swing.tree.TreeModel JavaDoc;
25
26 /** A model for an Outline ("tree-table"). Implements both
27  * TreeModel and TableModel (the default implementation, DefaultOutlineModel,
28  * wraps a supplied TreeModel and TableModel). It is vastly easier to
29  * use <code>DefaultOutlineModel</code> than to implement this interface
30  * directly.
31  *
32  * @author Tim Boudreau */

33 public interface OutlineModel extends TableModel JavaDoc, TreeModel JavaDoc {
34     /** Get the <code>TreePathSupport</code> object this model uses to manage
35      * information about expanded nodes. <code>TreePathSupport</code> implements
36      * logic for tracking expanded nodes, manages <code>TreeWillExpandListener</code>s,
37      * and is a repository for preserving expanded state information about nodes whose parents
38      * are currently collapsed. JTree implements very similar logic internally
39      * to itself.
40      * <p>
41      * <i>(PENDING) It is not yet determined if TreePathSupport will remain a
42      * public class.</i>
43      */

44     public TreePathSupport getTreePathSupport();
45     /** Get the layout cache which is used to track the visual state of nodes.
46      * This is typically one of the standard JDK layout cache classes, such
47      * as <code>VariableHeightLayoutCache</code> or <code>
48      * FixedHeightLayoutCache</code>. */

49     public AbstractLayoutCache JavaDoc getLayout();
50     /** Determine if the model is a large-model. Large model trees keep less
51      * internal state information, relying on the TreeModel more. Essentially
52      * they trade performance for scalability. An OutlineModel may be large
53      * model or small model; primarily this affects the type of layout cache
54      * used, just as it does with JTree. */

55     public boolean isLargeModel();
56     /**
57      * This method allows you to set the name of the column representing the node.
58      * Added 4/19/2004 - David Botterill
59      * @param inName - the name to be given to the node column.
60      */

61     public void setNodeColumnName(String JavaDoc inName);
62     /**
63      * Get the NodeRowModel interface so we can manage information about nodes as they related
64      * to rows.
65      * Added 4/19/2004 - David Botterill
66      */

67     public NodeRowModel getRowNodeModel();
68     
69 }
70
Popular Tags