1 18 19 package org.objectweb.jac.ide.diagrams; 20 21 import CH.ifa.draw.figures.TextFigure; 22 23 public class InstanceNameFigure extends TextFigure { 24 25 org.objectweb.jac.ide.Instance substance; 26 27 31 public org.objectweb.jac.ide.Instance getSubstance() { 32 return substance; 33 } 34 35 39 public void setSubstance(org.objectweb.jac.ide.Instance v) { 40 this.substance = v; 41 } 42 43 public String getName() { 44 return getText(); 45 } 46 47 public void setText(String s) { 48 super.setText(s); 49 if( substance != null && !DiagramView.init ) { 50 if( s.indexOf(":") != -1 ) { 51 substance.setName(s.substring(0,s.indexOf(":"))); 52 } else { 53 substance.setName(s); 54 } 55 } 56 } 57 58 } 59 | Popular Tags |