Package org.apache.fop.area.inline
Class InlineViewport
- java.lang.Object
-
- org.apache.fop.area.AreaTreeObject
-
- org.apache.fop.area.Area
-
- org.apache.fop.area.inline.InlineArea
-
- org.apache.fop.area.inline.InlineViewport
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,Viewport
public class InlineViewport extends InlineArea implements Viewport
Inline viewport area. This is an inline-level viewport area for inline container, external graphic and instream foreign object. This viewport holds the area and positions it.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.fop.area.inline.InlineArea
InlineArea.InlineAdjustingInfo
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
clip
private Area
content
private java.awt.geom.Rectangle2D
contentPosition
private static long
serialVersionUID
-
Fields inherited from class org.apache.fop.area.inline.InlineArea
adjustingInfo, blockProgressionOffset
-
Fields inherited from class org.apache.fop.area.Area
bidiLevel, bpd, CLASS_ABSOLUTE, CLASS_BEFORE_FLOAT, CLASS_FIXED, CLASS_FOOTNOTE, CLASS_MAX, CLASS_NORMAL, CLASS_SIDE_FLOAT, effectiveIPD, ipd, log, ORIENT_0, ORIENT_180, ORIENT_270, ORIENT_90, traits
-
Fields inherited from class org.apache.fop.area.AreaTreeObject
extensionAttachments, foreignAttributes
-
-
Constructor Summary
Constructors Constructor Description InlineViewport(Area child)
Create a new viewport area with the content area.InlineViewport(Area child, int bidiLevel)
Create a new viewport area with the content area.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Rectangle
getClipRectangle()
Returns the clipping rectangle of this viewport area.Area
getContent()
Get the content area for this viewport.java.awt.geom.Rectangle2D
getContentPosition()
Get the position and size of the content of this viewport.int
getEffectiveIPD()
boolean
hasClip()
Returns true if this area will clip overflowing content.private void
readObject(java.io.ObjectInputStream in)
void
setClip(boolean c)
Set the clip of this viewport.void
setContent(Area content)
Sets the content area.void
setContentPosition(java.awt.geom.Rectangle2D cp)
Set the position and size of the content of this viewport.private void
writeObject(java.io.ObjectOutputStream out)
-
Methods inherited from class org.apache.fop.area.inline.InlineArea
addChildArea, applyVariationFactor, collectInlineRuns, getAdjustingInfo, getBlockProgressionOffset, getParentArea, getVirtualBPD, getVirtualOffset, handleIPDVariation, hasLineThrough, hasOverline, hasUnderline, increaseIPD, isAncestor, isAncestorOrSelf, isBlinking, notifyIPDVariation, setAdjustingInfo, setAdjustingInfo, setAdjustment, setBlockProgressionOffset, setParentArea
-
Methods inherited from class org.apache.fop.area.Area
activateEffectiveIPD, addTrait, clone, getAllocBPD, getAllocIPD, getAreaClass, getBidiLevel, getBorderAndPaddingWidthAfter, getBorderAndPaddingWidthBefore, getBorderAndPaddingWidthEnd, getBorderAndPaddingWidthStart, getBPD, getChangeBarList, getEffectiveAllocIPD, getIPD, getSpaceAfter, getSpaceBefore, getSpaceEnd, getSpaceStart, getTrait, getTraitAsBoolean, getTraitAsInteger, getTraits, hasTrait, hasTraits, resetBidiLevel, setAreaClass, setBidiLevel, setBPD, setChangeBarList, setIPD, setTraits, setWritingModeTraits, toString
-
Methods inherited from class org.apache.fop.area.AreaTreeObject
addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
content
private Area content
-
clip
private boolean clip
-
contentPosition
private java.awt.geom.Rectangle2D contentPosition
-
-
Constructor Detail
-
InlineViewport
public InlineViewport(Area child)
Create a new viewport area with the content area.- Parameters:
child
- the child content area of this viewport
-
InlineViewport
public InlineViewport(Area child, int bidiLevel)
Create a new viewport area with the content area.- Parameters:
child
- the child content area of this viewportbidiLevel
- the bidirectional embedding level (or -1 if not defined)
-
-
Method Detail
-
setClip
public void setClip(boolean c)
Set the clip of this viewport.- Parameters:
c
- true if this viewport should clip
-
hasClip
public boolean hasClip()
Returns true if this area will clip overflowing content.
-
getClipRectangle
public java.awt.Rectangle getClipRectangle()
Returns the clipping rectangle of this viewport area.- Specified by:
getClipRectangle
in interfaceViewport
- Returns:
- the clipping rectangle expressed in the viewport's coordinate system, or null if clipping is disabled
-
setContentPosition
public void setContentPosition(java.awt.geom.Rectangle2D cp)
Set the position and size of the content of this viewport.- Parameters:
cp
- the position and size to place the content
-
getContentPosition
public java.awt.geom.Rectangle2D getContentPosition()
Get the position and size of the content of this viewport.- Returns:
- the position and size to place the content
-
setContent
public void setContent(Area content)
Sets the content area.- Parameters:
content
- the content area
-
getContent
public Area getContent()
Get the content area for this viewport.- Returns:
- the content area
-
writeObject
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
getEffectiveIPD
public int getEffectiveIPD()
- Overrides:
getEffectiveIPD
in classArea
-
-