75
|
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 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.ui.forms.widgets.ColumnLayoutData;
|
|
14 import dwt.DWT;
|
|
15 /**
|
|
16 * This class is used to store layout data for the <code>ColumnLayout</code>
|
|
17 * class. You can control width and height hints, as well as horizontal
|
|
18 * alignment using instances of this class. As with other layouts, they are not
|
|
19 * required to get the default behaviour.
|
|
20 *
|
|
21 * @see ColumnLayout
|
|
22 * @since 3.0
|
|
23 */
|
|
24 public final class ColumnLayoutData {
|
|
25 /**
|
|
26 * Width hint that will be used instead of the computed control width when
|
|
27 * used in conjunction with <code>ColumnLayout</code> class (default is
|
|
28 * DWT.DEFAULT).
|
|
29 */
|
|
30 public int widthHint = DWT.DEFAULT;
|
|
31 /**
|
|
32 * Height hint that will be used instead of the computed control height
|
|
33 * when used in conjunction with <code>ColumnLayout</code> class (default
|
|
34 * is DWT.DEFAULT).
|
|
35 */
|
|
36 public int heightHint = DWT.DEFAULT;
|
|
37 /**
|
|
38 * Horizontal alignment constant - control will be aligned to the left.
|
|
39 */
|
|
40 public static const int LEFT = 1;
|
|
41 /**
|
|
42 * Horizontal alignment constant - control will be aligned to the right.
|
|
43 */
|
|
44 public static const int CENTER = 2;
|
|
45 /**
|
|
46 * Horizontal alignment constant - control will be centered.
|
|
47 */
|
|
48 public static const int RIGHT = 3;
|
|
49 /**
|
|
50 * Horizontal alignment constant - control will fill the column.
|
|
51 */
|
|
52 public static const int FILL = 4;
|
|
53 /**
|
|
54 * Horizontal alignment variable (default is FILL).
|
|
55 */
|
|
56 public int horizontalAlignment = FILL;
|
|
57 /**
|
|
58 * Convinience constructor for the class.
|
|
59 *
|
|
60 * @param wHint
|
|
61 * width hint for the control
|
|
62 * @param hHint
|
|
63 * height hint for the control
|
|
64 */
|
|
65 public this(int wHint, int hHint) {
|
|
66 this.widthHint = wHint;
|
|
67 this.heightHint = hHint;
|
|
68 }
|
|
69 /**
|
|
70 * Convinience constructor for the class.
|
|
71 *
|
|
72 * @param wHint
|
|
73 * width hint for the control
|
|
74 */
|
|
75 public this(int wHint) {
|
|
76 this.widthHint = wHint;
|
|
77 }
|
|
78 /**
|
|
79 * The default constructor.
|
|
80 *
|
|
81 */
|
|
82 public this() {
|
|
83 }
|
|
84 }
|