aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-extensions
diff options
context:
space:
mode:
authorJana Fabrikova <[email protected]>2013-05-02 11:16:36 +0200
committerJana Fabrikova <[email protected]>2013-05-02 11:16:36 +0200
commit9beec9281b15401fff46cbc9c86b3c6ceb16fd2c (patch)
tree6a291120c87fbc12810724cf50715e13ca7fcda0 /tests/test-extensions
parent7e9ddc51fd10a68aff93eee5cd7173992bec1522 (diff)
modifying makefile for awtframework default icon
Diffstat (limited to 'tests/test-extensions')
-rw-r--r--tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java10
-rw-r--r--tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java11
-rw-r--r--tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/marker.pngbin0 -> 180 bytes
3 files changed, 14 insertions, 7 deletions
diff --git a/tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java b/tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java
index faced3a..e33d35c 100644
--- a/tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java
+++ b/tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java
@@ -164,13 +164,9 @@ public abstract class AWTHelper extends RulesFolowingClosingListener implements
String test_server_dir_path = System.getProperty("test.server.dir");
- try {
- this.marker = ImageIO.read(new File(test_server_dir_path + "/marker.png"));
- this.markerPosition = new Point(0,0);
- this.markerGiven = true;
- } catch (IOException e) {
- throw new RuntimeException("AWTHelper could not read marker.png.",e);
- }
+ this.marker = ComponentFinder.defaultIcon;
+ this.markerPosition = new Point(0,0);
+ this.markerGiven = true;
this.appletWidth = appletWidth;
this.appletHeight = appletHeight;
diff --git a/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java b/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java
index 5d3a25e..95e0e37 100644
--- a/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java
+++ b/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java
@@ -42,8 +42,19 @@ import java.awt.Color;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
+import java.io.IOException;
+import javax.imageio.ImageIO;
public class ComponentFinder {
+ public static final BufferedImage defaultIcon;
+
+ static{
+ try {
+ defaultIcon = ImageIO.read(ComponentFinder.class.getClassLoader().getResource("net/sourceforge/jnlp/awt/imagesearch/marker.png"));
+ } catch (IOException e) {
+ throw new RuntimeException("ComponentFinder - problem initializing defaultIcon",e);
+ }
+ }
/**
* method findColoredRectangle determines coordinates of a rectangle colored
diff --git a/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/marker.png b/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/marker.png
new file mode 100644
index 0000000..4392bea
--- /dev/null
+++ b/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/marker.png
Binary files differ