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: package org.wings;
14:
15: import org.wings.io.Device;
16:
17: import java.io.IOException;
18: import java.io.Serializable;
19:
20: /**
21: * For layout managers.
22: *
23: * @author <a href="mailto:haaf@mercatis.de">Armin Haaf</a>
24: */
25: public interface SLayoutManager extends SConstants, Serializable,
26: Renderable {
27: /**
28: * Adds a component to the layout manager
29: *
30: * @param c The new component
31: * @param constraint A (sometimes optional) constraint object
32: */
33: void addComponent(SComponent c, Object constraint, int index);
34:
35: /**
36: * Removes a component from the layout manager
37: *
38: * @param c The new component
39: */
40: void removeComponent(SComponent c);
41:
42: /**
43: * Sets the corresponding container
44: *
45: * @param c The container
46: */
47: void setContainer(SContainer c);
48:
49: /**
50: * Returns the corresponding container
51: *
52: * @return The container
53: */
54: SContainer getContainer();
55:
56: /**
57: * Writes the layouted container to the given device.
58: *
59: * @param s The output device
60: */
61: void write(Device s) throws IOException;
62:
63: /**
64: * Notification from the CGFactory that the L&F has changed.
65: *
66: * @see SLayoutManager#updateCG
67: */
68: void updateCG();
69:
70: void setBorder(int pixel);
71:
72: int getBorder();
73: }
|