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

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

package net.alantea.swing.tree;

import java.awt.Frame;

@SuppressWarnings("serial")
public class TreeObjectSelectionDialog extends SimpleTreeDialog
{

   private Object origin;
   private Class target;



   protected TreeObjectSelectionDialog(Frame parentShell, String key, TreeParent root, TreeObject origin, Class target)
   {
      super(parentShell, key, root, new TreeContentProvider(), target);
      this.target = target;
   }

   @Override
   protected boolean validateSelection(Object selection)
   {
       return target.isAssignableFrom(selection.getClass()) && (selection != origin);
   }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy