1 10 11 package org.enhydra.jawe.xml.elements; 12 13 import org.enhydra.jawe.xml.*; 14 import org.enhydra.jawe.xml.panels.*; 15 import org.w3c.dom.*; 16 17 20 public class Split extends XMLComplexElement { 21 22 private TransitionRefs refTransitionRefs=new TransitionRefs(); private XMLAttribute attrType=new XMLAttribute("Type", 24 new String [] { 25 "", 26 "AND", 27 "XOR" 28 },0); 29 30 33 public Split() { 34 super(); 35 36 attrType.setLabelName(XMLUtil.getLanguageDependentString("SplitTypeKey")); 37 fillStructure(); 38 } 39 40 44 protected void fillStructure () { 45 complexStructure.add(attrType); 46 attributes.add(attrType); 47 complexStructure.add(refTransitionRefs); 48 } 49 50 53 public boolean isEmpty() { 54 return (attrType.getChoosen().toString().length()==0); 55 } 56 57 58 64 public XMLPanel getPanel () { 65 return attrType.getPanel(); 66 } 67 68 75 public Object clone () { 76 Split s=(Split)super.clone(); 77 78 s.attrType=(XMLAttribute)this.attrType.clone(); 79 s.refTransitionRefs=(TransitionRefs)this.refTransitionRefs.clone(); 80 81 s.fillStructure(); 82 83 return s; 84 } 85 86 public void refreshLabelName () { 87 super.refreshLabelName(); 88 attrType.setLabelName(XMLUtil.getLanguageDependentString("SplitTypeKey")); 89 } 90 91 } 92 | Popular Tags |