public class SWTReplacedElementFactory extends Object implements ReplacedElementFactory
| Constructor and Description |
|---|
SWTReplacedElementFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
clean()
Dispose missing image if created.
|
ReplacedElement |
createReplacedElement(LayoutContext c,
BlockBox box,
UserAgentCallback uac,
int cssWidth,
int cssHeight) |
protected ReplacedElement |
lookupImageReplacedElement(Element e)
Retrieves a ReplacedElement for an image from cache, or null if not
found.
|
void |
remove(Element e) |
protected ReplacedElement |
replaceImage(UserAgentCallback uac,
LayoutContext context,
Element elem,
int cssWidth,
int cssHeight)
Handles replacement of image elements in the document.
|
void |
reset() |
void |
setFormSubmissionListener(FormSubmissionListener listener) |
protected void |
storeImageReplacedElement(Element e,
ReplacedElement cc)
Adds a ReplacedElement containing an image to a cache of images for quick
lookup.
|
public void clean()
public ReplacedElement createReplacedElement(LayoutContext c, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight)
createReplacedElement in interface ReplacedElementFactoryprotected 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 imageprotected 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 keyedpublic void remove(Element e)
remove in interface ReplacedElementFactorypublic void setFormSubmissionListener(FormSubmissionListener listener)
setFormSubmissionListener in interface ReplacedElementFactorypublic void reset()
reset in interface ReplacedElementFactoryCopyright © 2019. All rights reserved.