public abstract class AbstractImageDimensionProvider
extends org.apache.wicket.behavior.Behavior
This behavior can be added to Image
components to render width and height attributes in
the markup. The exact way to retrieve the dimension information is left for the subclasses.
Providing dimension information for elements makes page rendering faster.
Modifier and Type | Field and Description |
---|---|
static String |
HEIGHT
"height" standard html img attribute name
|
static String |
WIDTH
"width" standard html img attribute name
|
Constructor and Description |
---|
AbstractImageDimensionProvider() |
Modifier and Type | Method and Description |
---|---|
protected abstract ImageDimension |
getImageDimension(org.apache.wicket.Component component,
org.apache.wicket.markup.ComponentTag tag)
Gets the image dimension.
|
void |
onComponentTag(org.apache.wicket.Component component,
org.apache.wicket.markup.ComponentTag tag) |
public static final String WIDTH
public static final String HEIGHT
protected abstract ImageDimension getImageDimension(org.apache.wicket.Component component, org.apache.wicket.markup.ComponentTag tag)
onComponentTag(Component, ComponentTag)
.component
- "the component that renders this tag currently"tag
- "the tag that is rendered"public void onComponentTag(org.apache.wicket.Component component, org.apache.wicket.markup.ComponentTag tag)
onComponentTag
in class org.apache.wicket.behavior.Behavior
Copyright © 2015. All rights reserved.