From 0f5ecdc88787a5adf464eabcf7ef9d32c23836cd Mon Sep 17 00:00:00 2001
From: Daniel Ratiu <ratiu@fortiss.org>
Date: Sat, 24 Mar 2012 21:15:36 +0000
Subject: [PATCH] enhancing the Semantic Inspector UI to specify the word size
 and bmc length refs 730

---
 .../tooling/base/ui/utils/WidgetsFactory.java | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/WidgetsFactory.java

diff --git a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/WidgetsFactory.java b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/WidgetsFactory.java
new file mode 100644
index 000000000..6b316d34e
--- /dev/null
+++ b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/WidgetsFactory.java
@@ -0,0 +1,55 @@
+/*--------------------------------------------------------------------------+
+$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
+|                                                                          |
+| Copyright 2012 ForTISS GmbH                     |
+|                                                                          |
+| Licensed under the Apache License, Version 2.0 (the "License");          |
+| you may not use this file except in compliance with the License.         |
+| You may obtain a copy of the License at                                  |
+|                                                                          |
+|    http://www.apache.org/licenses/LICENSE-2.0                            |
+|                                                                          |
+| Unless required by applicable law or agreed to in writing, software      |
+| distributed under the License is distributed on an "AS IS" BASIS,        |
+| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
+| See the License for the specific language governing permissions and      |
+| limitations under the License.                                           |
++--------------------------------------------------------------------------*/
+package org.fortiss.tooling.base.ui.utils;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Spinner;
+
+/**
+ * Factory class for easier creation of different widgets.
+ * 
+ * @author ratiu
+ * @author $Author: hoelzl $
+ * @version $Rev: 18709 $
+ * @ConQAT.Rating YELLOW Hash: 674ED934FDD30AF561C24A5D2C5990EF
+ */
+public class WidgetsFactory {
+
+	/**
+	 * Creates a new spinner.
+	 * 
+	 * @param parent
+	 *            - the parent component
+	 * @param minimum
+	 *            - minimum of the spinner value
+	 * @param maximum
+	 *            - maximum of the spinner value
+	 * @param selection
+	 *            - initial selection of the spinner
+	 * @return the spinner object
+	 */
+	public static Spinner createSpinner(Composite parent, int minimum, int maximum, int selection) {
+		Spinner spinner = new Spinner(parent, SWT.BORDER);
+		spinner.setMinimum(minimum);
+		spinner.setMaximum(maximum);
+		spinner.setIncrement(1);
+		spinner.setSelection(selection);
+		return spinner;
+	}
+}
-- 
GitLab