You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SwingTreeViewNodeFactory.java 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* *******************************************************************
  2. * Copyright (c) 1999-2001 Xerox Corporation,
  3. * 2002 Palo Alto Research Center, Incorporated (PARC).
  4. * All rights reserved.
  5. * This program and the accompanying materials are made available
  6. * under the terms of the Eclipse Public License v1.0
  7. * which accompanies this distribution and is available at
  8. * http://www.eclipse.org/legal/epl-v10.html
  9. *
  10. * Contributors:
  11. * Xerox/PARC initial implementation
  12. * Helen Hawkins Converted to new interface (bug 148190)
  13. * ******************************************************************/
  14. package org.aspectj.ajde.ui.swing;
  15. import java.util.List;
  16. import org.aspectj.ajde.IconRegistry;
  17. import org.aspectj.ajde.ui.AbstractIcon;
  18. import org.aspectj.ajde.ui.IStructureViewNode;
  19. import org.aspectj.ajde.ui.StructureViewNodeFactory;
  20. import org.aspectj.asm.IProgramElement;
  21. import org.aspectj.asm.IRelationship;
  22. /**
  23. * @author Mik Kersten
  24. */
  25. public class SwingTreeViewNodeFactory extends StructureViewNodeFactory {
  26. public SwingTreeViewNodeFactory(IconRegistry iconRegistry) {
  27. super(iconRegistry);
  28. }
  29. protected IStructureViewNode createDeclaration(
  30. IProgramElement node,
  31. AbstractIcon icon,
  32. List children) {
  33. return new SwingTreeViewNode(node, icon, children);
  34. }
  35. protected IStructureViewNode createLink(
  36. IProgramElement node,
  37. AbstractIcon icon) {
  38. return new SwingTreeViewNode(node, icon);
  39. }
  40. protected IStructureViewNode createRelationship(
  41. IRelationship relationship,
  42. AbstractIcon icon) {
  43. return new SwingTreeViewNode(relationship, icon);
  44. }
  45. }