| /******************************************************************************* |
| * Copyright (c) 2008 The University of York. |
| * This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * Contributors: |
| * Dimitrios Kolovos - initial API and implementation |
| ******************************************************************************/ |
| package org.eclipse.epsilon.common.dt.util; |
| |
| import org.eclipse.swt.SWT; |
| import org.eclipse.swt.layout.GridData; |
| import org.eclipse.swt.layout.GridLayout; |
| import org.eclipse.swt.widgets.Composite; |
| import org.eclipse.swt.widgets.Group; |
| |
| public class DialogUtil { |
| |
| public static Composite createGroupContainer(Composite parent, String text, int columns) { |
| final Group group = new Group(parent, SWT.FILL); |
| |
| group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); |
| group.setText(text); |
| group.setLayout(new GridLayout(1,false)); |
| |
| final Composite groupContent = new Composite(group, SWT.FILL); |
| groupContent.setLayout(new GridLayout(columns, false)); |
| groupContent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); |
| |
| return groupContent; |
| } |
| |
| } |