KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > jawe > xml > elements > specialpanels > XMLActualParametersPanel


1 /* XMLTablePanel.java
2  *
3  * Authors:
4  * Stefanovic Nenad chupo@iis.ns.ac.yu
5  * Bojanic Sasa sasaboy@neobee.net
6  * Puskas Vladimir vpuskas@eunet.yu
7  * Pilipovic Goran zboniek@uns.ac.yu
8  *
9  */

10
11
12 package org.enhydra.jawe.xml.elements.specialpanels;
13
14 import javax.swing.*;
15 import java.awt.Dimension JavaDoc;
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 /**
25  * Creates a table panel.
26  */

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 JavaDoc(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