Package org.xhtmlrenderer.test
Class DelegatingReplacedElementFactory
- java.lang.Object
-
- org.xhtmlrenderer.test.DelegatingReplacedElementFactory
-
- All Implemented Interfaces:
ReplacedElementFactory
public class DelegatingReplacedElementFactory extends Object implements ReplacedElementFactory
- Author:
- patrick
-
-
Constructor Summary
Constructors Constructor Description DelegatingReplacedElementFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReplacer(ElementReplacer replacer)ReplacedElementcreateReplacedElement(LayoutContext context, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight)NOTE: Only block equivalent elements can be replaced.voidremove(Element element)Removes any reference toElemente.voidremoveReplacer(ElementReplacer replacer)voidreset()Instructs theReplacedElementFactoryto discard any cached data (typically because a new page is about to be loaded).voidsetFormSubmissionListener(FormSubmissionListener listener)Identifies the FSL which will be used for callbacks when a form submit action is executed; you can use aDefaultFormSubmissionListenerif 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:ReplacedElementFactoryNOTE: Only block equivalent elements can be replaced.- Specified by:
createReplacedElementin interfaceReplacedElementFactorycssWidth- The CSS width of the element in dots (or-1if width isauto)cssHeight- The CSS height of the element in dots (or-1if the height should be treated asauto)- Returns:
- The
ReplacedElementornullif noReplacedElementapplies
-
reset
public void reset()
Description copied from interface:ReplacedElementFactoryInstructs theReplacedElementFactoryto discard any cached data (typically because a new page is about to be loaded).- Specified by:
resetin interfaceReplacedElementFactory
-
remove
public void remove(Element element)
Description copied from interface:ReplacedElementFactoryRemoves any reference toElemente.- Specified by:
removein interfaceReplacedElementFactory
-
addReplacer
public void addReplacer(ElementReplacer replacer)
-
removeReplacer
public void removeReplacer(ElementReplacer replacer)
-
setFormSubmissionListener
public void setFormSubmissionListener(FormSubmissionListener listener)
Description copied from interface:ReplacedElementFactoryIdentifies the FSL which will be used for callbacks when a form submit action is executed; you can use aDefaultFormSubmissionListenerif you don't want any action to be taken.- Specified by:
setFormSubmissionListenerin interfaceReplacedElementFactory- Parameters:
listener- the listener instance to receive callbacks on form submission.
-
-