1 10 11 12 package org.enhydra.jawe.xml.elements.specialpanels; 13 14 import javax.swing.*; 15 import java.awt.Dimension ; 16 import org.enhydra.jawe.xml.*; 17 import org.enhydra.jawe.xml.elements.*; 18 import org.enhydra.jawe.xml.panels.*; 19 import org.enhydra.jawe.xml.panels.XMLPanel; 20 import org.enhydra.jawe.xml.panels.XMLTableControlPanel; 21 import org.enhydra.jawe.xml.panels.XMLTablePanel; 22 23 24 27 public class XMLActualParametersPanel extends XMLPanel { 28 29 XMLPanel apPanel; 30 FormalParameters formalParams; 31 public XMLActualParametersPanel (XMLCollection myOwner, 32 FormalParameters fps) { 33 34 super(myOwner,2,"",XMLPanel.BOX_LAYOUT,false,false); 35 36 this.formalParams=fps; 37 XMLPanel fpPanel; 38 if (formalParams!=null) { 39 fpPanel=formalParams.getMiniContentPanel(); 40 } else { 41 fpPanel=new XMLPanel(); 42 } 43 44 apPanel=new XMLTablePanel (myOwner,myOwner.toLabel(),false,false,true); 45 46 47 add(fpPanel); 48 add(apPanel); 49 50 setPreferredSize(new Dimension (700,200)); 51 52 } 53 54 public XMLPanel getControlledPanel () { 55 return apPanel; 56 } 57 58 public void setFormalParameters (FormalParameters fps) { 59 this.formalParams=fps; 60 remove(0); 61 if (formalParams!=null) { 62 add(formalParams.getMiniContentPanel(),0); 63 } else { 64 add(new XMLPanel(),0); 65 } 66 validate(); 67 } 68 69 } 70 71 | Popular Tags |