Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2018-11-20 11:06:48 +0000
committerNiraj Modi2018-11-21 09:29:02 +0000
commit50e7940cbc01ad82de4a539622bf6b63e1623529 (patch)
tree79bee106b0eca43da2cc66833e1ecf46abd61d0f
parent99643a409ef9d55f0546836e8e08d96d99dffda6 (diff)
downloadeclipse.platform.swt-50e7940cbc01ad82de4a539622bf6b63e1623529.tar.gz
eclipse.platform.swt-50e7940cbc01ad82de4a539622bf6b63e1623529.tar.xz
eclipse.platform.swt-50e7940cbc01ad82de4a539622bf6b63e1623529.zip
Bug 541356 - [HiDPI] Fix ImageDataProvider and FileDataProvider
implementations in Snippet367 Change-Id: I4735b27a595fb357df48728326172b016024f725 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet367.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet367.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet367.java
index c3769f8769..d808c867fd 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet367.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet367.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2015, 2016 IBM Corporation and others.
+ * Copyright (c) 2015, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -38,22 +38,26 @@ public class Snippet367 {
public static void main (String [] args) {
final ImageFileNameProvider filenameProvider = zoom -> {
switch (zoom) {
+ case 100:
+ return IMAGE_PATH_100;
case 150:
return IMAGE_PATH_150;
case 200:
return IMAGE_PATH_200;
default:
- return IMAGE_PATH_100;
+ return null;
}
};
final ImageDataProvider imageDataProvider = zoom -> {
switch (zoom) {
+ case 100:
+ return new ImageData (IMAGE_PATH_100);
case 150:
return new ImageData (IMAGE_PATH_150);
case 200:
return new ImageData (IMAGE_PATH_200);
default:
- return new ImageData (IMAGE_PATH_100);
+ return null;
}
};

Back to the top