Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2003-03-07 22:58:32 +0000
committerGrant Gayed2003-03-07 22:58:32 +0000
commitf402a70e67234139ca45b4138051ff63f1d11867 (patch)
treecab5a94b1d1c566c3e1b51b1a33607f4fd2a899a /examples/org.eclipse.swt.examples.controls
parent10e89b007d4123860fa03d0b764caa57bd2d8056 (diff)
downloadeclipse.platform.swt-f402a70e67234139ca45b4138051ff63f1d11867.tar.gz
eclipse.platform.swt-f402a70e67234139ca45b4138051ff63f1d11867.tar.xz
eclipse.platform.swt-f402a70e67234139ca45b4138051ff63f1d11867.zip
add custom controls example to view group and example launcher
Diffstat (limited to 'examples/org.eclipse.swt.examples.controls')
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/plugin.properties12
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/plugin.xml17
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlView.java2
-rw-r--r--examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/CustomControlView.java31
4 files changed, 59 insertions, 3 deletions
diff --git a/examples/org.eclipse.swt.examples.controls/plugin.properties b/examples/org.eclipse.swt.examples.controls/plugin.properties
index 0ec4672067..bd59a5b583 100755
--- a/examples/org.eclipse.swt.examples.controls/plugin.properties
+++ b/examples/org.eclipse.swt.examples.controls/plugin.properties
@@ -2,6 +2,7 @@ providerName = Eclipse.org
plugin.SWTControlsExample.name = SWT Controls Example Plugin
category.SWTExamples.name = SWT Examples
view.ControlsExample.name = SWT Controls
+view.CustomControlsExample.name = SWT Custom Controls
launchcategory.SWTViewExamples.name = Workbench Views
launchcategory.SWTViewExamples.description = \
@@ -10,7 +11,14 @@ launchcategory.SWTViewExamples.description = \
launchitem.ControlsExample.name = Controls
launchitem.ControlsExample.description = \
- This example is a simple demonstration of common SWT controls.\n\n\
+ This example is a simple demonstration of native SWT controls.\n\n\
It consists of a tab folder where each tab allows the user \
to interact with a different SWT control. \
- The user can change styles and settings and view how this affects the control. \ No newline at end of file
+ The user can change styles and settings and view how this affects the control.
+
+launchitem.CustomControlsExample.name = Custom Controls
+launchitem.CustomControlsExample.description = \
+ This example is a simple demonstration of custom SWT controls.\n\n\
+ It consists of a tab folder where each tab allows the user \
+ to interact with a different SWT custom control. \
+ The user can change styles and settings and view how this affects the control.
diff --git a/examples/org.eclipse.swt.examples.controls/plugin.xml b/examples/org.eclipse.swt.examples.controls/plugin.xml
index 3b9795ed05..b3ab8e1150 100755
--- a/examples/org.eclipse.swt.examples.controls/plugin.xml
+++ b/examples/org.eclipse.swt.examples.controls/plugin.xml
@@ -33,6 +33,13 @@
class="org.eclipse.swt.examples.controls.ControlView"
id="org.eclipse.swt.examples.controls.view">
</view>
+ <view
+ name="%view.CustomControlsExample.name"
+ icon="icons/controls_example.gif"
+ category="org.eclipse.swt.examples.category"
+ class="org.eclipse.swt.examples.controls.CustomControlView"
+ id="org.eclipse.swt.examples.customcontrols.view">
+ </view>
</extension>
<extension
point="org.eclipse.swt.examples.launcher.launchItems">
@@ -51,6 +58,16 @@
viewId="org.eclipse.swt.examples.controls.view">
</view>
</item>
+ <item
+ name="%launchitem.CustomControlsExample.name"
+ icon="icons/controls_example.gif"
+ description="%launchitem.CustomControlsExample.description"
+ category="org.eclipse.swt.examples.launchViewCategory"
+ id="org.eclipse.swt.examples.customcontrols.viewlauncher">
+ <view
+ viewId="org.eclipse.swt.examples.customcontrols.view">
+ </view>
+ </item>
</extension>
</plugin>
diff --git a/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlView.java b/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlView.java
index 07f5f7a59b..601b185e7f 100755
--- a/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlView.java
+++ b/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlView.java
@@ -13,7 +13,7 @@ import org.eclipse.ui.part.*;
/**
* <code>Controls</code> is a simple demonstration
- * of the controls defined by SWT. It consists of a workbench
+ * of the native controls defined by SWT. It consists of a workbench
* view and tab folder where each tab in the folder allows the
* user to interact with a control.
*
diff --git a/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/CustomControlView.java b/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/CustomControlView.java
new file mode 100644
index 0000000000..f2290b1e7a
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/CustomControlView.java
@@ -0,0 +1,31 @@
+package org.eclipse.swt.examples.controls;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2002.
+ * This file is made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ */
+
+import org.eclipse.swt.examples.controlexample.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * <code>CustomControls</code> is a simple demonstration
+ * of the custom controls defined by SWT. It consists of a workbench
+ * view and tab folder where each tab in the folder allows the
+ * user to interact with a control.
+ *
+ * @see ViewPart
+ */
+public class CustomControlView extends ControlView {
+
+ /**
+ * Create the example
+ *
+ * @see ViewPart#createPartControl
+ */
+ public void createPartControl(Composite frame) {
+ instance = new CustomControlExample(frame);
+ }
+}

Back to the top