All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.alantea.swing.tree.NavigationTreeManager Maven / Gradle / Ivy

The newest version!
package net.alantea.swing.tree;

/**
 * The Interface NavigationTreeManager.
 * 
 * A class implementing this interface may have methods named :
 * public void manageMenu(NavigationTree tree, JPopupMenu menu, Something data)
 * that will add elements on menu showing like
 *  public void manageMenu(NavigationTree tree, JPopupMenu menu, Entity data)
 *  {
 *     tree.addMenuItem(menu, "Remove", () - {
 *        do it...
 *     });
 *  }
 */
public interface NavigationTreeManager
{
   /**
    * Allow child.
    *
    * @param parent the parent
    * @param child the child
    * @return true, if successful
    */
   public boolean allowChild(Object parent, Object child);
   
   /**
    * Move child.
    *
    * @param oldParent the old parent
    * @param newParent the new parent
    * @param child the child
    * @param index the index
    */
   public void moveChild(Object oldParent, Object newParent, Object child, int index);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy