01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets.plaf.wml;
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: * HTMLFlowLayoutUI defines a look and feel for default HTML.
16: *
17: * @author Robin Sharp
18: */
19:
20: public class WMLFlowLayoutUI extends WMLLayoutUI {
21: /**
22: * Lays out the container in the specified manner.
23: */
24: public void layoutContainer(SContainer parent, PrintWriter out) {
25: SFlowLayout flowLayout = (SFlowLayout) parent
26: .getLayoutManager();
27:
28: for (int index = 0; index < parent.getComponentCount(); index++) {
29: parent.getComponent(index).paint(out);
30:
31: //PUT SOME SPACES IN
32: for (int gap = 0; gap < flowLayout.getGap(); gap++) {
33: out.print(WMLCharacterUI
34: .getSpecialCharacter(SCharacter.SPACE));
35: }
36: }
37: }
38: }
|