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.util.*;
09: import java.io.*;
10:
11: import com.javelin.swinglets.*;
12: import com.javelin.swinglets.plaf.*;
13:
14: /**
15: * HTMLButtonGroupUI defines a look and feel for default HTML.
16: *
17: * @author Robin Sharp
18: */
19:
20: public class HTMLButtonGroupUI extends HTMLContainerUI {
21: /**
22: * Render the UI on the PrintWriter
23: */
24: public void update(PrintWriter out, SComponent c) {
25: if (!c.isVisible())
26: return;
27:
28: SButtonGroup group = (SButtonGroup) c;
29:
30: for (Enumeration buttons = group.getAllComponents(); buttons
31: .hasMoreElements();) {
32: ((SRadioButton) buttons.nextElement()).paint(out);
33:
34: if (group.getVerticalAlignment() == SConstants.VERTICAL) {
35: out.println("<BR>");
36: }
37: }
38:
39: updateEvent(out, c);
40:
41: }
42: }
|