Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Cornu2005-01-24 17:22:46 +0000
committerChristophe Cornu2005-01-24 17:22:46 +0000
commit8a4421bac01d74e6b3fd91b38296afc5b9a86e49 (patch)
tree3849c6f1e5694d29af04b1a931d9be7be0ae0601 /bundles/org.eclipse.swt.tools
parentb96b06c10d6754464e0cdd7982d566a638346dca (diff)
downloadeclipse.platform.swt-8a4421bac01d74e6b3fd91b38296afc5b9a86e49.tar.gz
eclipse.platform.swt-8a4421bac01d74e6b3fd91b38296afc5b9a86e49.tar.xz
eclipse.platform.swt-8a4421bac01d74e6b3fd91b38296afc5b9a86e49.zip
deprecated
Diffstat (limited to 'bundles/org.eclipse.swt.tools')
-rw-r--r--bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconTest.java74
1 files changed, 0 insertions, 74 deletions
diff --git a/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconTest.java b/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconTest.java
deleted file mode 100644
index 14cd00ddf6..0000000000
--- a/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 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.tools.internal;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-
-
-public class IconTest {
- static String EXECUTABLE = "d:/eclipse.exe";
- static ImageData[] src, dst, verify;
- public static void main(String[] args) {
- try {
- src = IconExe.loadIcons(EXECUTABLE);
- dst = new ImageData[] {
- new ImageData(IconTest.class.getResourceAsStream("test_16_4.bmp")),
- new ImageData(IconTest.class.getResourceAsStream("test_16_8.bmp")),
- new ImageData(IconTest.class.getResourceAsStream("test_32_4.bmp")),
- new ImageData(IconTest.class.getResourceAsStream("test_32_8.bmp")),
- new ImageData(IconTest.class.getResourceAsStream("test_48_4.bmp")),
- new ImageData(IconTest.class.getResourceAsStream("test_48_8.bmp")),
- };
- int cnt = IconExe.unloadIcons("d:/eclipse.exe", dst);
- if (cnt != dst.length) {
- System.out.println("Error - not all icons were written: "+cnt);
- }
- verify = IconExe.loadIcons("d:/eclipse.exe");
- } catch (Exception e) {
- e.printStackTrace();
- }
- final Display display = new Display();
- Shell shell = new Shell(display);
- shell.addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event e) {
- e.gc.drawString("Source Icons in original exe", 10, 0);
- for (int i = 0; i < src.length; i++) {
- Image img = new Image(display, src[i]);
- e.gc.drawImage(img, 10, i * 50 + 20);
- img.dispose();
- }
- e.gc.drawString("New Icons", 200, 0);
- for (int i = 0; i < dst.length; i++) {
- Image img = new Image(display, dst[i]);
- e.gc.drawImage(img, 200, i * 50 + 20);
- img.dispose();
- }
- e.gc.drawString("Final Icons in modified exe", 400, 0);
- for (int i = 0; i < verify.length; i++) {
- Image img = new Image(display, verify[i]);
- e.gc.drawImage(img, 400, i * 50 + 20);
- img.dispose();
- }
- }
- });
- shell.setText("PR");
- shell.open();
-
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- }
-} \ No newline at end of file

Back to the top