ItsNatTreeCellEditor.java :  » Ajax » ItsNat » org » itsnat » comp » Java Open Source

Java Open Source » Ajax » ItsNat 
ItsNat » org » itsnat » comp » ItsNatTreeCellEditor.java
/*
  ItsNat Java Web Application Framework
  Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
  Author: Jose Maria Arranz Santamaria

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version. See the GNU Affero General Public 
  License for more details. See the copy of the GNU Affero General Public License
  included in this program. If not, see <http://www.gnu.org/licenses/>.
*/

package org.itsnat.comp;

import javax.swing.CellEditor;
import org.w3c.dom.Element;

/**
 * Used to specify how a tree node value is edited in place.
 *
 * @author Jose Maria Arranz Santamaria
 * @see ItsNatComponentManager#createDefaultItsNatTreeCellEditor(ItsNatComponent)
 * @see ItsNatTree#getItsNatTreeCellEditor()
 */
public interface ItsNatTreeCellEditor extends CellEditor
{
    /**
     * Returns the component used to edit in place the tree node value.
     *
     * <p>Default implementation uses a {@link org.itsnat.comp.html.ItsNatHTMLInputText} (text not formatted version) to edit
     * the tree node value.</p>
     * 
     * <p>Default implementation ignores <code>isSelected</code> parameter.</p>
     *
     * @param tree the tree component, may be used to provide contextual information. Default implementation ignores it.
     * @param row the tree node row (seeing the tree as a list).     
     * @param value the value to edit (initial value).
     * @param isSelected true if the tree node is selected.     
     * @param isExpanded true if the tree node is expanded.      
     * @param isLeaf true if the tree node is a leaf.           
     * @param labelElem the tree node label element to render the value into. Is a hint, if provided should be obtained by calling <code>tree.getItsNatTreeUI().getLabelElementFromRow(row)</code>.
     * @return the component used to edit in place the tree node value. Current implementation of trees does nothing with this component and may be null (is not mandatory to use a single component as an editor).
     * @see ItsNatTree#setItsNatTreeCellEditor(ItsNatTreeCellEditor)
     */         
    public ItsNatComponent getTreeCellEditorComponent(
                ItsNatTree tree,      
                int row,            
                Object value, 
                boolean isSelected, 
                boolean isExpanded, 
                boolean isLeaf, 
                Element labelElem); 
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.