KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > tree > TreeCellEditor


1 /*
2  * @(#)TreeCellEditor.java 1.14 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.swing.tree;
9
10 import java.awt.Component JavaDoc;
11 import javax.swing.CellEditor JavaDoc;
12 import javax.swing.JTree JavaDoc;
13
14 /**
15   * Adds to CellEditor the extensions necessary to configure an editor
16   * in a tree.
17   *
18   * @see javax.swing.JTree
19   *
20   * @version 1.14 12/19/03
21   * @author Scott Violet
22   */

23
24 public interface TreeCellEditor extends CellEditor JavaDoc
25 {
26     /**
27      * Sets an initial <I>value</I> for the editor. This will cause
28      * the editor to stopEditing and lose any partially edited value
29      * if the editor is editing when this method is called. <p>
30      *
31      * Returns the component that should be added to the client's
32      * Component hierarchy. Once installed in the client's hierarchy
33      * this component will then be able to draw and receive user input.
34      *
35      * @param tree the JTree that is asking the editor to edit;
36      * this parameter can be null
37      * @param value the value of the cell to be edited
38      * @param isSelected true is the cell is to be renderer with
39      * selection highlighting
40      * @param expanded true if the node is expanded
41      * @param leaf true if the node is a leaf node
42      * @param row the row index of the node being edited
43      * @return the component for editing
44      */

45     Component JavaDoc getTreeCellEditorComponent(JTree JavaDoc tree, Object JavaDoc value,
46                      boolean isSelected, boolean expanded,
47                      boolean leaf, int row);
48 }
49
Popular Tags