class: ImageView
authorClaus Gittinger <cg@exept.de>
Thu, 27 Mar 2014 15:11:21 +0100
changeset 4558 699f6a043e51
parent 4557 a4c9011bdbaf
child 4559 9a51a38177e4
class: ImageView added: #openOnImage:title: comment/format in: #openOnFile: #openOnFile:title: changed: #openOnImage:
ImageView.st
--- a/ImageView.st	Tue Mar 25 19:02:50 2014 +0100
+++ b/ImageView.st	Thu Mar 27 15:11:21 2014 +0100
@@ -180,8 +180,8 @@
     ^ imageView
 
     "
-     ImageView openOn:'bitmaps/gifImages/garfield.gif'
-     ImageView openOn:'bitmaps/xpmBitmaps/misc_icons/BOOK.xpm'
+     ImageView openOnFile:'../../goodies/bitmaps/gifImages/garfield.gif'
+     ImageView openOnFile:'../../goodies/bitmaps/xpmBitmaps/misc_icons/BOOK.xpm'
     "
 
     "Modified: / 31.10.1997 / 16:17:52 / cg"
@@ -190,7 +190,7 @@
 openOnImage:anImage
     "startup an image viewer on an image"
 
-    |top v imageView icnW icnH iconView magX magY mag lbl imgWidth imgHeight|
+    |lbl|
 
     anImage isImage ifTrue:[
         lbl := anImage fileName ? 'an Image'
@@ -201,7 +201,20 @@
             lbl := 'a Form'
         ]
     ].
-    top := StandardSystemView label:lbl.
+    ^ self openOnImage:anImage title:lbl
+
+    "
+     ImageView openOnImage:(Image fromFile:'bitmaps/gifImages/garfield.gif') title:'garfield'
+     ImageView openOnImage:(Image fromFile:'../../libtool/bitmaps/SBrowser.xbm') title:'old browser icon'
+    "
+!
+
+openOnImage:anImage title:aString
+    "startup an image viewer on an image"
+
+    |top v imageView icnW icnH iconView magX magY mag imgWidth imgHeight|
+
+    top := StandardSystemView label:aString.
 
     v := HVScrollableView for:self in:top.
     v origin:0@0 extent:1.0@1.0. 
@@ -262,8 +275,8 @@
     ^ imageView
 
     "
-     ImageView openOnImage:(Image fromFile:'bitmaps/gifImages/garfield.gif')
-     ImageView openOnImage:(Image fromFile:'bitmaps/SBrowser.xbm')
+     ImageView openOnImage:(Image fromFile:'../../goodies/bitmaps/gifImages/garfield.gif') title:'garfield'
+     ImageView openOnImage:(Image fromFile:'../../libtool/bitmaps/SBrowser.xbm')
     "
 
     "Modified: / 01-06-2010 / 18:31:14 / cg"
@@ -697,11 +710,11 @@
 !ImageView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ImageView.st,v 1.80 2013-07-05 10:03:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ImageView.st,v 1.81 2014-03-27 14:11:21 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/ImageView.st,v 1.80 2013-07-05 10:03:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ImageView.st,v 1.81 2014-03-27 14:11:21 cg Exp $'
 ! !