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: * JFCBorderLayoutUI defines a look and feel for default JFC.
16: *
17: * @author Robin Sharp
18: */
19:
20: public class JFCBorderLayoutUI extends JFCLayoutUI {
21: /**
22: * Construct a awt.BorderLayout
23: */
24: public JFCBorderLayoutUI() {
25: layoutManager = new BorderLayout();
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 SBorderLayout) {
36: ((BorderLayout) layoutManager)
37: .setVgap(((SBorderLayout) parent.getLayoutManager())
38: .getGap());
39: ((BorderLayout) layoutManager)
40: .setHgap(((SBorderLayout) parent.getLayoutManager())
41: .getGap());
42: }
43: }
44:
45: }
|