Commit | Line | Data |
---|---|---|
b0d3496e ASL |
1 | /**********************************************************************\r |
2 | * Copyright (c) 2005, 2006 IBM Corporation and others.\r | |
3 | * All rights reserved. This program and the accompanying materials\r | |
4 | * are made available under the terms of the Eclipse Public License v1.0\r | |
5 | * which accompanies this distribution, and is available at\r | |
6 | * http://www.eclipse.org/legal/epl-v10.html\r | |
7 | * $Id: GridUtil.java,v 1.3 2006/09/20 19:49:13 ewchan Exp $\r | |
8 | * \r | |
9 | * Contributors: \r | |
10 | * IBM - Initial API and implementation\r | |
11 | **********************************************************************/\r | |
12 | \r | |
2fa130b8 | 13 | package org.eclipse.linuxtools.tmf.ui.widgets.timegraph;\r |
b0d3496e ASL |
14 | \r |
15 | import org.eclipse.swt.SWT;\r | |
16 | import org.eclipse.swt.layout.GridData;\r | |
17 | \r | |
18 | /**\r | |
19 | * A utility class to create convenient grid data objects.\r | |
20 | */ \r | |
21 | public class GridUtil\r | |
22 | {\r | |
23 | /**\r | |
24 | * Creates a grid data object that occupies vertical and horizontal\r | |
25 | * space.\r | |
26 | */\r | |
27 | static public GridData createFill() \r | |
28 | {\r | |
29 | return new GridData(SWT.FILL, SWT.FILL, true, true);\r | |
30 | }\r | |
31 | /**\r | |
32 | * Creates a grid data object that occupies horizontal space.\r | |
33 | */\r | |
34 | static public GridData createHorizontalFill() \r | |
35 | { \r | |
36 | return new GridData(SWT.FILL, SWT.DEFAULT, true, false); \r | |
37 | }\r | |
38 | /**\r | |
39 | * Creates a grid data object that occupies vertical space.\r | |
40 | */\r | |
41 | static public GridData createVerticalFill() \r | |
42 | {\r | |
43 | return new GridData(SWT.DEFAULT, SWT.FILL, false, true);\r | |
44 | }\r | |
45 | }\r |