Author: mgrigorov
Date: Fri Sep 24 18:30:52 2010
New Revision: 1001012
URL: http://svn.apache.org/viewvc?rev=1001012&view=rev
Log:
WICKET-1936
Update 'linkomatic' example to use the new ClientSideImageMap instead of
ImageMap.
Added:
wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/ImageMap.gif
- copied unchanged from r1000998,
wicket/branches/wicket-1.4.x/wicket-examples/src/main/webapp/ImageMap.gif
Removed:
wicket/branches/wicket-1.4.x/wicket-examples/src/main/webapp/ImageMap.gif
Modified:
wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.html
wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java
Modified:
wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.html
URL:
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.html?rev=1001012&r1=1001011&r2=1001012&view=diff
==============================================================================
---
wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.html
(original)
+++
wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.html
Fri Sep 24 18:30:52 2010
@@ -28,7 +28,8 @@
</p><p>
<a wicket:id = "bookDetailsLink2">Click this PageLink for BookDetails on
Inside The Matrix</a>
</p><p>
- <img border = "0" wicket:id = "imageMap" src = "ImageMap.gif">
+ <map wicket:id = "imageMap"></map>
+ <img border="0" wicket:id="imageForMap" src = "ImageMap.gif"/>
</p><p>
<a wicket:id = "popupLink">Click this link for a popup</a>
</p><p>
Modified:
wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java
URL:
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java?rev=1001012&r1=1001011&r2=1001012&view=diff
==============================================================================
---
wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java
(original)
+++
wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java
Fri Sep 24 18:30:52 2010
@@ -24,10 +24,11 @@ import org.apache.wicket.examples.Wicket
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.ClientSideImageMap;
import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.markup.html.link.IPageLink;
-import org.apache.wicket.markup.html.link.ImageMap;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.link.PageLink;
import org.apache.wicket.markup.html.link.PopupSettings;
@@ -121,12 +122,14 @@ public class Home extends WicketExampleP
}));
// Image map link example
- add(new ImageMap("imageMap").addRectangleLink(0, 0, 100, 100,
- new BookmarkablePageLink("page1",
Page1.class)).addCircleLink(160, 50, 35,
- new BookmarkablePageLink("page2",
Page2.class)).addPolygonLink(
- new int[] { 212, 79, 241, 4, 279, 54, 212, 79 },
- new BookmarkablePageLink("page3", Page3.class)).add(
- RelativePathPrefixHandler.RELATIVE_PATH_BEHAVIOR));
+ Image imageForMap = new Image("imageForMap");
+ add(imageForMap);
+ add(new ClientSideImageMap("imageMap",
imageForMap).addRectangleArea(
+ new BookmarkablePageLink<Page1>("page1", Page1.class),
0, 0, 100, 100)
+ .addCircleArea(new BookmarkablePageLink<Page2>("page2",
Page2.class), 160, 50, 35)
+ .addPolygonArea(new
BookmarkablePageLink<Page3>("page3", Page3.class),
+ new int[] { 212, 79, 241, 4, 279, 54, 212, 79 })
+ .add(RelativePathPrefixHandler.RELATIVE_PATH_BEHAVIOR));
// Popup example
PopupSettings popupSettings = new
PopupSettings(PageMap.forName("popuppagemap")).setHeight(