Mercurial > projects > dwt-linux
comparison dwt/layout/FormAttachment.d @ 259:c0d810de7093
Update SWT 3.4M7 to 3.4
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 29 Jun 2008 14:33:38 +0200 |
parents | 380bad9f6852 |
children |
comparison
equal
deleted
inserted
replaced
257:cc1d3de0e80b | 259:c0d810de7093 |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2006 IBM Corporation and others. | 2 * Copyright (c) 2000, 2008 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
77 * If the alignment is not specified, the default is to attach to the adjacent side. | 77 * If the alignment is not specified, the default is to attach to the adjacent side. |
78 * </p> | 78 * </p> |
79 * | 79 * |
80 * @see FormLayout | 80 * @see FormLayout |
81 * @see FormData | 81 * @see FormData |
82 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> | |
82 * | 83 * |
83 * @since 2.0 | 84 * @since 2.0 |
84 */ | 85 */ |
85 public final class FormAttachment { | 86 public final class FormAttachment { |
86 /** | 87 /** |
124 * and right attachments, LEFT, RIGHT and CENTER are used. If any other case | 125 * and right attachments, LEFT, RIGHT and CENTER are used. If any other case |
125 * occurs, the default will be used instead. | 126 * occurs, the default will be used instead. |
126 * </p> | 127 * </p> |
127 * | 128 * |
128 * <br>Possible values are: <ul> | 129 * <br>Possible values are: <ul> |
129 * <li>TOP: Attach the side to the top side of the specified control.</li> | 130 * <li>{@link DWT#TOP}: Attach the side to the top side of the specified control.</li> |
130 * <li>BOTTOM : Attach the side to the bottom side of the specified control.</li> | 131 * <li>{@link DWT#BOTTOM}: Attach the side to the bottom side of the specified control.</li> |
131 * <li>LEFT: Attach the side to the left side of the specified control.</li> | 132 * <li>{@link DWT#LEFT}: Attach the side to the left side of the specified control.</li> |
132 * <li>RIGHT: Attach the side to the right side of the specified control.</li> | 133 * <li>{@link DWT#RIGHT}: Attach the side to the right side of the specified control.</li> |
133 * <li>CENTER: Attach the side at a position which will center the control on the specified control.</li> | 134 * <li>{@link DWT#CENTER}: Attach the side at a position which will center the control on the specified control.</li> |
134 * <li>DEFAULT: Attach the side to the adjacent side of the specified control.</li> | 135 * <li>{@link DWT#DEFAULT}: Attach the side to the adjacent side of the specified control.</li> |
135 * </ul> | 136 * </ul> |
136 */ | 137 */ |
137 public int alignment; | 138 public int alignment; |
138 | 139 |
139 /** | 140 /** |
218 this (control, offset, DWT.DEFAULT); | 219 this (control, offset, DWT.DEFAULT); |
219 } | 220 } |
220 | 221 |
221 /** | 222 /** |
222 * Constructs a new instance of this class given a control, | 223 * Constructs a new instance of this class given a control, |
223 * an offset and an alignment. | 224 * an offset and an alignment. The possible alignment values are: |
225 * <dl> | |
226 * <dt><b>{@link DWT#TOP}</b></dt> | |
227 * <dd>the side will be attached to the top side of the specified control</dd> | |
228 * <dt><b>{@link DWT#BOTTOM}</b></dt> | |
229 * <dd>the side will be attached to the bottom side of the specified control</dd> | |
230 * <dt><b>{@link DWT#LEFT}</b></dt> | |
231 * <dd>the side will be attached to the left side of the specified control</dd> | |
232 * <dt><b>{@link DWT#RIGHT}</b></dt> | |
233 * <dd>the side will be attached to the right side of the specified control</dd> | |
234 * <dt><b>{@link DWT#CENTER}</b></dt> | |
235 * <dd>the side will be centered on the same side of the specified control</dd> | |
236 * <dt><b>{@link DWT#DEFAULT}</b></dt> | |
237 * <dd>the side will be attached to the adjacent side of the specified control</dd> | |
238 * </dl> | |
224 * | 239 * |
225 * @param control the control the side is attached to | 240 * @param control the control the side is attached to |
226 * @param offset the offset of the side from the control | 241 * @param offset the offset of the side from the control |
227 * @param alignment the alignment of the side to the control it is attached to | 242 * @param alignment the alignment of the side to the control it is attached to, |
243 * one of TOP, BOTTOM, LEFT, RIGHT, CENTER, or DEFAULT | |
228 */ | 244 */ |
229 public this (Control control, int offset, int alignment) { | 245 public this (Control control, int offset, int alignment) { |
230 this.control = control; | 246 this.control = control; |
231 this.offset = offset; | 247 this.offset = offset; |
232 this.alignment = alignment; | 248 this.alignment = alignment; |