55 *
56 * @see javax.swing.JTree
57 *
58 * @author Scott Violet
59 */
60 public class DefaultTreeCellEditor implements ActionListener, TreeCellEditor,
61 TreeSelectionListener {
62 /** Editor handling the editing. */
63 protected TreeCellEditor realEditor;
64
65 /** Renderer, used to get border and offsets from. */
66 protected DefaultTreeCellRenderer renderer;
67
68 /** Editing container, will contain the <code>editorComponent</code>. */
69 protected Container editingContainer;
70
71 /**
72 * Component used in editing, obtained from the
73 * <code>editingContainer</code>.
74 */
75 transient protected Component editingComponent;
76
77 /**
78 * As of Java 2 platform v1.4 this field should no longer be used. If
79 * you wish to provide similar behavior you should directly override
80 * <code>isCellEditable</code>.
81 */
82 protected boolean canEdit;
83
84 /**
85 * Used in editing. Indicates x position to place
86 * <code>editingComponent</code>.
87 */
88 protected transient int offset;
89
90 /** <code>JTree</code> instance listening too. */
91 protected transient JTree tree;
92
93 /** Last path that was selected. */
94 protected transient TreePath lastPath;
95
|
55 *
56 * @see javax.swing.JTree
57 *
58 * @author Scott Violet
59 */
60 public class DefaultTreeCellEditor implements ActionListener, TreeCellEditor,
61 TreeSelectionListener {
62 /** Editor handling the editing. */
63 protected TreeCellEditor realEditor;
64
65 /** Renderer, used to get border and offsets from. */
66 protected DefaultTreeCellRenderer renderer;
67
68 /** Editing container, will contain the <code>editorComponent</code>. */
69 protected Container editingContainer;
70
71 /**
72 * Component used in editing, obtained from the
73 * <code>editingContainer</code>.
74 */
75 protected transient Component editingComponent;
76
77 /**
78 * As of Java 2 platform v1.4 this field should no longer be used. If
79 * you wish to provide similar behavior you should directly override
80 * <code>isCellEditable</code>.
81 */
82 protected boolean canEdit;
83
84 /**
85 * Used in editing. Indicates x position to place
86 * <code>editingComponent</code>.
87 */
88 protected transient int offset;
89
90 /** <code>JTree</code> instance listening too. */
91 protected transient JTree tree;
92
93 /** Last path that was selected. */
94 protected transient TreePath lastPath;
95
|