1 10 11 package org.enhydra.jawe.xml.elements; 12 13 import org.enhydra.jawe.xml.*; 14 import org.enhydra.jawe.xml.panels.*; 15 16 21 public class BasicType extends XMLComplexElement { 22 private XMLAttribute attrType=new XMLAttribute("Type", 26 new String [] { 27 "STRING", 28 "FLOAT", 29 "INTEGER", 30 "REFERENCE", 31 "DATETIME", 32 "BOOLEAN", 33 "PERFORMER" 34 },0); 35 36 39 public BasicType () { 40 super(); 41 attrType.setLabelName(XMLUtil.getLanguageDependentString("SubTypeKey")); 42 43 fillStructure(); 44 } 45 46 50 protected void fillStructure () { 51 attrType.setRequired(true); 52 complexStructure.add(attrType); 53 attributes.add(attrType); 54 } 55 56 64 public Object toValue () { 65 return attrType.toValue(); 66 } 67 68 74 public XMLPanel getPanel () { 75 return attrType.getPanel(); 76 } 77 78 85 public Object clone () { 86 BasicType bt=(BasicType)super.clone(); 87 88 bt.attrType=(XMLAttribute)this.attrType.clone(); 89 bt.fillStructure(); 90 91 return bt; 92 } 93 94 public void refreshLabelName () { 95 super.refreshLabelName(); 96 attrType.setLabelName(XMLUtil.getLanguageDependentString("SubTypeKey")); 97 } 98 99 } 100 | Popular Tags |