View Javadoc
1 /*** 2 * $Header: /cvsroot/ebxmlrr/jaxr/src/com/sun/xml/registry/client/browser/graph/JBGraphModel.java,v 1.2 2002/03/14 13:57:05 farrukh_najmi Exp $ 3 */ 4 package com.sun.xml.registry.client.browser.graph; 5 6 import com.jgraph.JGraph; 7 import com.jgraph.graph.*; 8 import com.jgraph.event.*; 9 10 import javax.xml.registry.*; 11 import javax.xml.registry.infomodel.*; 12 13 import java.util.*; 14 15 /*** 16 * Custom model that does not allow self references in graph. 17 * 18 * @author <a href="mailto:Farrukh.Najmi@Sun.COM">Farrukh S. Najmi</a> 19 */ 20 public class JBGraphModel extends DefaultGraphModel { 21 22 // Override Superclass Method 23 public boolean acceptsSource(Object edge, Object port) { 24 // Source only Valid if not Equal Target 25 return (((Edge) edge).getTarget() != port); 26 } 27 // Override Superclass Method 28 public boolean acceptsTarget(Object edge, Object port) { 29 // Target only Valid if not Equal Source 30 return (((Edge) edge).getSource() != port); 31 } 32 33 }

This page was automatically generated by Maven