01: /*
02: * Copyright 2000,2005 wingS development team.
03: *
04: * This file is part of wingS (http://wingsframework.org).
05: *
06: * wingS is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU Lesser General Public License
08: * as published by the Free Software Foundation; either version 2.1
09: * of the License, or (at your option) any later version.
10: *
11: * Please see COPYING for the complete licence.
12: */
13:
14: package org.wings.plaf.css;
15:
16: import org.wings.SFlowDownLayout;
17: import org.wings.SLayoutManager;
18: import org.wings.SConstants;
19: import org.wings.io.Device;
20:
21: import java.io.IOException;
22:
23: /**
24: * @author bschmid
25: */
26: public class FlowDownLayoutCG extends FlowLayoutCG {
27: private static final long serialVersionUID = 1L;
28:
29: /**
30: * Render FlowDownLayout as table based layout
31: * @param d the device to write the code to
32: * @param l the layout manager
33: */
34: public void write(Device d, SLayoutManager l) throws IOException {
35: final SFlowDownLayout layout = (SFlowDownLayout) l;
36:
37: openLayouterBody(d, layout);
38:
39: printLayouterTableBody(d, layout.getContainer(), 1, layout
40: .getComponents(), new TableCellStyle());
41:
42: closeLayouterBody(d, layout);
43: }
44:
45: public int getDefaultLayoutCellHAlignment() {
46: return SConstants.LEFT;
47: }
48:
49: public int getDefaultLayoutCellVAlignment() {
50: return SConstants.NO_ALIGN;
51: }
52:
53: }
|