01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets.plaf.javascript;
06:
07: import java.awt.*;
08: import java.util.*;
09: import java.io.*;
10:
11: import com.javelin.swinglets.*;
12: import com.javelin.swinglets.plaf.*;
13: import com.javelin.swinglets.plaf.html.*;
14:
15: /**
16: * JSPanelUI defines a look and feel for default Java Script.
17: *
18: * @author Robin Sharp
19: */
20:
21: public class JSPanelUI extends HTMLPanelUI implements JSContainerUI {
22: /**
23: * Render the script code for a text the PrintWriter.
24: */
25: public void updateScript(PrintWriter out, SComponent c) {
26: JSUtility.updateScript(out, c);
27:
28: //Loop through all the children updating the script
29: SContainer container = (SContainer) c;
30: SComponentUI ui = null;
31:
32: for (int index = 0; index < container.getComponentCount(); index++) {
33: ui = container.getComponent(index).getUI();
34: if (ui != null)
35: ui.updateScript(out, container.getComponent(index));
36: }
37:
38: }
39:
40: }
|