|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup
org.apache.wicket.markup.html.panel.Panel
org.apache.wicket.markup.html.link.ClientSideImageMap
public class ClientSideImageMap
A client-side image map implementation which allows you to "attach" the map to any existing Image
component.
Field Summary |
---|
Fields inherited from class org.apache.wicket.markup.html.panel.Panel |
---|
PANEL |
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
ClientSideImageMap(java.lang.String id,
Image image)
Constructs a client-side image map which is "attached" to the given Image component. |
Method Summary | |
---|---|
ClientSideImageMap |
addCircleArea(AbstractLink link,
int x,
int y,
int radius)
Adds a circle-shaped area centered at (x,y) with radius r. |
ClientSideImageMap |
addPolygonArea(AbstractLink link,
int... coordinates)
Adds a polygon-shaped area defined by coordinates. |
ClientSideImageMap |
addRectangleArea(AbstractLink link,
int x1,
int y1,
int x2,
int y2)
Adds a rectangular-shaped area. |
ClientSideImageMap |
addShapeArea(AbstractLink link,
java.awt.Shape shape)
Adds an area defined by a shape object. |
java.lang.String |
getCacheKey(MarkupContainer markupContainer,
java.lang.Class<?> aClass)
Provide the markup cache key for the associated Markup resource stream. |
IResourceStream |
getMarkupResourceStream(MarkupContainer markupContainer,
java.lang.Class<?> c)
Create a new markup resource stream for the container. |
Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
---|
getMarkup, onComponentTag, onComponentTagBody |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup |
---|
findMarkupInAssociatedFileHeader, renderHead, renderHeadFromAssociatedMarkupFile |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getWebPage, getWebRequest |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkupStream, getMarkupType, hasAssociatedMarkup, internalAdd, iterator, iterator, onMarkupAttached, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClientSideImageMap(java.lang.String id, Image image)
Image
component.
id
- the component idimage
- the image componentMethod Detail |
---|
public java.lang.String getCacheKey(MarkupContainer markupContainer, java.lang.Class<?> aClass)
IMarkupCacheKeyProvider
getCacheKey
in interface IMarkupCacheKeyProvider
markupContainer
- The MarkupContainer object requesting the markup cache keyaClass
- The container the markup should be associated with
IMarkupResourceStreamProvider
public IResourceStream getMarkupResourceStream(MarkupContainer markupContainer, java.lang.Class<?> c)
IMarkupResourceStreamProvider
Note: usually it will only called once, as the IResourceStream will be cached by MarkupCache.
getMarkupResourceStream
in interface IMarkupResourceStreamProvider
markupContainer
- The MarkupContainer which requests to load the Markup resource streamc
- The container the markup should be associated with
public ClientSideImageMap addCircleArea(AbstractLink link, int x, int y, int radius)
link
- the linkx
- x coordinate of the center of the circley
- y coordinate of centerradius
- the radius
public ClientSideImageMap addPolygonArea(AbstractLink link, int... coordinates)
link
- the linkcoordinates
- the coordinates for the polygon
public ClientSideImageMap addRectangleArea(AbstractLink link, int x1, int y1, int x2, int y2)
link
- the linkx1
- top left xy1
- top left yx2
- bottom right xy2
- bottom right y
public ClientSideImageMap addShapeArea(AbstractLink link, java.awt.Shape shape)
link
- the linkshape
- the shape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |