01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets.plaf.jfc;
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: * JFCFlowLayoutUI defines a look and feel for default JFC.
16: *
17: * @author Robin Sharp
18: */
19:
20: public class JFCFlowLayoutUI extends JFCLayoutUI {
21: /**
22: * Construct a awt.FlowLayout
23: */
24: public JFCFlowLayoutUI() {
25: layoutManager = new FlowLayout();
26: }
27:
28: /**
29: * Lays out the container in the specified manner.
30: */
31: public void layoutContainer(SContainer parent, PrintWriter out) {
32: if (parent.getLayoutManager() == null)
33: return;
34:
35: if (parent.getLayoutManager() instanceof SFlowLayout) {
36: ((FlowLayout) layoutManager)
37: .setAlignment(((SFlowLayout) parent
38: .getLayoutManager()).getAlignment());
39: ((FlowLayout) layoutManager).setVgap(((SFlowLayout) parent
40: .getLayoutManager()).getGap());
41: ((FlowLayout) layoutManager).setHgap(((SFlowLayout) parent
42: .getLayoutManager()).getGap());
43: }
44: }
45:
46: }
|