KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > forms > widgets > ColumnLayoutData


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.forms.widgets;
12 import org.eclipse.swt.SWT;
13 /**
14  * This class is used to store layout data for the <code>ColumnLayout</code>
15  * class. You can control width and height hints, as well as horizontal
16  * alignment using instances of this class. As with other layouts, they are not
17  * required to get the default behaviour.
18  *
19  * @see ColumnLayout
20  * @since 3.0
21  */

22 public final class ColumnLayoutData {
23     /**
24      * Width hint that will be used instead of the computed control width when
25      * used in conjunction with <code>ColumnLayout</code> class (default is
26      * SWT.DEFAULT).
27      */

28     public int widthHint = SWT.DEFAULT;
29     /**
30      * Height hint that will be used instead of the computed control height
31      * when used in conjunction with <code>ColumnLayout</code> class (default
32      * is SWT.DEFAULT).
33      */

34     public int heightHint = SWT.DEFAULT;
35     /**
36      * Horizontal alignment constant - control will be aligned to the left.
37      */

38     public static final int LEFT = 1;
39     /**
40      * Horizontal alignment constant - control will be aligned to the right.
41      */

42     public static final int CENTER = 2;
43     /**
44      * Horizontal alignment constant - control will be centered.
45      */

46     public static final int RIGHT = 3;
47     /**
48      * Horizontal alignment constant - control will fill the column.
49      */

50     public static final int FILL = 4;
51     /**
52      * Horizontal alignment variable (default is FILL).
53      */

54     public int horizontalAlignment = FILL;
55     /**
56      * Convinience constructor for the class.
57      *
58      * @param wHint
59      * width hint for the control
60      * @param hHint
61      * height hint for the control
62      */

63     public ColumnLayoutData(int wHint, int hHint) {
64         this.widthHint = wHint;
65         this.heightHint = hHint;
66     }
67     /**
68      * Convinience constructor for the class.
69      *
70      * @param wHint
71      * width hint for the control
72      */

73     public ColumnLayoutData(int wHint) {
74         this.widthHint = wHint;
75     }
76     /**
77      * The default constructor.
78      *
79      */

80     public ColumnLayoutData() {
81     }
82 }
83
Popular Tags