Package com.openhtmltopdf.swing
Class SwingReplacedElement
- java.lang.Object
-
- com.openhtmltopdf.swing.SwingReplacedElement
-
- All Implemented Interfaces:
ReplacedElement
public class SwingReplacedElement extends Object implements ReplacedElement
-
-
Constructor Summary
Constructors Constructor Description SwingReplacedElement(JComponent component)
-
Method Summary
Modifier and Type Method Description voiddetach(LayoutContext c)intgetBaseline()intgetIntrinsicHeight()intgetIntrinsicWidth()JComponentgetJComponent()PointgetLocation()Returns the current location where the element will be rendered on the canvasbooleanhasBaseline()booleanisRequiresInteractivePaint()voidsetIntrinsicSize(Dimension intrinsicSize)voidsetLocation(int x, int y)Assigns the new locations where the element will be rendered.
-
-
-
Constructor Detail
-
SwingReplacedElement
public SwingReplacedElement(JComponent component)
-
-
Method Detail
-
getJComponent
public JComponent getJComponent()
-
setIntrinsicSize
public void setIntrinsicSize(Dimension intrinsicSize)
-
getIntrinsicHeight
public int getIntrinsicHeight()
- Specified by:
getIntrinsicHeightin interfaceReplacedElement
-
getIntrinsicWidth
public int getIntrinsicWidth()
- Specified by:
getIntrinsicWidthin interfaceReplacedElement
-
setLocation
public void setLocation(int x, int y)Description copied from interface:ReplacedElementAssigns the new locations where the element will be rendered.- Specified by:
setLocationin interfaceReplacedElement- Parameters:
x- new horizontal posy- new vertical pos
-
getLocation
public Point getLocation()
Description copied from interface:ReplacedElementReturns the current location where the element will be rendered on the canvas- Specified by:
getLocationin interfaceReplacedElement- Returns:
- see desc
-
detach
public void detach(LayoutContext c)
- Specified by:
detachin interfaceReplacedElement
-
isRequiresInteractivePaint
public boolean isRequiresInteractivePaint()
- Specified by:
isRequiresInteractivePaintin interfaceReplacedElement
-
getBaseline
public int getBaseline()
- Specified by:
getBaselinein interfaceReplacedElement
-
hasBaseline
public boolean hasBaseline()
- Specified by:
hasBaselinein interfaceReplacedElement
-
-