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 import java.util.*; 17 18 23 public class Member extends XMLComplexElement { 24 private DataTypes refType; 25 26 29 public Member (Package p) { 30 super(); 31 32 refType=new DataTypes(this,p,null,0); 33 fillStructure(); 34 } 35 36 40 protected void fillStructure () { 41 refType.setRequired(true); 42 complexStructure.add(refType); 43 } 44 45 50 public Object toValue () { 51 return refType.toValue(); 52 } 53 54 58 public String toString () { 59 Object type=refType.toValue(); 60 if (type instanceof BasicType) { 61 return refType.toString()+" - "+((XMLAttribute)((BasicType)type). 62 get("Type")).getChoosen().toString(); 63 } else if (type instanceof DeclaredType) { 64 return refType.toString()+" - "+((XMLComplexChoice)((DeclaredType)type). 65 get("SubType")).getChoosen().toString(); 66 } else { 67 return refType.toString(); 68 } 69 } 70 71 77 public XMLPanel getPanel () { 78 return refType.getPanel(); 79 } 80 81 } 82 | Popular Tags |