1. /*
  2. * @(#)TreeCellEditor.java 1.10 00/02/02
  3. *
  4. * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package javax.swing.tree;
  11. import java.awt.Component;
  12. import javax.swing.CellEditor;
  13. import javax.swing.JTree;
  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.10 02/02/00
  21. * @author Scott Violet
  22. */
  23. public interface TreeCellEditor extends CellEditor
  24. {
  25. /**
  26. * Sets an initial <I>value</I> for the editor. This will cause
  27. * the editor to stopEditing and lose any partially edited value
  28. * if the editor is editing when this method is called. <p>
  29. *
  30. * Returns the component that should be added to the client's
  31. * Component hierarchy. Once installed in the client's hierarchy
  32. * this component will then be able to draw and receive user input.
  33. *
  34. * @param table the JTree that is asking the editor to edit
  35. * This parameter can be null.
  36. * @param value the value of the cell to be edited.
  37. * @param isSelected true is the cell is to be renderer with
  38. * selection highlighting
  39. * @param expanded true if the node is expanded
  40. * @param leaf true if the node is a leaf node
  41. * @param row the row index of the node being edited
  42. * @return the component for editing
  43. */
  44. Component getTreeCellEditorComponent(JTree tree, Object value,
  45. boolean isSelected, boolean expanded,
  46. boolean leaf, int row);
  47. }