Package org.xhtmlrenderer.swing
Class SwingReplacedElementFactory
java.lang.Object
org.xhtmlrenderer.swing.SwingReplacedElementFactory
- All Implemented Interfaces:
ReplacedElementFactory
A ReplacedElementFactory where Elements are replaced by Swing components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateReplacedElement
(LayoutContext context, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight) NOTE: Only block equivalent elements can be replaced.void
Removes any reference toElement
e
.void
reset()
Clears out any references to elements or items created by this factory so far.void
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.
-
Constructor Details
-
SwingReplacedElementFactory
public SwingReplacedElementFactory()
-
-
Method Details
-
createReplacedElement
public ReplacedElement createReplacedElement(LayoutContext context, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight) 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()Clears out any references to elements or items created by this factory so far.- Specified by:
reset
in interfaceReplacedElementFactory
-
remove
Description copied from interface:ReplacedElementFactory
Removes any reference toElement
e
.- Specified by:
remove
in interfaceReplacedElementFactory
-
setFormSubmissionListener
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:
fsl
- the listener instance to receive callbacks on form submission.
-