Package org.xhtmlrenderer.test
Class DelegatingReplacedElementFactory
- java.lang.Object
-
- org.xhtmlrenderer.test.DelegatingReplacedElementFactory
-
- All Implemented Interfaces:
ReplacedElementFactory
public class DelegatingReplacedElementFactory extends java.lang.Object implements ReplacedElementFactory
- Author:
- patrick
-
-
Constructor Summary
Constructors Constructor Description DelegatingReplacedElementFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementReplacer
addReplacer(ElementReplacer replacer)
ReplacedElement
createReplacedElement(LayoutContext context, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight)
NOTE: Only block equivalent elements can be replaced.void
remove(org.w3c.dom.Element element)
Removes any reference toElement
e
.void
removeReplacer(ElementReplacer replacer)
void
reset()
Instructs theReplacedElementFactory
to discard any cached data (typically because a new page is about to be loaded).void
setFormSubmissionListener(FormSubmissionListener listener)
Identifies the FSL which will be used for callbacks when a form submit action is executed; you can use aDefaultFormSubmissionListener
if you don't want any action to be taken.
-
-
-
Method Detail
-
createReplacedElement
public ReplacedElement createReplacedElement(LayoutContext context, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight)
Description copied from interface:ReplacedElementFactory
NOTE: Only block equivalent elements can be replaced.- Specified by:
createReplacedElement
in interfaceReplacedElementFactory
cssWidth
- The CSS width of the element in dots (or-1
if width isauto
)cssHeight
- The CSS height of the element in dots (or-1
if the height should be treated asauto
)- Returns:
- The
ReplacedElement
ornull
if noReplacedElement
applies
-
reset
public void reset()
Description copied from interface:ReplacedElementFactory
Instructs theReplacedElementFactory
to discard any cached data (typically because a new page is about to be loaded).- Specified by:
reset
in interfaceReplacedElementFactory
-
remove
public void remove(org.w3c.dom.Element element)
Description copied from interface:ReplacedElementFactory
Removes any reference toElement
e
.- Specified by:
remove
in interfaceReplacedElementFactory
-
addReplacer
public ElementReplacer addReplacer(ElementReplacer replacer)
-
removeReplacer
public void removeReplacer(ElementReplacer replacer)
-
setFormSubmissionListener
public void setFormSubmissionListener(FormSubmissionListener listener)
Description copied from interface:ReplacedElementFactory
Identifies the FSL which will be used for callbacks when a form submit action is executed; you can use aDefaultFormSubmissionListener
if you don't want any action to be taken.- Specified by:
setFormSubmissionListener
in interfaceReplacedElementFactory
- Parameters:
listener
- the listener instance to receive callbacks on form submission.
-
-