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 import javax.swing.tree.*; 18 19 24 public class Responsible extends XMLSimpleElement { 25 31 private transient Participants definedParticipants=null; 32 33 40 public Responsible (XMLComplexElement packageOrWProcess) { 41 super(); 42 43 try { 44 this.definedParticipants=(Participants)packageOrWProcess.get("Participants"); 45 } 46 catch (NullPointerException npe) { 47 } 49 } 50 51 57 public XMLPanel getPanel () { 58 Object [] choices=null; 59 if (definedParticipants!=null) { 60 choices=definedParticipants.getChoosable().toArray(); 61 } 62 else { 63 choices=new Object []{new Object ()}; 64 } 65 return new XMLComboButtonPanel(this,choices,definedParticipants); 66 } 67 68 74 public void toXML (Node parent) throws DOMException { 75 if (!(value instanceof Participant)) return; 78 Object realValue=value; 80 value=((Participant)value).getID(); 81 super.toXML(parent); 82 value=realValue; 83 } 84 85 92 public Object clone () { 93 Responsible r=(Responsible)super.clone(); 94 r.setValue(this.toValue()); 96 r.definedParticipants=this.definedParticipants; 97 return r; 98 } 99 100 101 } 102 | Popular Tags |