svn commit: r12763 - branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: maurelio1234
Date: 2007-06-05 18:33:49-0700
New Revision: 12763

Modified:
   branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java

Log:


Modified: branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java?view=diff&rev=12763&p1=branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java&p2=branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java&r1=12762&r2=12763
==============================================================================
--- branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java	(original)
+++ branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java	2007-06-05 18:33:49-0700
@@ -7,11 +7,10 @@
 

 import org.argouml.model.Model;

 import org.argouml.uml.profile.FigNodeStrategy;

-import org.tigris.gef.presentation.FigImage;

 

 public class JavaBeansFigNodeStrategy implements FigNodeStrategy {

 

-    private FigImage icon = null;

+    private Image icon = null;

     

     public JavaBeansFigNodeStrategy() {

 	BufferedInputStream bis = new BufferedInputStream(this.getClass()

@@ -22,19 +21,15 @@
 	} catch (IOException e) {

 	    e.printStackTrace();

 	}

-	Image img = Toolkit.getDefaultToolkit().createImage(buf);

-	icon = new FigImage(0, 0, img);

+	icon = Toolkit.getDefaultToolkit().createImage(buf);

     }

     

-    public FigImage getIconForStereotype(Object stereotype) {

-	FigImage ret = null;

-	String s = Model.getFacade().getName(stereotype);

-	

-	if ("Bean".equals(s)) {

-	    ret = icon; 

+    public Image getIconForStereotype(Object stereotype) {

+	if ("Bean".equals(Model.getFacade().getName(stereotype))) {

+	    return icon;

+	} else {

+	    return null;

 	}

-	    

-	return ret;

     }

     

 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.