/*- * Copyright © 2009 Diamond Light Source Ltd. * * This file is part of GDA. * * GDA is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License version 3 as published by the Free * Software Foundation. * * GDA 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 General Public License for more * details. * * You should have received a copy of the GNU General Public License along * with GDA. If not, see <http://www.gnu.org/licenses/>. */ package uk.ac.gda.richbeans.examples; import org.eclipse.richbeans.widgets.scalebox.ScaleBox; import org.eclipse.richbeans.widgets.wrappers.LabelWrapper; import org.eclipse.richbeans.widgets.wrappers.TextWrapper; 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.Label; /** * @author Matthew Gerring * */ public class ExampleParametersComposite extends Composite { private ScaleBox stop; private ScaleBox start; private TextWrapper edge; private TextWrapper element; public ExampleParametersComposite(Composite parent, int switches) { super(parent, switches); create(); } @SuppressWarnings("unused") private void create() { // Automatic section generated by RCP Developer final GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 3; this.setLayout(gridLayout); this.setBounds(0, 0,739, 498); new Label(this, SWT.NONE); final Composite composite_1 = new Composite(this, SWT.NONE); composite_1.setLayout(new GridLayout()); new Label(this, SWT.NONE); final Label elementLabel = new Label(this, SWT.NONE); elementLabel.setText("Element"); new Label(this, SWT.NONE); element = new TextWrapper(this, SWT.BORDER); final GridData gd_element = new GridData(SWT.FILL, SWT.CENTER, true, false); element.setLayoutData(gd_element); final Label edgeLabel = new Label(this, SWT.NONE); edgeLabel.setText("Edge"); new Label(this, SWT.NONE); edge = new TextWrapper(this, SWT.BORDER); final GridData gd_edge = new GridData(SWT.FILL, SWT.CENTER, true, false); edge.setLayoutData(gd_edge); final LabelWrapper startLabelWrapper = new LabelWrapper(this, SWT.NONE); startLabelWrapper.setText("Start"); new Label(this, SWT.NONE); start = new ScaleBox(this, SWT.NONE); final GridData gd_start = new GridData(SWT.FILL, SWT.CENTER, false, false); start.setLayoutData(gd_start); final LabelWrapper stopLabelWrapper = new LabelWrapper(this, SWT.NONE); stopLabelWrapper.setText("Stop"); new Label(this, SWT.NONE); stop = new ScaleBox(this, SWT.NONE); final GridData gd_stop = new GridData(SWT.FILL, SWT.CENTER, false, false); stop.setLayoutData(gd_stop); } /** * @return the element */ public TextWrapper getElement() { return element; } /** * @return the edge */ public TextWrapper getEdge() { return edge; } /** * @return the start */ public ScaleBox getStart() { return start; } /** * @return the stop */ public ScaleBox getStop() { return stop; } }