01: package org.enhydra.jawe.base.panel.panels;
02:
03: import java.awt.Dimension;
04:
05: import org.enhydra.jawe.base.panel.PanelContainer;
06: import org.enhydra.jawe.base.panel.PanelGenerator;
07: import org.enhydra.shark.xpdl.elements.ActualParameters;
08: import org.enhydra.shark.xpdl.elements.FormalParameters;
09:
10: /**
11: * Creates a table panel.
12: * @author Sasa Bojanic
13: */
14: public class XMLActualParametersPanel extends XMLBasicPanel {
15:
16: protected XMLPanel fpPanel;
17: protected XMLPanel apPanel;
18:
19: public XMLActualParametersPanel(PanelContainer pc,
20: ActualParameters myOwner, FormalParameters fps) {
21:
22: super (pc, myOwner, "", false, false, false);
23:
24: setFormalParameters(fps);
25: PanelGenerator pg = pc.getPanelGenerator();
26: apPanel = pg.getPanel(myOwner);
27:
28: add(fpPanel);
29: add(apPanel);
30:
31: setPreferredSize(new Dimension(700, 200));
32:
33: }
34:
35: public void setFormalParameters(FormalParameters fps) {
36: PanelGenerator pg = pc.getPanelGenerator();
37: if (fpPanel != null) {
38: remove(0);
39: }
40: if (fps != null) {
41: fpPanel = pg.getPanel(fps);
42: } else {
43: fpPanel = new XMLBasicPanel();
44: }
45: add(fpPanel, 0);
46: validate();
47: }
48:
49: public void cleanup() {
50: apPanel.cleanup();
51: if (fpPanel != null) {
52: fpPanel.cleanup();
53: }
54: }
55:
56: }
|