public class Layer extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
AUTO |
static int |
NEGATIVE |
static short |
PAGED_MODE_PRINT |
static short |
PAGED_MODE_SCREEN |
static int |
POSITIVE |
static int |
ZERO |
| Constructor and Description |
|---|
Layer(BlockBox master,
CssContext c)
Creates the root layer.
|
Layer(BlockBox master,
CssContext c,
boolean isolated) |
Layer(Layer parent,
BlockBox master,
CssContext c)
Creates a child layer.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
List<Layer> |
collectLayers(int which)
Called recusively to collect all descendant layers in a layer tree so
they can be painted in correct order.
|
static PageBox |
createPageBox(CssContext c,
String pseudoPage) |
boolean |
crossesPageBreak(LayoutContext c,
int top,
int bottom)
Returns whether the a box with the given top and bottom would cross a page break.
|
void |
detach() |
void |
ensureHasPage(CssContext c,
Box box) |
Layer |
findRoot() |
void |
finish(LayoutContext c) |
List<Layer> |
getChildren()
The resulting list should not be modified.
|
AffineTransform |
getCurrentTransformMatrix()
The document coordinates current transform, this is cumulative from layer to child layer.
|
PageBox |
getFirstPage(CssContext c,
Box box) |
PageBox |
getFirstPage(CssContext c,
int absY)
Returns the page box for a Y position.
|
List<BlockBox> |
getFloats() |
PageBox |
getLastPage() |
PageBox |
getLastPage(CssContext c,
Box box) |
BlockBox |
getMaster() |
int |
getMaxPageWidth(CssContext cssCtx,
int additionalClearance) |
PageBox |
getPage(CssContext c,
int yOffset)
Gets the page box for the given document y offset.
|
PageBox |
getPage(CssContext c,
int yOffset,
boolean addPages)
Differs from
getPage(CssContext, int) by allowing the caller to
control whether a yOffset past the last page will add pages or just
return null. |
int |
getPageIndex(int yOffset)
Returns the zero based index of a page containing yOffset or
-1 if yOffset is before the first page or after the last.
|
List<PageBox> |
getPages() |
List<PageBox> |
getPages(CssContext c,
int top,
int bottom)
Tries to return a list of pages that cover top to bottom.
|
Dimension |
getPaintingDimension(LayoutContext c) |
Layer |
getParent() |
int |
getRelativePageCount(RenderingContext c) |
int |
getRelativePageNo(RenderingContext c) |
int |
getRelativePageNo(RenderingContext c,
int absY) |
BlockBox |
getRunningBlock(String identifer,
PageBox page,
PageElementPosition which) |
List<Layer> |
getSortedLayers(int which) |
int |
getZIndex() |
boolean |
hasFixedAncester() |
boolean |
hasLocalTransform() |
boolean |
isForDeletion() |
boolean |
isIsolated() |
boolean |
isLastPage(PageBox pageBox) |
boolean |
isRequiresLayout() |
boolean |
isRootLayer() |
boolean |
isStackingContext() |
boolean |
isZIndexAuto() |
void |
layoutPages(LayoutContext c) |
void |
positionChildren(LayoutContext c) |
void |
positionFixedLayer(RenderingContext c) |
void |
propagateCurrentTransformationMatrix(CssContext c)
Recursively propagates the transformation matrix.
|
void |
removeFloat(BlockBox floater)
FIXME: Only used when we reset a box, so trying to remove at sometime in the future.
|
void |
removeLastPage() |
void |
removeRunningBlock(BlockBox block) |
void |
setForDeletion(boolean forDeletion) |
void |
setPages(List<PageBox> pages) |
void |
setRequiresLayout(boolean requiresLayout) |
void |
setStackingContext(boolean stackingContext) |
void |
trimEmptyPages(CssContext c,
int maxYHeight) |
void |
trimPageCount(int newPageCount) |
public static final short PAGED_MODE_SCREEN
public static final short PAGED_MODE_PRINT
public static final int POSITIVE
public static final int ZERO
public static final int NEGATIVE
public static final int AUTO
public Layer(BlockBox master, CssContext c)
public Layer(BlockBox master, CssContext c, boolean isolated)
public Layer(Layer parent, BlockBox master, CssContext c)
public void propagateCurrentTransformationMatrix(CssContext c)
public AffineTransform getCurrentTransformMatrix()
propagateCurrentTransformationMatrix(CssContext) has been
called on the root layer.public boolean hasLocalTransform()
public void setForDeletion(boolean forDeletion)
public boolean isForDeletion()
public boolean hasFixedAncester()
public Layer getParent()
public boolean isStackingContext()
public void setStackingContext(boolean stackingContext)
public int getZIndex()
public boolean isZIndexAuto()
public BlockBox getMaster()
public void addChild(Layer layer)
public static PageBox createPageBox(CssContext c, String pseudoPage)
public void removeFloat(BlockBox floater)
public void addFloat(BlockBox floater, BlockFormattingContext bfc)
public List<Layer> collectLayers(int which)
which - NEGATIVE ZERO POSITIVE AUTO corresponding to z-index property.public Dimension getPaintingDimension(LayoutContext c)
public void positionFixedLayer(RenderingContext c)
public boolean isRootLayer()
public void positionChildren(LayoutContext c)
public void detach()
public boolean isRequiresLayout()
public void setRequiresLayout(boolean requiresLayout)
public void finish(LayoutContext c)
public boolean isLastPage(PageBox pageBox)
public void removeLastPage()
public void addPage(CssContext c)
public PageBox getFirstPage(CssContext c, int absY)
public PageBox getFirstPage(CssContext c, Box box)
public PageBox getLastPage(CssContext c, Box box)
public void ensureHasPage(CssContext c, Box box)
public List<PageBox> getPages(CssContext c, int top, int bottom)
public PageBox getPage(CssContext c, int yOffset)
public PageBox getPage(CssContext c, int yOffset, boolean addPages)
getPage(CssContext, int) by allowing the caller to
control whether a yOffset past the last page will add pages or just
return null.public int getPageIndex(int yOffset)
public void trimEmptyPages(CssContext c, int maxYHeight)
public void trimPageCount(int newPageCount)
public void assignPagePaintingPositions(CssContext cssCtx, short mode)
public void assignPagePaintingPositions(CssContext cssCtx, int mode, int additionalClearance)
public int getMaxPageWidth(CssContext cssCtx, int additionalClearance)
public PageBox getLastPage()
public boolean crossesPageBreak(LayoutContext c, int top, int bottom)
float: bottom
content when used in in-flow content. For example, if the top/bottom pair overlaps
the footnote area, returns true. It also takes into account space set aside for
paginated table header/footer.
CssContext.isInFloatBottom() LayoutContext.getExtraSpaceBottom()public Layer findRoot()
public void addRunningBlock(BlockBox block)
public void removeRunningBlock(BlockBox block)
public BlockBox getRunningBlock(String identifer, PageBox page, PageElementPosition which)
public void layoutPages(LayoutContext c)
public void addPageSequence(BlockBox start)
public int getRelativePageNo(RenderingContext c, int absY)
public int getRelativePageNo(RenderingContext c)
public int getRelativePageCount(RenderingContext c)
public boolean isIsolated()
Copyright © 2004–2025. All rights reserved.