/** SpagoBI - The Business Intelligence Free Platform Copyright (C) 2005-2010 Engineering Ingegneria Informatica S.p.A. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA **/ package it.eng.spagobi.studio.extchart.utils; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; /** * @author Marco Cortella (marco.cortella@eng.it) * */ public class TestDialog extends Dialog { /** * Create the dialog. * @param parentShell */ public TestDialog(Shell parentShell) { super(parentShell); } /** * Create contents of the dialog. * @param parent */ @Override protected Control createDialogArea(Composite parent) { Composite container = (Composite) super.createDialogArea(parent); container.setLayout(new GridLayout(1, false)); Composite composite_1 = new Composite(container, SWT.NONE); composite_1.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, true, 1, 1)); composite_1.setLayout(new GridLayout(2, false)); Label label = new Label(composite_1, SWT.NONE); label.setText("New Label"); Button button_2 = new Button(composite_1, SWT.NONE); button_2.setText("New Button"); Label label_1 = new Label(composite_1, SWT.NONE); label_1.setText("New Label"); Button button_3 = new Button(composite_1, SWT.NONE); button_3.setText("New Button"); Label label_2 = new Label(composite_1, SWT.NONE); label_2.setText("New Label"); Button button_4 = new Button(composite_1, SWT.NONE); button_4.setText("New Button"); Label label_3 = new Label(composite_1, SWT.NONE); label_3.setText("New Label"); Button button_5 = new Button(composite_1, SWT.NONE); button_5.setText("New Button"); Button button_6 = new Button(composite_1, SWT.CHECK); button_6.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { } }); button_6.setText("Check Button"); new Label(composite_1, SWT.NONE); Composite composite = new Composite(container, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); composite.setLayout(new GridLayout(2, false)); Button button = new Button(composite, SWT.NONE); button.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1)); button.setText("New Button"); Button button_1 = new Button(composite, SWT.NONE); button_1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1)); button_1.setText("New Button"); return container; } /** * Create contents of the button bar. * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } /** * Return the initial size of the dialog. */ @Override protected Point getInitialSize() { return new Point(450, 300); } }