Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Cornu2003-12-02 22:20:53 +0000
committerChristophe Cornu2003-12-02 22:20:53 +0000
commitb0b57ceb1ee29d932629e5455e7648ddbb21e649 (patch)
tree2246db55e7df5d93d8d04204100969c023536896 /examples/org.eclipse.swt.examples.browser
parent05f365cc38a97e9d443c0b061df8b7c5c21a9770 (diff)
downloadeclipse.platform.swt-b0b57ceb1ee29d932629e5455e7648ddbb21e649.tar.gz
eclipse.platform.swt-b0b57ceb1ee29d932629e5455e7648ddbb21e649.tar.xz
eclipse.platform.swt-b0b57ceb1ee29d932629e5455e7648ddbb21e649.zip
first version of the SWT Browser example plugin
Diffstat (limited to 'examples/org.eclipse.swt.examples.browser')
-rw-r--r--examples/org.eclipse.swt.examples.browser/.classpath11
-rw-r--r--examples/org.eclipse.swt.examples.browser/.project20
-rw-r--r--examples/org.eclipse.swt.examples.browser/about.html30
-rw-r--r--examples/org.eclipse.swt.examples.browser/build.properties20
-rw-r--r--examples/org.eclipse.swt.examples.browser/doc-html/hglegal.htm14
-rw-r--r--examples/org.eclipse.swt.examples.browser/doc-html/ngibmcpy.gifbin0 -> 1101 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser/doc-html/swt_browser_ex.html33
-rw-r--r--examples/org.eclipse.swt.examples.browser/icons/browser_example.gifbin0 -> 111 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser/plugin.properties26
-rw-r--r--examples/org.eclipse.swt.examples.browser/plugin.xml56
-rw-r--r--examples/org.eclipse.swt.examples.browser/src/import.properties14
-rw-r--r--examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserPlugin.java34
-rw-r--r--examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserView.java53
13 files changed, 311 insertions, 0 deletions
diff --git a/examples/org.eclipse.swt.examples.browser/.classpath b/examples/org.eclipse.swt.examples.browser/.classpath
new file mode 100644
index 0000000000..39062f4cc0
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="var" path="JRE_LIB"/>
+ <classpathentry kind="src" path="/org.eclipse.swt.examples"/>
+ <classpathentry kind="src" path="/org.eclipse.swt"/>
+ <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.runtime_3.0.0/runtime.jar"/>
+ <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.workbench_3.0.0/workbench.jar"/>
+ <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jface_3.0.0/jface.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.swt.examples.browser/.project b/examples/org.eclipse.swt.examples.browser/.project
new file mode 100644
index 0000000000..25919d4052
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/.project
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.swt.examples.browser</name>
+ <comment></comment>
+ <projects>
+ <project>org.eclipse.core.runtime</project>
+ <project>org.eclipse.swt</project>
+ <project>org.eclipse.swt.examples</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/org.eclipse.swt.examples.browser/about.html b/examples/org.eclipse.swt.examples.browser/about.html
new file mode 100644
index 0000000000..9db411aab9
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/about.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>20th June, 2002</p>
+<h3>License</h3>
+<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
+For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
+
+<h3>Contributions</h3>
+
+<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
+made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
+Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
+
+<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
+other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
+host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
+to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
+providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
+the CPL.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.browser/build.properties b/examples/org.eclipse.swt.examples.browser/build.properties
new file mode 100644
index 0000000000..818e48379c
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2000, 2003 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are 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
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = doc-html/,\
+ icons/,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html,\
+ *.jar
+
+src.includes = about.html
+
+source.browserexample.jar = src/
diff --git a/examples/org.eclipse.swt.examples.browser/doc-html/hglegal.htm b/examples/org.eclipse.swt.examples.browser/doc-html/hglegal.htm
new file mode 100644
index 0000000000..f5871b79e0
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/doc-html/hglegal.htm
@@ -0,0 +1,14 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <LINK REL="stylesheet" HREF="../../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+ <title>Legal Notices</title>
+</head>
+<body>
+
+<h3>
+<a NAME="Notices"></a>Notices</h3>
+(c) Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved.
+</body>
+</html>
diff --git a/examples/org.eclipse.swt.examples.browser/doc-html/ngibmcpy.gif b/examples/org.eclipse.swt.examples.browser/doc-html/ngibmcpy.gif
new file mode 100644
index 0000000000..c786e43e1f
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/doc-html/ngibmcpy.gif
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser/doc-html/swt_browser_ex.html b/examples/org.eclipse.swt.examples.browser/doc-html/swt_browser_ex.html
new file mode 100644
index 0000000000..7b01f2fcd5
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/doc-html/swt_browser_ex.html
@@ -0,0 +1,33 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>SWT - Controls Overview</title>
+</head>
+<body>
+
+<h2>SWT example - Browser</h2>
+
+<p>
+The Browser Example is a simple demonstration of the SWT Browser widget.
+It consists of a composite containing a Browser widget to render HTML and some
+additional widgets to implement actions commonly found on browsers (toolbar
+with back, forward, refresh and stop buttons, status bar etc.).
+</p>
+
+<h3>Running the example</h3>
+<p>
+Follow the <a href="../../org.eclipse.swt.examples/doc-html/swt_manual_setup.html">SWT standalone examples setup</a>
+instructions to install and run the example from your workspace.
+</p>
+<p>
+The "Main" class is <code>org.eclipse.swt.examples.browserexample.BrowserExample</code>.
+</p>
+<p>
+This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
+Select the <strong>Browser</strong> item from the <strong>Workbench Views</strong> category and click <strong>Run</strong>.
+</p>
+
+<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2003. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
+</body>
+</html>
diff --git a/examples/org.eclipse.swt.examples.browser/icons/browser_example.gif b/examples/org.eclipse.swt.examples.browser/icons/browser_example.gif
new file mode 100644
index 0000000000..cbdee97066
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/icons/browser_example.gif
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser/plugin.properties b/examples/org.eclipse.swt.examples.browser/plugin.properties
new file mode 100644
index 0000000000..971bb84434
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/plugin.properties
@@ -0,0 +1,26 @@
+###############################################################################
+# Copyright (c) 2000, 2003 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are 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
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+providerName = Eclipse.org
+plugin.SWTBrowserExample.name = SWT Browser Example Plugin
+category.SWTExamples.name = SWT Examples
+view.BrowserExample.name = SWT Browser
+
+launchcategory.SWTViewExamples.name = Workbench Views
+launchcategory.SWTViewExamples.description = \
+ A collection of Standard Widget Toolkit examples that run as Views inside the Workbench. \
+ These examples will create a new View in the current Perspective.
+
+launchitem.BrowserExample.name = Browser
+launchitem.BrowserExample.description = \
+ This example is a simple demonstration of the SWT Browser widget.\n\n\
+ It consists of a composite containing a Browser widget to render HTML. \
+ Additional widgets allow the user to perform typical browser actions (for example, navigate to a particular URL, go back, forward, refresh and stop).
+
diff --git a/examples/org.eclipse.swt.examples.browser/plugin.xml b/examples/org.eclipse.swt.examples.browser/plugin.xml
new file mode 100644
index 0000000000..108110e4f2
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/plugin.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin
+ id="org.eclipse.swt.examples.browserexample"
+ name="%plugin.SWTBrowserExample.name"
+ version="3.0.0"
+ provider-name="%providerName"
+ class="org.eclipse.swt.examples.browserexample.BrowserPlugin">
+
+<!-- Runtime -->
+ <runtime>
+ <library name="browserexample.jar">
+ <packages prefixes="org.eclipse.swt.examples.browserexample"/>
+ </library>
+ </runtime>
+<!-- Required plugins -->
+ <requires>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.swt"/>
+ <import plugin="org.eclipse.swt.examples"/>
+ </requires>
+
+
+<!-- Extension points -->
+<!-- Extensions -->
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ name="%view.BrowserExample.name"
+ icon="icons/browser_example.gif"
+ category="org.eclipse.swt.examples.category"
+ class="org.eclipse.swt.examples.browserexample.BrowserView"
+ id="org.eclipse.swt.examples.browserexample.view">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.swt.examples.launcher.launchItems">
+ <category
+ name="%launchcategory.SWTViewExamples.name"
+ description="%launchcategory.SWTViewExamples.description"
+ id="org.eclipse.swt.examples.launchViewCategory">
+ </category>
+ <item
+ name="%launchitem.BrowserExample.name"
+ icon="icons/browser_example.gif"
+ category="org.eclipse.swt.examples.launchViewCategory"
+ description="%launchitem.BrowserExample.description"
+ id="org.eclipse.swt.examples.browserexample.viewlauncher">
+ <view
+ viewId="org.eclipse.swt.examples.browserexample.view">
+ </view>
+ </item>
+ </extension>
+
+</plugin>
diff --git a/examples/org.eclipse.swt.examples.browser/src/import.properties b/examples/org.eclipse.swt.examples.browser/src/import.properties
new file mode 100644
index 0000000000..58344f0d3e
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/src/import.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2000, 2003 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are 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
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+# Persist project settings for later import
+natures = org.eclipse.jdt.core.javanature; org.eclipse.pde.PluginNature
+builders = org.eclipse.jdt.core.javabuilder; org.eclipse.pde.ManifestBuilder; org.eclipse.pde.SchemaBuilder
+var.ECLIPSE_PLUGINS = <<ECLIPSE_PLUGINS>>
diff --git a/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserPlugin.java b/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserPlugin.java
new file mode 100644
index 0000000000..5e8245566c
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserPlugin.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.examples.browserexample;
+
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.ui.plugin.*;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class BrowserPlugin extends AbstractUIPlugin {
+ /**
+ * The constructor.
+ */
+ public BrowserPlugin(IPluginDescriptor descriptor) {
+ super(descriptor);
+ }
+
+ /**
+ * Clean up
+ */
+ public void shutdown() throws CoreException {
+ super.shutdown();
+ }
+}
diff --git a/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserView.java b/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserView.java
new file mode 100644
index 0000000000..84337cb847
--- /dev/null
+++ b/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserView.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.examples.browserexample;
+
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.part.*;
+
+/**
+ * <code>BrowserView</code> is a simple demonstration
+ * of the SWT Browser widget. 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 BrowserView extends ViewPart {
+ BrowserExample instance = null;
+
+ /**
+ * Create the example
+ *
+ * @see ViewPart#createPartControl
+ */
+ public void createPartControl(Composite frame) {
+ instance = new BrowserExample(frame);
+ }
+
+ /**
+ * Called when we must grab focus.
+ *
+ * @see org.eclipse.ui.part.ViewPart#setFocus
+ */
+ public void setFocus() {
+ instance.setFocus();
+ }
+
+ /**
+ * Called when the View is to be disposed
+ */
+ public void dispose() {
+ instance.dispose();
+ instance = null;
+ super.dispose();
+ }
+}

Back to the top