|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.cc.framework.ui.AbstractImageMap
Abstract ImageMap implementation
| Nested Class Summary | |
static class |
AbstractImageMap.ImageMapping
A ImageMapping maps a regular expression to an image |
| Field Summary | |
private java.lang.String |
base
The base directory for all the images |
private java.util.Vector |
mappings
Collection with all images in the image map in the format Tupel: (regular expression, image) |
private java.lang.String |
name
Name of the ImageMap |
private RunAt |
runat
Specifies if the image map should be exposed as a java script object to the client browser (RunAt.CLIENT) |
private static long |
serialVersionUID
Serial Version UID |
| Constructor Summary | |
AbstractImageMap()
Constructor for ImageMap |
|
| Method Summary | |
void |
addImage(java.lang.String rule,
ImageModel image)
Adds an image to the image map |
java.lang.String |
getBase()
Returns the base directory for all the images |
java.util.Collection |
getMappings()
Deprecated. use method iterator() |
java.lang.String |
getName()
Returns the name for this ImageMap |
RunAt |
getRunat()
Returns the RunAt attribute |
java.util.Iterator |
iterator()
Returns an iterator for ImageMapping Objects |
ImageModel |
mapValueToImage(java.lang.Object value)
Returns an image for an expression |
protected abstract boolean |
match(AbstractImageMap.ImageMapping mapping,
java.lang.Object value)
A derived class has to implement this abstract method and implement a strategy how values are mapped on Image Mappings. |
void |
setBase(java.lang.String base)
Sets the base directory for all the images |
void |
setName(java.lang.String name)
Sets the name for this ImageMap |
void |
setRunat(RunAt runat)
Sets the RunAt attribute |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final long serialVersionUID
private java.util.Vector mappings
private java.lang.String name
private java.lang.String base
private RunAt runat
| Constructor Detail |
public AbstractImageMap()
| Method Detail |
public void addImage(java.lang.String rule,
ImageModel image)
rule - A regular expressionimage - The imageImageModelpublic java.util.Collection getMappings()
public java.util.Iterator iterator()
public ImageModel mapValueToImage(java.lang.Object value)
mapValueToImage in interface ImageMapvalue - Object
protected abstract boolean match(AbstractImageMap.ImageMapping mapping,
java.lang.Object value)
throws java.lang.Exception
mapping - The Image Mappingvalue - the key
when the mapping matches the given key
- Throws:
java.lang.Exception - Is thrown when an error occurspublic java.lang.String getBase()
getBase in interface ImageMappublic java.lang.String getName()
getName in interface ImageMappublic RunAt getRunat()
getRunat in interface ImageMappublic void setBase(java.lang.String base)
base - The base directorypublic void setName(java.lang.String name)
name - The name for the ImageMappublic void setRunat(RunAt runat)
runat - The RunAt attribute
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||