summaryrefslogtreecommitdiffstats
path: root/examples/org.eclipse.swt.examples.paint
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.swt.examples.paint')
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/.classpath7
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/.cvsignore1
-rw-r--r--examples/org.eclipse.swt.examples.paint/.project28
-rw-r--r--examples/org.eclipse.swt.examples.paint/about.html22
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/build.properties20
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/doc-html/swt_paint_ex.html38
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/paint_example.gifbin217 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/plugin.properties31
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/plugin.xml61
-rw-r--r--examples/org.eclipse.swt.examples.paint/src/import.properties14
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintPlugin.java41
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintView.java118
12 files changed, 0 insertions, 381 deletions
diff --git a/examples/org.eclipse.swt.examples.paint/.classpath b/examples/org.eclipse.swt.examples.paint/.classpath
deleted file mode 100755
index 065ac06e19..0000000000
--- a/examples/org.eclipse.swt.examples.paint/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.swt.examples.paint/.cvsignore b/examples/org.eclipse.swt.examples.paint/.cvsignore
deleted file mode 100755
index c5e82d7458..0000000000
--- a/examples/org.eclipse.swt.examples.paint/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.paint/.project b/examples/org.eclipse.swt.examples.paint/.project
deleted file mode 100644
index 8d39af0053..0000000000
--- a/examples/org.eclipse.swt.examples.paint/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.examples.paint</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.examples.paint/about.html b/examples/org.eclipse.swt.examples.paint/about.html
deleted file mode 100644
index 6f6b96c4c8..0000000000
--- a/examples/org.eclipse.swt.examples.paint/about.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!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>February 24, 2005</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation 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
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.paint/build.properties b/examples/org.eclipse.swt.examples.paint/build.properties
deleted file mode 100755
index ef0ae0ef26..0000000000
--- a/examples/org.eclipse.swt.examples.paint/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# 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 Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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.paint.jar = src/
diff --git a/examples/org.eclipse.swt.examples.paint/doc-html/swt_paint_ex.html b/examples/org.eclipse.swt.examples.paint/doc-html/swt_paint_ex.html
deleted file mode 100755
index e48e7ce5c8..0000000000
--- a/examples/org.eclipse.swt.examples.paint/doc-html/swt_paint_ex.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Paint Tool</title>
-</head>
-<body>
-
-<h2>SWT example - Paint Tool</h2>
-
-<p>
-This example demonstrates the use of SWT graphics operations in the form of a
-rudimentary bitmap painting program. The Paint Tool implementation also
-demonstrates a mechanism for managing timed GUI operations in the background
-that are triggered by user input.
-</p>
-<p>
-Select a tool with which to draw in the drawing area. There are a number of tools
-to choose from on the toolbar. To change the color selection, click on a color in the
-palette below the drawing area; left-click to set the foreground color, right-click to set the
-background color.
-</p>
-
-<h3>Running the example</h3>
-
-<p>
-From Eclipse's <strong>Window</strong> menu select <strong>Show View</strong> &gt; <strong>Other</strong>.
-In the <strong>Show View</strong> dialog, expand <strong>SWT Examples</strong> and select
-the view named <strong>Paint</strong>. A view containing the paint program will appear.
-</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>Paint</strong> item from the <strong>Workbench Views</strong> category and click <strong>Run</strong>.
-</p>
-
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.paint/icons/paint_example.gif b/examples/org.eclipse.swt.examples.paint/icons/paint_example.gif
deleted file mode 100755
index d945dde53b..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/paint_example.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/plugin.properties b/examples/org.eclipse.swt.examples.paint/plugin.properties
deleted file mode 100755
index ed78759efc..0000000000
--- a/examples/org.eclipse.swt.examples.paint/plugin.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName = Eclipse.org
-plugin.SWTPaintExample.name = SWT Paint Example Plugin
-category.SWTExamples.name = SWT Examples
-view.PaintExample.name = Paint
-
-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.PaintExample.name = Paint
-launchitem.PaintExample.description = \
- This example demonstrates the use of SWT graphics operations in the form of a \
- rudimentary bitmap painting program. The Airbrush Tool implementation also \
- demonstrates a mechanism for managing timed GUI operations in the background \
- that are triggered by user input.\n\n\
- Select a tool with which to draw in the drawing area. There are a number of tools \
- to choose from on the toolbar. To change the color selection, click on a color in the \
- palette below the drawing area: left-click for the foreground color, right-click for the \
- background color.\n\n\
- Uses SWT's GC and FontDialog, and JFace's InputDialog and action set support.
diff --git a/examples/org.eclipse.swt.examples.paint/plugin.xml b/examples/org.eclipse.swt.examples.paint/plugin.xml
deleted file mode 100755
index a31c882828..0000000000
--- a/examples/org.eclipse.swt.examples.paint/plugin.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.swt.examples.paint"
- name="%plugin.SWTPaintExample.name"
- version="3.1.0"
- provider-name="%providerName"
- class="org.eclipse.swt.examples.paint.PaintPlugin">
-
-<!-- Runtime -->
- <runtime>
- <library name="paint.jar">
- </library>
- </runtime>
-<!-- Required plugins -->
- <requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <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.PaintExample.name"
- icon="icons/paint_example.gif"
- category="org.eclipse.swt.examples.category"
- class="org.eclipse.swt.examples.paint.PaintView"
- id="org.eclipse.swt.examples.paint.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.PaintExample.name"
- icon="icons/paint_example.gif"
- description="%launchitem.PaintExample.description"
- category="org.eclipse.swt.examples.launchViewCategory"
- id="org.eclipse.swt.examples.paint.viewlauncher">
- <view
- viewId="org.eclipse.swt.examples.paint.view">
- </view>
- </item>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.swt.examples.paint/src/import.properties b/examples/org.eclipse.swt.examples.paint/src/import.properties
deleted file mode 100644
index 8241dacfa2..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/import.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# 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 Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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.paint/src/org/eclipse/swt/examples/paint/PaintPlugin.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintPlugin.java
deleted file mode 100755
index 19437fca0e..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintPlugin.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.plugin.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class PaintPlugin extends AbstractUIPlugin {
- private static PaintPlugin plugin;
-
- /**
- * Constructs the Paint plugin.
- */
- public PaintPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Log an error to the ILog for this plugin
- *
- * @param message the localized error message text
- * @param exception the associated exception, or null
- */
- public static void logError(String message, Throwable exception) {
- plugin.getLog().log(
- new Status(IStatus.ERROR, plugin.getBundle().getSymbolicName(), 0, message, exception));
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintView.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintView.java
deleted file mode 100755
index 1250f49f36..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintView.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.resource.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.*;
-
-/**
- * The view for the paint application.
- * All rendering happens inside the area created by createPartControl().
- *
- * @see ViewPart
- */
-public class PaintView extends ViewPart {
- PaintExample instance = null;
-
- /**
- * Constructs a Paint view.
- */
- public PaintView() {
- }
-
- /**
- * Creates the example.
- *
- * @see ViewPart#createPartControl
- */
- public void createPartControl(Composite parent) {
- instance = new PaintExample(parent);
- instance.createGUI(parent);
-
- /*** Add toolbar contributions ***/
- final IActionBars actionBars = getViewSite().getActionBars();
- IToolBarManager toolbarManager = actionBars.getToolBarManager();
- Tool tools[] = PaintExample.tools;
- String group = tools[0].group;
- toolbarManager.add(new GroupMarker(group));
- for (int i = 0; i < tools.length; i++) {
- Tool tool = tools[i];
- if (!tool.group.equals(group)) {
- toolbarManager.add(new Separator());
- toolbarManager.add(new GroupMarker(tool.group));
- }
- group = tool.group;
- PaintAction action = new PaintAction(tool);
- toolbarManager.appendToGroup(group, action);
- if (i == PaintExample.Default_tool || i == PaintExample.Default_fill || i == PaintExample.Default_linestyle) {
- action.setChecked(true);
- }
- }
- actionBars.updateActionBars();
-
- instance.setDefaults();
- }
-
- /**
- * Called when the View is to be disposed
- */
- public void dispose() {
- instance.dispose();
- instance = null;
- super.dispose();
- }
-
- /**
- * Returns the Display.
- *
- * @return the display we're using
- */
- public Display getDisplay() {
- return instance.getDisplay();
- }
-
- /**
- * Called when we must grab focus.
- *
- * @see org.eclipse.ui.part.ViewPart#setFocus
- */
- public void setFocus() {
- instance.setFocus();
- }
-
- /**
- * Action set glue.
- */
- class PaintAction extends Action {
- private int style;
- private Runnable action;
- public PaintAction(Tool tool) {
- super();
- String id = tool.group + '.' + tool.name;
- setId(id);
- style = tool.type == SWT.RADIO ? IAction.AS_RADIO_BUTTON : IAction.AS_PUSH_BUTTON;
- action = tool.action;
- setText(PaintExample.getResourceString(id + ".label"));
- setToolTipText(PaintExample.getResourceString(id + ".tooltip"));
- setDescription(PaintExample.getResourceString(id + ".description"));
- setImageDescriptor(ImageDescriptor.createFromFile(
- PaintExample.class,
- PaintExample.getResourceString(id + ".image")));
- }
- public int getStyle() { return style; }
- public void run() { action.run(); }
- }
-} \ No newline at end of file