org.xhtmlrenderer.layout
Class Layer
java.lang.Object
org.xhtmlrenderer.layout.Layer
public class Layer
- extends Object
All positioned content as well as content with an overflow value other
than visible creates a layer. Layers which define stacking contexts
provide the entry for rendering the box tree to an output device. The main
purpose of this class is to provide an implementation of Appendix E of the
spec, but it also provides additional utility services including page
management and mapping boxes to coordinates (for e.g. links). When
rendering to a paged output device, the layer is also responsible for laying
out absolute content (which is layed out after its containing block has
completed layout).
Method Summary |
void |
addChild(Layer layer)
|
void |
addFloat(BlockBox floater,
BlockFormattingContext bfc)
|
void |
addPage(CssContext c)
|
void |
addPageSequence(BlockBox start)
|
void |
addRunningBlock(BlockBox block)
|
void |
assignPagePaintingPositions(CssContext cssCtx,
int mode,
int additionalClearance)
|
void |
assignPagePaintingPositions(CssContext cssCtx,
short mode)
|
boolean |
containsFixedContent()
|
static PageBox |
createPageBox(CssContext c,
String pseudoPage)
|
boolean |
crossesPageBreak(LayoutContext c,
int top,
int bottom)
|
void |
detach()
|
void |
ensureHasPage(CssContext c,
Box box)
|
Box |
find(CssContext cssCtx,
int absX,
int absY,
boolean findAnonymous)
|
Layer |
findRoot()
|
void |
finish(LayoutContext c)
|
List |
getChildren()
|
Box |
getEnd()
|
PageBox |
getFirstPage(CssContext c,
Box box)
|
PageBox |
getLastPage()
|
PageBox |
getLastPage(CssContext c,
Box box)
|
Box |
getMaster()
|
int |
getMaxPageWidth(CssContext cssCtx,
int additionalClearance)
|
PageBox |
getPage(CssContext c,
int yOffset)
|
List |
getPages()
|
Dimension |
getPaintingDimension(LayoutContext c)
|
Layer |
getParent()
|
int |
getRelativePageCount(RenderingContext c)
|
int |
getRelativePageNo(RenderingContext c)
|
BlockBox |
getRunningBlock(String identifer,
PageBox page,
PageElementPosition which)
|
Box |
getSelectionEnd()
|
int |
getSelectionEndX()
|
int |
getSelectionEndY()
|
Box |
getSelectionStart()
|
int |
getSelectionStartX()
|
int |
getSelectionStartY()
|
int |
getZIndex()
|
boolean |
isInline()
|
boolean |
isLastPage(PageBox pageBox)
|
boolean |
isRequiresLayout()
|
boolean |
isRootLayer()
|
boolean |
isStackingContext()
|
void |
layoutPages(LayoutContext c)
|
void |
paint(RenderingContext c)
|
void |
paintAsLayer(RenderingContext c,
BlockBox startingPoint)
|
void |
positionChildren(LayoutContext c)
|
void |
removeFloat(BlockBox floater)
|
void |
removeLastPage()
|
void |
removeRunningBlock(BlockBox block)
|
void |
setEnd(Box end)
|
void |
setFixedBackground(boolean b)
|
void |
setInline(boolean inline)
|
void |
setPages(List pages)
|
void |
setRequiresLayout(boolean requiresLayout)
|
void |
setSelectionEnd(Box selectionEnd)
|
void |
setSelectionEndX(int selectionEndX)
|
void |
setSelectionEndY(int selectionEndY)
|
void |
setSelectionStart(Box selectionStart)
|
void |
setSelectionStartX(int selectionStartX)
|
void |
setSelectionStartY(int selectionStartY)
|
void |
setStackingContext(boolean stackingContext)
|
void |
trimEmptyPages(CssContext c,
int maxYHeight)
|
void |
trimPageCount(int newPageCount)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PAGED_MODE_SCREEN
public static final short PAGED_MODE_SCREEN
- See Also:
- Constant Field Values
PAGED_MODE_PRINT
public static final short PAGED_MODE_PRINT
- See Also:
- Constant Field Values
Layer
public Layer(Box master)
Layer
public Layer(Layer parent,
Box master)
getParent
public Layer getParent()
isStackingContext
public boolean isStackingContext()
setStackingContext
public void setStackingContext(boolean stackingContext)
getZIndex
public int getZIndex()
getMaster
public Box getMaster()
addChild
public void addChild(Layer layer)
addFloat
public void addFloat(BlockBox floater,
BlockFormattingContext bfc)
removeFloat
public void removeFloat(BlockBox floater)
getPaintingDimension
public Dimension getPaintingDimension(LayoutContext c)
paint
public void paint(RenderingContext c)
find
public Box find(CssContext cssCtx,
int absX,
int absY,
boolean findAnonymous)
paintAsLayer
public void paintAsLayer(RenderingContext c,
BlockBox startingPoint)
isRootLayer
public boolean isRootLayer()
positionChildren
public void positionChildren(LayoutContext c)
containsFixedContent
public boolean containsFixedContent()
setFixedBackground
public void setFixedBackground(boolean b)
getChildren
public List getChildren()
detach
public void detach()
isInline
public boolean isInline()
setInline
public void setInline(boolean inline)
getEnd
public Box getEnd()
setEnd
public void setEnd(Box end)
isRequiresLayout
public boolean isRequiresLayout()
setRequiresLayout
public void setRequiresLayout(boolean requiresLayout)
finish
public void finish(LayoutContext c)
getPages
public List getPages()
setPages
public void setPages(List pages)
isLastPage
public boolean isLastPage(PageBox pageBox)
addPage
public void addPage(CssContext c)
removeLastPage
public void removeLastPage()
createPageBox
public static PageBox createPageBox(CssContext c,
String pseudoPage)
getFirstPage
public PageBox getFirstPage(CssContext c,
Box box)
getLastPage
public PageBox getLastPage(CssContext c,
Box box)
ensureHasPage
public void ensureHasPage(CssContext c,
Box box)
getPage
public PageBox getPage(CssContext c,
int yOffset)
trimEmptyPages
public void trimEmptyPages(CssContext c,
int maxYHeight)
trimPageCount
public void trimPageCount(int newPageCount)
assignPagePaintingPositions
public void assignPagePaintingPositions(CssContext cssCtx,
short mode)
assignPagePaintingPositions
public void assignPagePaintingPositions(CssContext cssCtx,
int mode,
int additionalClearance)
getMaxPageWidth
public int getMaxPageWidth(CssContext cssCtx,
int additionalClearance)
getLastPage
public PageBox getLastPage()
crossesPageBreak
public boolean crossesPageBreak(LayoutContext c,
int top,
int bottom)
findRoot
public Layer findRoot()
addRunningBlock
public void addRunningBlock(BlockBox block)
removeRunningBlock
public void removeRunningBlock(BlockBox block)
getRunningBlock
public BlockBox getRunningBlock(String identifer,
PageBox page,
PageElementPosition which)
layoutPages
public void layoutPages(LayoutContext c)
addPageSequence
public void addPageSequence(BlockBox start)
getRelativePageNo
public int getRelativePageNo(RenderingContext c)
getRelativePageCount
public int getRelativePageCount(RenderingContext c)
getSelectionEnd
public Box getSelectionEnd()
setSelectionEnd
public void setSelectionEnd(Box selectionEnd)
getSelectionStart
public Box getSelectionStart()
setSelectionStart
public void setSelectionStart(Box selectionStart)
getSelectionEndX
public int getSelectionEndX()
setSelectionEndX
public void setSelectionEndX(int selectionEndX)
getSelectionEndY
public int getSelectionEndY()
setSelectionEndY
public void setSelectionEndY(int selectionEndY)
getSelectionStartX
public int getSelectionStartX()
setSelectionStartX
public void setSelectionStartX(int selectionStartX)
getSelectionStartY
public int getSelectionStartY()
setSelectionStartY
public void setSelectionStartY(int selectionStartY)
Copyright © 2013. All Rights Reserved.