1 10 11 package org.enhydra.jawe.xml.elements; 12 13 import javax.swing.*; 14 15 import org.enhydra.jawe.xml.*; 16 import org.enhydra.jawe.xml.panels.*; 17 18 23 public class ArrayType extends XMLComplexElement { 24 private DataTypes refType; 26 27 private XMLAttribute attrLowerIndex=new XMLAttribute("LowerIndex"); private XMLAttribute attrUpperIndex=new XMLAttribute("UpperIndex"); 30 private transient DataTypes myOwner; 31 34 public ArrayType (DataTypes dtc,Package p) { 35 super(); 36 myOwner=dtc; 37 refType=new DataTypes(this,p,null,0); 38 refType.setLabelName(XMLUtil.getLanguageDependentString("SubTypeKey")); 39 fillStructure(); 40 } 41 42 46 protected void fillStructure () { 47 isRequired=true; 48 attrLowerIndex.setRequired(true); 49 attrUpperIndex.setRequired(true); 50 51 complexStructure.add(attrLowerIndex); 52 attributes.add(attrLowerIndex); 53 complexStructure.add(attrUpperIndex); 54 attributes.add(attrUpperIndex); 55 refType.setRequired(true); 56 complexStructure.add(refType); 57 } 58 59 public DataTypes getOwner () { 60 return myOwner; 61 } 62 69 79 80 public void refreshLabelName () { 81 super.refreshLabelName(); 82 refType.setLabelName(XMLUtil.getLanguageDependentString("SubTypeKey")); 83 } 84 85 } 86 | Popular Tags |