|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xhtmlrenderer.test.ElementReplacer
org.xhtmlrenderer.test.SwingImageReplacer
public class SwingImageReplacer
| Constructor Summary | |
|---|---|
SwingImageReplacer()
|
|
| Method Summary | |
|---|---|
boolean |
accept(LayoutContext context,
Element element)
|
void |
clear(Element element)
|
String |
getElementNameMatch()
|
boolean |
isElementNameMatch()
|
protected ReplacedElement |
lookupImageReplacedElement(Element e)
Retrieves a ReplacedElement for an image from cache, or null if not found. |
protected ReplacedElement |
newIrreplaceableImageElement(int cssWidth,
int cssHeight)
Returns a ReplacedElement for some element in the stream which should be replaceable, but is not. |
ReplacedElement |
replace(LayoutContext context,
BlockBox box,
UserAgentCallback uac,
int cssWidth,
int cssHeight)
|
protected ReplacedElement |
replaceImage(UserAgentCallback uac,
LayoutContext context,
Element elem,
int cssWidth,
int cssHeight)
Handles replacement of image elements in the document. |
void |
reset()
|
protected void |
storeImageReplacedElement(Element e,
ReplacedElement cc)
Adds a ReplacedElement containing an image to a cache of images for quick lookup. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SwingImageReplacer()
| Method Detail |
|---|
public boolean isElementNameMatch()
isElementNameMatch in class ElementReplacerpublic String getElementNameMatch()
getElementNameMatch in class ElementReplacer
public boolean accept(LayoutContext context,
Element element)
accept in class ElementReplacer
public ReplacedElement replace(LayoutContext context,
BlockBox box,
UserAgentCallback uac,
int cssWidth,
int cssHeight)
replace in class ElementReplacerpublic void clear(Element element)
clear in class ElementReplacerpublic void reset()
reset in class ElementReplacer
protected ReplacedElement replaceImage(UserAgentCallback uac,
LayoutContext context,
Element elem,
int cssWidth,
int cssHeight)
uac - Used to retrieve images on demand from some source.context - elem - The element with the image referencecssWidth - Target width of the imagecssHeight - Target height of the image @return A ReplacedElement for the image; will not be null.
protected void storeImageReplacedElement(Element e,
ReplacedElement cc)
e - The element under which the image is keyed.cc - The replaced element containing the image, or another ReplacedElement to be used in its place
(like a placeholder if the image can't be loaded).protected ReplacedElement lookupImageReplacedElement(Element e)
e - The element by which the image is keyed
protected ReplacedElement newIrreplaceableImageElement(int cssWidth,
int cssHeight)
cssWidth - Target width for the element.cssHeight - Target height for the element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||