|
Lines 7-13
Link Here
|
| 7 |
* |
7 |
* |
| 8 |
* Contributors: |
8 |
* Contributors: |
| 9 |
* chris.gross@us.ibm.com - initial API and implementation |
9 |
* chris.gross@us.ibm.com - initial API and implementation |
| 10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
| 11 |
package org.eclipse.nebula.widgets.grid.internal; |
11 |
package org.eclipse.nebula.widgets.grid.internal; |
| 12 |
|
12 |
|
| 13 |
import org.eclipse.nebula.widgets.grid.GridColumn; |
13 |
import org.eclipse.nebula.widgets.grid.GridColumn; |
|
Lines 20-308
Link Here
|
| 20 |
|
20 |
|
| 21 |
/** |
21 |
/** |
| 22 |
* The column header renderer. |
22 |
* The column header renderer. |
| 23 |
* |
23 |
* |
| 24 |
* @author chris.gross@us.ibm.com |
24 |
* @author chris.gross@us.ibm.com |
| 25 |
* @since 2.0.0 |
25 |
* @since 2.0.0 |
| 26 |
*/ |
26 |
*/ |
| 27 |
public class DefaultColumnHeaderRenderer extends GridHeaderRenderer |
27 |
public class DefaultColumnHeaderRenderer extends GridHeaderRenderer { |
| 28 |
{ |
|
|
| 29 |
|
28 |
|
| 30 |
int leftMargin = 6; |
29 |
int leftMargin = 6; |
| 31 |
|
30 |
|
| 32 |
int rightMargin = 6; |
31 |
int rightMargin = 6; |
| 33 |
|
32 |
|
| 34 |
int topMargin = 3; |
33 |
int topMargin = 3; |
| 35 |
|
34 |
|
| 36 |
int bottomMargin = 3; |
35 |
int bottomMargin = 3; |
| 37 |
|
36 |
|
| 38 |
int arrowMargin = 6; |
37 |
int arrowMargin = 6; |
| 39 |
|
38 |
|
| 40 |
int imageSpacing = 3; |
39 |
int imageSpacing = 3; |
| 41 |
|
40 |
|
| 42 |
private SortArrowRenderer arrowRenderer = new SortArrowRenderer(); |
41 |
private SortArrowRenderer arrowRenderer = new SortArrowRenderer(); |
| 43 |
|
42 |
|
| 44 |
/** |
43 |
/** |
| 45 |
* {@inheritDoc} |
44 |
* {@inheritDoc} |
| 46 |
*/ |
45 |
*/ |
| 47 |
public Point computeSize(GC gc, int wHint, int hHint, Object value) |
46 |
public Point computeSize(GC gc, int wHint, int hHint, Object value) { |
| 48 |
{ |
47 |
GridColumn column = (GridColumn) value; |
| 49 |
GridColumn column = (GridColumn)value; |
48 |
|
| 50 |
|
49 |
int x = 0; |
| 51 |
int x = 0; |
50 |
|
| 52 |
|
51 |
x += leftMargin; |
| 53 |
x += leftMargin; |
52 |
|
| 54 |
|
53 |
x += gc.stringExtent(column.getText()).x + rightMargin; |
| 55 |
x += gc.stringExtent(column.getText()).x + rightMargin; |
54 |
|
| 56 |
|
55 |
int y = 0; |
| 57 |
int y = 0; |
56 |
|
| 58 |
|
57 |
y += topMargin; |
| 59 |
y += topMargin; |
58 |
|
| 60 |
|
59 |
y += gc.getFontMetrics().getHeight(); |
| 61 |
y += gc.getFontMetrics().getHeight(); |
60 |
|
| 62 |
|
61 |
y += bottomMargin; |
| 63 |
y += bottomMargin; |
62 |
|
| 64 |
|
63 |
if (column.getImage() != null) { |
| 65 |
if (column.getImage() != null) |
64 |
x += column.getImage().getBounds().width + imageSpacing; |
| 66 |
{ |
65 |
|
| 67 |
x += column.getImage().getBounds().width + imageSpacing; |
66 |
y = Math.max(y, topMargin + column.getImage().getBounds().height |
| 68 |
|
67 |
+ bottomMargin); |
| 69 |
y = Math.max(y, topMargin + column.getImage().getBounds().height + bottomMargin); |
68 |
} |
| 70 |
} |
69 |
|
| 71 |
|
70 |
y += computeControlSize(column).y; |
| 72 |
return new Point(x, y); |
71 |
|
| 73 |
} |
72 |
return new Point(x, y); |
| 74 |
|
73 |
} |
| 75 |
/** |
74 |
|
| 76 |
* {@inheritDoc} |
75 |
/** |
| 77 |
*/ |
76 |
* {@inheritDoc} |
| 78 |
public void paint(GC gc, Object value) |
77 |
*/ |
| 79 |
{ |
78 |
public void paint(GC gc, Object value) { |
| 80 |
GridColumn column = (GridColumn)value; |
79 |
GridColumn column = (GridColumn) value; |
| 81 |
|
80 |
|
| 82 |
boolean flat = (column.getParent().getCellSelectionEnabled() && !column.getMoveable()); |
81 |
boolean flat = (column.getParent().getCellSelectionEnabled() && !column |
| 83 |
|
82 |
.getMoveable()); |
| 84 |
boolean drawSelected = ((isMouseDown() && isHover())); |
83 |
|
| 85 |
|
84 |
boolean drawSelected = ((isMouseDown() && isHover())); |
| 86 |
gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); |
85 |
|
| 87 |
|
86 |
gc.setBackground(getDisplay().getSystemColor( |
| 88 |
if (flat && isSelected()) |
87 |
SWT.COLOR_WIDGET_BACKGROUND)); |
| 89 |
{ |
88 |
|
| 90 |
gc.setBackground(column.getParent().getCellHeaderSelectionBackground()); |
89 |
if (flat && isSelected()) { |
| 91 |
} |
90 |
gc.setBackground(column.getParent() |
| 92 |
|
91 |
.getCellHeaderSelectionBackground()); |
| 93 |
gc.fillRectangle(getBounds().x, getBounds().y, getBounds().width, |
92 |
} |
| 94 |
getBounds().height); |
93 |
|
| 95 |
|
94 |
gc.fillRectangle(getBounds().x, getBounds().y, getBounds().width, |
| 96 |
int pushedDrawingOffset = 0; |
95 |
getBounds().height); |
| 97 |
if (drawSelected) |
96 |
|
| 98 |
{ |
97 |
int pushedDrawingOffset = 0; |
| 99 |
pushedDrawingOffset = 1; |
98 |
if (drawSelected) { |
| 100 |
} |
99 |
pushedDrawingOffset = 1; |
| 101 |
|
100 |
} |
| 102 |
int x = leftMargin; |
101 |
|
| 103 |
|
102 |
int x = leftMargin; |
| 104 |
if (column.getImage() != null) |
103 |
|
| 105 |
{ |
104 |
if (column.getImage() != null) { |
| 106 |
gc.drawImage(column.getImage(), getBounds().x + x + pushedDrawingOffset, |
105 |
gc.drawImage(column.getImage(), getBounds().x + x |
| 107 |
getBounds().y + pushedDrawingOffset + getBounds().height - bottomMargin - column.getImage().getBounds().height); |
106 |
+ pushedDrawingOffset, getBounds().y + pushedDrawingOffset |
| 108 |
x += column.getImage().getBounds().width + imageSpacing; |
107 |
+ getBounds().height - bottomMargin |
| 109 |
} |
108 |
- column.getImage().getBounds().height); |
| 110 |
|
109 |
x += column.getImage().getBounds().width + imageSpacing; |
| 111 |
int width = getBounds().width - x; |
110 |
} |
| 112 |
|
111 |
|
| 113 |
if (column.getSort() == SWT.NONE) |
112 |
int width = getBounds().width - x; |
| 114 |
{ |
113 |
|
| 115 |
width -= rightMargin; |
114 |
if (column.getSort() == SWT.NONE) { |
| 116 |
} |
115 |
width -= rightMargin; |
| 117 |
else |
116 |
} else { |
| 118 |
{ |
117 |
width -= arrowMargin + arrowRenderer.getSize().x + arrowMargin; |
| 119 |
width -= arrowMargin + arrowRenderer.getSize().x + arrowMargin; |
118 |
} |
| 120 |
} |
119 |
|
| 121 |
|
120 |
gc.setForeground(getDisplay().getSystemColor( |
| 122 |
gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND)); |
121 |
SWT.COLOR_WIDGET_FOREGROUND)); |
| 123 |
|
122 |
|
| 124 |
int y = getBounds().y + getBounds().height - bottomMargin - gc.getFontMetrics().getHeight(); |
123 |
int y = bottomMargin; |
| 125 |
|
124 |
|
| 126 |
String text = TextUtils.getShortString(gc, column.getText(), width); |
125 |
if( column.getHeaderControl() == null ) { |
| 127 |
|
126 |
y = getBounds().y + getBounds().height - bottomMargin |
| 128 |
if (column.getAlignment() == SWT.RIGHT) |
127 |
- gc.getFontMetrics().getHeight(); |
| 129 |
{ |
128 |
} |
| 130 |
int len = gc.stringExtent(text).x; |
129 |
|
| 131 |
if (len < width) |
130 |
String text = TextUtils.getShortString(gc, column.getText(), width); |
| 132 |
{ |
131 |
|
| 133 |
x += width - len; |
132 |
if (column.getAlignment() == SWT.RIGHT) { |
| 134 |
} |
133 |
int len = gc.stringExtent(text).x; |
| 135 |
} |
134 |
if (len < width) { |
| 136 |
else if (column.getAlignment() == SWT.CENTER) |
135 |
x += width - len; |
| 137 |
{ |
136 |
} |
| 138 |
int len = gc.stringExtent(text).x; |
137 |
} else if (column.getAlignment() == SWT.CENTER) { |
| 139 |
if (len < width) |
138 |
int len = gc.stringExtent(text).x; |
| 140 |
{ |
139 |
if (len < width) { |
| 141 |
x += (width - len) / 2; |
140 |
x += (width - len) / 2; |
| 142 |
} |
141 |
} |
| 143 |
} |
142 |
} |
| 144 |
|
143 |
|
| 145 |
|
144 |
gc.drawString(text, getBounds().x + x + pushedDrawingOffset, y |
| 146 |
gc.drawString(text, getBounds().x + x + pushedDrawingOffset, |
145 |
+ pushedDrawingOffset, true); |
| 147 |
y + pushedDrawingOffset,true); |
146 |
|
| 148 |
|
147 |
if (column.getSort() != SWT.NONE) { |
| 149 |
if (column.getSort() != SWT.NONE) |
148 |
arrowRenderer.setSelected(column.getSort() == SWT.UP); |
| 150 |
{ |
149 |
if (drawSelected) { |
| 151 |
arrowRenderer.setSelected(column.getSort() == SWT.UP); |
150 |
arrowRenderer.setLocation(getBounds().x + getBounds().width |
| 152 |
if (drawSelected) |
151 |
- arrowMargin - arrowRenderer.getBounds().width + 1, |
| 153 |
{ |
152 |
getBounds().y |
| 154 |
arrowRenderer |
153 |
+ ((getBounds().height - arrowRenderer |
| 155 |
.setLocation( |
154 |
.getBounds().height) / 2) + 1); |
| 156 |
getBounds().x + getBounds().width - arrowMargin |
155 |
} else { |
| 157 |
- arrowRenderer.getBounds().width + 1, |
156 |
arrowRenderer.setLocation(getBounds().x + getBounds().width |
| 158 |
getBounds().y |
157 |
- arrowMargin - arrowRenderer.getBounds().width, |
| 159 |
+ ((getBounds().height - arrowRenderer.getBounds().height) / 2) |
158 |
getBounds().y |
| 160 |
+ 1); |
159 |
+ ((getBounds().height - arrowRenderer |
| 161 |
} |
160 |
.getBounds().height) / 2)); |
| 162 |
else |
161 |
} |
| 163 |
{ |
162 |
arrowRenderer.paint(gc, null); |
| 164 |
arrowRenderer |
163 |
} |
| 165 |
.setLocation( |
164 |
|
| 166 |
getBounds().x + getBounds().width - arrowMargin |
165 |
if (!flat) { |
| 167 |
- arrowRenderer.getBounds().width, |
166 |
|
| 168 |
getBounds().y |
167 |
if (drawSelected) { |
| 169 |
+ ((getBounds().height - arrowRenderer.getBounds().height) / 2)); |
168 |
gc.setForeground(getDisplay().getSystemColor( |
| 170 |
} |
169 |
SWT.COLOR_WIDGET_NORMAL_SHADOW)); |
| 171 |
arrowRenderer.paint(gc, null); |
170 |
} else { |
| 172 |
} |
171 |
gc.setForeground(getDisplay().getSystemColor( |
| 173 |
|
172 |
SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW)); |
| 174 |
if (!flat) |
173 |
} |
| 175 |
{ |
174 |
|
| 176 |
|
175 |
gc.drawLine(getBounds().x, getBounds().y, getBounds().x |
| 177 |
if (drawSelected) |
176 |
+ getBounds().width - 1, getBounds().y); |
| 178 |
{ |
177 |
gc.drawLine(getBounds().x, getBounds().y, getBounds().x, |
| 179 |
gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW)); |
178 |
getBounds().y + getBounds().height - 1); |
| 180 |
} |
179 |
|
| 181 |
else |
180 |
if (!drawSelected) { |
| 182 |
{ |
181 |
gc.setForeground(getDisplay().getSystemColor( |
| 183 |
gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW)); |
182 |
SWT.COLOR_WIDGET_LIGHT_SHADOW)); |
| 184 |
} |
183 |
gc.drawLine(getBounds().x + 1, getBounds().y + 1, getBounds().x |
| 185 |
|
184 |
+ getBounds().width - 2, getBounds().y + 1); |
| 186 |
gc.drawLine(getBounds().x, getBounds().y, getBounds().x + getBounds().width - 1, |
185 |
gc.drawLine(getBounds().x + 1, getBounds().y + 1, |
| 187 |
getBounds().y); |
186 |
getBounds().x + 1, getBounds().y + getBounds().height |
| 188 |
gc.drawLine(getBounds().x, getBounds().y, getBounds().x, getBounds().y + getBounds().height |
187 |
- 2); |
| 189 |
- 1); |
188 |
} |
| 190 |
|
189 |
|
| 191 |
if (!drawSelected) |
190 |
if (drawSelected) { |
| 192 |
{ |
191 |
gc.setForeground(getDisplay().getSystemColor( |
| 193 |
gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW)); |
192 |
SWT.COLOR_WIDGET_NORMAL_SHADOW)); |
| 194 |
gc.drawLine(getBounds().x + 1, getBounds().y + 1, |
193 |
} else { |
| 195 |
getBounds().x + getBounds().width - 2, getBounds().y + 1); |
194 |
gc.setForeground(getDisplay().getSystemColor( |
| 196 |
gc.drawLine(getBounds().x + 1, getBounds().y + 1, getBounds().x + 1, |
195 |
SWT.COLOR_WIDGET_DARK_SHADOW)); |
| 197 |
getBounds().y + getBounds().height - 2); |
196 |
} |
| 198 |
} |
197 |
gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y, |
| 199 |
|
198 |
getBounds().x + getBounds().width - 1, getBounds().y |
| 200 |
if (drawSelected) |
199 |
+ getBounds().height - 1); |
| 201 |
{ |
200 |
gc.drawLine(getBounds().x, getBounds().y + getBounds().height - 1, |
| 202 |
gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW)); |
201 |
getBounds().x + getBounds().width - 1, getBounds().y |
| 203 |
} |
202 |
+ getBounds().height - 1); |
| 204 |
else |
203 |
|
| 205 |
{ |
204 |
if (!drawSelected) { |
| 206 |
gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW)); |
205 |
gc.setForeground(getDisplay().getSystemColor( |
| 207 |
} |
206 |
SWT.COLOR_WIDGET_NORMAL_SHADOW)); |
| 208 |
gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y, getBounds().x |
207 |
gc.drawLine(getBounds().x + getBounds().width - 2, |
| 209 |
+ getBounds().width - 1, |
208 |
getBounds().y + 1, getBounds().x + getBounds().width |
| 210 |
getBounds().y + getBounds().height - 1); |
209 |
- 2, getBounds().y + getBounds().height - 2); |
| 211 |
gc.drawLine(getBounds().x, getBounds().y + getBounds().height - 1, getBounds().x |
210 |
gc.drawLine(getBounds().x + 1, getBounds().y |
| 212 |
+ getBounds().width - 1, |
211 |
+ getBounds().height - 2, getBounds().x |
| 213 |
getBounds().y + getBounds().height - 1); |
212 |
+ getBounds().width - 2, getBounds().y |
| 214 |
|
213 |
+ getBounds().height - 2); |
| 215 |
if (!drawSelected) |
214 |
} |
| 216 |
{ |
215 |
|
| 217 |
gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW)); |
216 |
} else { |
| 218 |
gc.drawLine(getBounds().x + getBounds().width - 2, getBounds().y + 1, |
217 |
gc.setForeground(getDisplay().getSystemColor( |
| 219 |
getBounds().x + getBounds().width - 2, getBounds().y + getBounds().height |
218 |
SWT.COLOR_WIDGET_DARK_SHADOW)); |
| 220 |
- 2); |
219 |
|
| 221 |
gc.drawLine(getBounds().x + 1, getBounds().y + getBounds().height - 2, |
220 |
gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y, |
| 222 |
getBounds().x + getBounds().width - 2, getBounds().y + getBounds().height |
221 |
getBounds().x + getBounds().width - 1, getBounds().y |
| 223 |
- 2); |
222 |
+ getBounds().height - 1); |
| 224 |
} |
223 |
gc.drawLine(getBounds().x, getBounds().y + getBounds().height - 1, |
| 225 |
|
224 |
getBounds().x + getBounds().width - 1, getBounds().y |
| 226 |
} |
225 |
+ getBounds().height - 1); |
| 227 |
else |
226 |
} |
| 228 |
{ |
227 |
|
| 229 |
gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW)); |
228 |
} |
| 230 |
|
229 |
|
| 231 |
gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y, getBounds().x |
230 |
/** |
| 232 |
+ getBounds().width - 1, |
231 |
* {@inheritDoc} |
| 233 |
getBounds().y + getBounds().height - 1); |
232 |
*/ |
| 234 |
gc.drawLine(getBounds().x, getBounds().y + getBounds().height - 1, getBounds().x |
233 |
public void setDisplay(Display display) { |
| 235 |
+ getBounds().width - 1, |
234 |
super.setDisplay(display); |
| 236 |
getBounds().y + getBounds().height - 1); |
235 |
arrowRenderer.setDisplay(display); |
| 237 |
} |
236 |
} |
| 238 |
|
237 |
|
| 239 |
|
238 |
/** |
| 240 |
} |
239 |
* {@inheritDoc} |
| 241 |
|
240 |
*/ |
| 242 |
/** |
241 |
public boolean notify(int event, Point point, Object value) { |
| 243 |
* {@inheritDoc} |
242 |
return false; |
| 244 |
*/ |
243 |
} |
| 245 |
public void setDisplay(Display display) |
244 |
|
| 246 |
{ |
245 |
/** |
| 247 |
super.setDisplay(display); |
246 |
* {@inheritDoc} |
| 248 |
arrowRenderer.setDisplay(display); |
247 |
*/ |
| 249 |
} |
248 |
public Rectangle getTextBounds(Object value, boolean preferred) { |
| 250 |
|
249 |
GridColumn column = (GridColumn) value; |
| 251 |
/** |
250 |
|
| 252 |
* {@inheritDoc} |
251 |
int x = leftMargin; |
| 253 |
*/ |
252 |
|
| 254 |
public boolean notify(int event, Point point, Object value) |
253 |
if (column.getImage() != null) { |
| 255 |
{ |
254 |
x += column.getImage().getBounds().width + imageSpacing; |
| 256 |
return false; |
255 |
} |
| 257 |
} |
256 |
|
| 258 |
|
257 |
GC gc = new GC(column.getParent()); |
| 259 |
/** |
258 |
gc.setFont(column.getParent().getFont()); |
| 260 |
* {@inheritDoc} |
259 |
int y = bottomMargin; |
| 261 |
*/ |
260 |
|
| 262 |
public Rectangle getTextBounds(Object value, boolean preferred) |
261 |
if( column.getHeaderControl() != null ) { |
| 263 |
{ |
262 |
y = getBounds().height - bottomMargin |
| 264 |
GridColumn column = (GridColumn)value; |
263 |
- gc.getFontMetrics().getHeight(); |
| 265 |
|
264 |
} |
| 266 |
int x = leftMargin; |
265 |
|
| 267 |
|
266 |
Rectangle bounds = new Rectangle(x, y, 0, 0); |
| 268 |
if (column.getImage() != null) |
267 |
|
| 269 |
{ |
268 |
Point p = gc.stringExtent(column.getText()); |
| 270 |
x += column.getImage().getBounds().width + imageSpacing; |
269 |
|
| 271 |
} |
270 |
bounds.height = p.y; |
| 272 |
|
271 |
|
| 273 |
|
272 |
if (preferred) { |
| 274 |
|
273 |
bounds.width = p.x; |
| 275 |
GC gc = new GC(column.getParent()); |
274 |
} else { |
| 276 |
gc.setFont(column.getParent().getFont()); |
275 |
int width = getBounds().width - x; |
| 277 |
int y = getBounds().height - bottomMargin - gc.getFontMetrics().getHeight(); |
276 |
if (column.getSort() == SWT.NONE) { |
| 278 |
|
277 |
width -= rightMargin; |
| 279 |
Rectangle bounds = new Rectangle(x,y,0,0); |
278 |
} else { |
| 280 |
|
279 |
width -= arrowMargin + arrowRenderer.getSize().x + arrowMargin; |
| 281 |
Point p = gc.stringExtent(column.getText()); |
280 |
} |
| 282 |
|
281 |
bounds.width = width; |
| 283 |
bounds.height = p.y; |
282 |
} |
| 284 |
|
283 |
|
| 285 |
if (preferred) |
284 |
gc.dispose(); |
| 286 |
{ |
285 |
|
| 287 |
bounds.width = p.x; |
286 |
return bounds; |
| 288 |
} |
287 |
} |
| 289 |
else |
288 |
|
| 290 |
{ |
289 |
/** |
| 291 |
int width = getBounds().width - x; |
290 |
* @return the bounds reserved for the control |
| 292 |
if (column.getSort() == SWT.NONE) |
291 |
*/ |
| 293 |
{ |
292 |
protected Rectangle getControlBounds(Object value, boolean preferred) { |
| 294 |
width -= rightMargin; |
293 |
Rectangle bounds = getBounds(); |
| 295 |
} |
294 |
GridColumn column = (GridColumn) value; |
| 296 |
else |
295 |
Point controlSize = computeControlSize(column); |
| 297 |
{ |
296 |
return new Rectangle(bounds.x+3,bounds.height-bottomMargin-controlSize.y,bounds.width-6,controlSize.y); |
| 298 |
width -= arrowMargin + arrowRenderer.getSize().x + arrowMargin; |
297 |
} |
| 299 |
} |
298 |
|
| 300 |
bounds.width = width; |
299 |
private Point computeControlSize(GridColumn column) { |
| 301 |
} |
300 |
if( column.getHeaderControl() != null ) { |
| 302 |
|
301 |
return column.getHeaderControl().computeSize(SWT.DEFAULT, SWT.DEFAULT); |
| 303 |
|
302 |
} |
| 304 |
gc.dispose(); |
303 |
return new Point(0,0); |
| 305 |
|
304 |
} |
| 306 |
return bounds; |
|
|
| 307 |
} |
| 308 |
} |
305 |
} |