1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 """Defines an extension to the C{IComponentContainer} interface which adds the
17 layouting control to the elements in the container."""
18
19 from muntjac.ui.component_container import IComponentContainer
20
21 from muntjac.terminal.gwt.client.ui.v_margin_info import VMarginInfo
22 from muntjac.terminal.gwt.client.ui.alignment_info import Bits
23
24
26 """Extension to the L{IComponentContainer} interface which adds the
27 layouting control to the elements in the container. This is required by
28 the various layout components to enable them to place other components in
29 specific locations in the UI.
30
31 @author: Vaadin Ltd.
32 @author: Richard Lincoln
33 @version: 1.1.2
34 """
35
37 """Enable layout margins. Affects all four sides of the layout. This
38 will tell the client-side implementation to leave extra space around
39 the layout. The client-side implementation decides the actual amount,
40 and it can vary between themes.
41
42 Alternatively, enable specific layout margins. This will tell the
43 client-side implementation to leave extra space around the layout in
44 specified edges, clockwise from top (top, right, bottom, left). The
45 client-side implementation decides the actual amount, and it can vary
46 between themes.
47
48 @param args: tuple of the form
49 - (enabled)
50 - (top, right, bottom, left)
51 """
52 raise NotImplementedError
53
54
56 """IAlignmentHandler is most commonly an advanced L{ILayout} that
57 can align its components.
58 """
59
60
61
62
63 ALIGNMENT_LEFT = Bits.ALIGNMENT_LEFT
64
65
66
67
68 ALIGNMENT_RIGHT = Bits.ALIGNMENT_RIGHT
69
70
71
72
73 ALIGNMENT_TOP = Bits.ALIGNMENT_TOP
74
75
76
77
78 ALIGNMENT_BOTTOM = Bits.ALIGNMENT_BOTTOM
79
80
81
82
83 ALIGNMENT_HORIZONTAL_CENTER = Bits.ALIGNMENT_HORIZONTAL_CENTER
84
85
86
87
88 ALIGNMENT_VERTICAL_CENTER = Bits.ALIGNMENT_VERTICAL_CENTER
89
90
92 """Set alignment for one contained component in this layout. Alignment
93 is calculated as a bit mask of the two passed values or predefined
94 alignments from Alignment class.
95
96 Example::
97 layout.setComponentAlignment(myComponent, Alignment.TOP_RIGHT)
98
99 @deprecated: Use L{setComponentAlignment} instead
100
101 @param args: tuple of the form
102 - (childComponent, horizontalAlignment, verticalAlignment)
103 1. the component to align within it's layout cell.
104 2. the horizontal alignment for the child component (left,
105 center, right). Use ALIGNMENT constants.
106 3. the vertical alignment for the child component (top,
107 center, bottom). Use ALIGNMENT constants.
108 - (childComponent, alignment)
109 1. the component to align within it's layout cell.
110 2. the Alignment value to be set
111 """
112 raise NotImplementedError
113
114
116 """Returns the current Alignment of given component.
117
118 @return: the L{Alignment}
119 """
120 raise NotImplementedError
121
122
124 """This type of layout supports automatic addition of space between its
125 components.
126 """
127
129 """Enable spacing between child components within this layout.
130
131 B{NOTE:} This will only affect the space between
132 components, not the space around all the components in the layout
133 (i.e. do not confuse this with the cellspacing attribute of a HTML
134 Table). Use L{setMargin} to add space around the layout.
135
136 See the reference manual for more information about CSS rules for
137 defining the amount of spacing to use.
138
139 @param enabled:
140 true if spacing should be turned on, false if it should be
141 turned off
142 """
143 raise NotImplementedError
144
145
147 """@return: true if spacing between child components within this layout
148 is enabled, false otherwise
149 @deprecated: Use L{isSpacing} instead.
150 """
151 raise NotImplementedError
152
153
155 """@return: true if spacing between child components within this layout
156 is enabled, false otherwise
157 """
158 raise NotImplementedError
159
160
162 """This type of layout supports automatic addition of margins (space around
163 its components).
164 """
165
167 """Enable margins for this layout.
168
169 B{NOTE:} This will only affect the space around the
170 components in the layout, not space between the components in the
171 layout. Use L{setSpacing} to add space between the components in
172 the layout.
173
174 See the reference manual for more information about CSS rules for
175 defining the size of the margin.
176
177 @param marginInfo:
178 MarginInfo object containing the new margins.
179 """
180 raise NotImplementedError
181
182
184 """@return: MarginInfo containing the currently enabled margins."""
185 raise NotImplementedError
186
187
192