Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.jet.ec2008.swtgen.codebehind/templates/control/button')
-rw-r--r--examples/org.eclipse.jet.ec2008.swtgen.codebehind/templates/control/button/initControl.jet16
-rw-r--r--examples/org.eclipse.jet.ec2008.swtgen.codebehind/templates/control/button/swtStyles.jet17
2 files changed, 33 insertions, 0 deletions
diff --git a/examples/org.eclipse.jet.ec2008.swtgen.codebehind/templates/control/button/initControl.jet b/examples/org.eclipse.jet.ec2008.swtgen.codebehind/templates/control/button/initControl.jet
new file mode 100644
index 0000000..f096295
--- /dev/null
+++ b/examples/org.eclipse.jet.ec2008.swtgen.codebehind/templates/control/button/initControl.jet
@@ -0,0 +1,16 @@
+<%!
+/* Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. */
+%>
+<%-- button --%>
+<c:if test="$control/@enabled">
+ <c:get select="$control/@name"/>.setEnabled(<c:get select="$control/@enabled"/>);
+</c:if>
+<c:if test="$control/@text">
+ <c:get select="$control/@name"/>.setText("<c:get select="$control/@text"/>");
+</c:if>
+<c:if test="$control/@grayed">
+ <c:get select="$control/@name"/>.setGreyed(<c:get select="$control/@grayed"/>);
+</c:if>
+<c:if test="$control/@selection">
+ <c:get select="$control/@name"/>.setSelection(<c:get select="$control/@selection"/>);
+</c:if>
diff --git a/examples/org.eclipse.jet.ec2008.swtgen.codebehind/templates/control/button/swtStyles.jet b/examples/org.eclipse.jet.ec2008.swtgen.codebehind/templates/control/button/swtStyles.jet
new file mode 100644
index 0000000..6eef889
--- /dev/null
+++ b/examples/org.eclipse.jet.ec2008.swtgen.codebehind/templates/control/button/swtStyles.jet
@@ -0,0 +1,17 @@
+<%!
+/* Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. */
+%>
+<%-- button --%>
+ SWT.<c:get select="$control/@style"/>
+<c:if test="$control/@border = 'true'">
+ |SWT.BORDER
+</c:if>
+<c:if test="$control/@flat = 'true'">
+ |SWT.FLAT
+</c:if>
+<c:if test="$control/@alignment">
+ |SWT.<c:get select="$control/@alignment"/>
+</c:if>
+<c:if test="$control/@arrowStyle">
+ |SWT.<c:get select="$control/@arrowStyle"/>
+</c:if>

Back to the top