01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets.plaf.html;
06:
07: import java.awt.*;
08: import java.awt.event.*;
09: import java.util.*;
10: import java.io.*;
11:
12: import com.javelin.swinglets.*;
13: import com.javelin.swinglets.plaf.*;
14:
15: /**
16: * HTMLContainerUI defines a look and feel for default HTML.
17: *
18: * @author Robin Sharp
19: */
20:
21: public class HTMLContainerUI extends HTMLComponentUI implements
22: SContainerUI {
23: /**
24: * Render the UI on the Output
25: */
26: public void updateHeader(Object out, SComponent c) {
27: updateHeader((PrintWriter) out, c);
28: }
29:
30: /**
31: * Render the UI on the Output
32: */
33: public void updateHeader(PrintWriter out, SComponent c) {
34: if (!c.isVisible())
35: return;
36:
37: SContainer container = (SContainer) c;
38:
39: for (int index = 0; index < container.getComponentCount(); index++) {
40: container.getComponent(index).paintHeader(out);
41: }
42: }
43:
44: /**
45: * Render the UI on the Output
46: */
47: public void update(Object out, SComponent c) {
48: update((PrintWriter) out, c);
49: }
50:
51: /**
52: * Render the UI on the Output
53: */
54: public void update(PrintWriter out, SComponent c) {
55: if (!c.isVisible())
56: return;
57:
58: SContainer container = (SContainer) c;
59:
60: if (container.getLayoutManager() == null) {
61: for (int index = 0; index < container.getComponentCount(); index++) {
62: container.getComponent(index).paint(out);
63: }
64: } else {
65: container.getLayoutManager()
66: .layoutContainer(container, out);
67: }
68: }
69:
70: /**
71: * Tell the underlying UI that the container has been changed
72: */
73: public void update(SComponent c, int id, int index) {
74: }
75:
76: }
|