public class LogicalPageDrawable extends IterateStructuralProcessStep implements PageDrawable
Modifier and Type | Class and Description |
---|---|
protected static class |
LogicalPageDrawable.TextSpec |
Modifier and Type | Field and Description |
---|---|
static BasicStroke |
DEFAULT_STROKE |
Constructor and Description |
---|
LogicalPageDrawable() |
LogicalPageDrawable(LogicalPageBox rootBox,
OutputProcessorMetaData metaData,
ResourceManager resourceManager)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
clearClipping() |
void |
clip(StrictBounds bounds) |
protected void |
configureGraphics(StyleSheet layoutContext,
Graphics2D g2) |
protected void |
configureStroke(StyleSheet layoutContext,
Graphics2D g2) |
protected Rectangle2D |
createClipRect(StrictBounds bounds) |
void |
draw(Graphics2D graphics,
Rectangle2D area)
Draws the object.
|
protected void |
drawAnchor(RenderNode content)
To be overriden in the PDF drawable.
|
protected void |
drawBookmark(RenderNode box,
String bookmark) |
protected void |
drawComplexText(RenderableComplexText renderableComplexText,
Graphics2D g2) |
protected boolean |
drawDrawable(RenderableReplacedContentBox content,
Graphics2D g2,
DrawableWrapper d) |
protected void |
drawHyperlink(RenderNode box,
String target,
String window,
String title) |
protected boolean |
drawImage(RenderableReplacedContentBox content,
Image image) |
protected void |
drawOutlineBox(Graphics2D g2,
RenderBox box) |
protected void |
drawReplacedContent(RenderableReplacedContentBox content) |
protected void |
drawText(RenderableText renderableText) |
protected void |
drawText(RenderableText renderableText,
long contentX2)
Renders the glyphs stored in the text node.
|
protected void |
finishInlineBox(InlineRenderBox box) |
protected void |
finishTableBox(TableRenderBox box) |
protected void |
finishTableSectionBox(TableSectionRenderBox box) |
protected Rectangle2D.Double |
getBoxArea() |
protected CodePointBuffer |
getCodePointBuffer() |
long |
getContentAreaX1() |
long |
getContentAreaX2() |
protected StrictBounds |
getDrawArea() |
Graphics2D |
getGraphics() |
double |
getHeight() |
LogicalPageBox |
getLogicalPageBox() |
OutputProcessorMetaData |
getMetaData() |
RenderNode[] |
getNodesAt(double x,
double y,
double width,
double height,
String namespace,
String name)
Returns all layouted render-nodes that occupy the given area and which have the attribute specified by name and
namespace set.
|
RenderNode[] |
getNodesAt(double x,
double y,
String namespace,
String name)
Retries the nodes under the given coordinate which have a given attribute set.
|
PageFormat |
getPageFormat()
Describes the physical output characteristics like page size, margins, and imaginable area.
|
Dimension |
getPreferredSize()
Returns the preferred size of the drawable.
|
protected ResourceManager |
getResourceManager() |
protected LogicalPageBox |
getRootBox() |
protected LogicalPageDrawable.TextSpec |
getTextSpec() |
double |
getWidth() |
void |
init(LogicalPageBox rootBox,
OutputProcessorMetaData metaData,
ResourceManager resourceManager) |
boolean |
isClipOnWordBoundary() |
boolean |
isDrawPageBackground() |
protected boolean |
isIgnoreBorderWhenDrawingOutline() |
protected boolean |
isNormalTextSpacing(RenderableText text) |
boolean |
isOutlineMode() |
boolean |
isPreserveAspectRatio()
Returns true, if this drawable will preserve an aspect ratio during the drawing.
|
boolean |
isTextLineOverflow() |
protected void |
processLinksAndAnchors(RenderNode box) |
protected void |
processOtherNode(RenderNode node) |
protected void |
processParagraphChilds(ParagraphRenderBox box) |
protected void |
processRenderableContent(RenderableReplacedContentBox box) |
protected void |
processRootBand(StrictBounds pageBounds) |
protected void |
processTextLine(RenderBox lineBox,
long contentAreaX1,
long contentAreaX2) |
protected void |
renderBoxBorderAndBackground(RenderBox box) |
void |
setContentAreaX1(long contentAreaX1) |
void |
setContentAreaX2(long contentAreaX2) |
protected void |
setDrawArea(StrictBounds drawArea) |
void |
setDrawPageBackground(boolean drawPageBackground) |
void |
setOutlineMode(boolean outlineMode) |
void |
setTextLineOverflow(boolean textLineOverflow) |
protected void |
setTextSpec(LogicalPageDrawable.TextSpec textSpec) |
protected boolean |
startAutoBox(RenderBox box) |
protected boolean |
startBlockBox(BlockRenderBox box) |
protected boolean |
startBox(RenderBox box) |
boolean |
startCanvasBox(CanvasRenderBox box) |
protected boolean |
startInlineBox(InlineRenderBox box) |
protected boolean |
startRowBox(RenderBox box) |
protected boolean |
startTableBox(TableRenderBox box) |
protected boolean |
startTableCellBox(TableCellRenderBox box) |
protected boolean |
startTableColumnGroupBox(TableColumnGroupNode box) |
protected boolean |
startTableRowBox(TableRowRenderBox box) |
protected boolean |
startTableSectionBox(TableSectionRenderBox box) |
finishAutoBox, finishBlockBox, finishCanvasBox, finishOtherBox, finishRowBox, finishTableCellBox, finishTableColumnGroupBox, finishTableRowBox, processBoxChilds, processTableColumn, startOtherBox, startProcessing
public static final BasicStroke DEFAULT_STROKE
public LogicalPageDrawable()
@Deprecated public LogicalPageDrawable(LogicalPageBox rootBox, OutputProcessorMetaData metaData, ResourceManager resourceManager)
public void init(LogicalPageBox rootBox, OutputProcessorMetaData metaData, ResourceManager resourceManager)
public LogicalPageBox getLogicalPageBox()
protected ResourceManager getResourceManager()
public boolean isClipOnWordBoundary()
public boolean isOutlineMode()
public void setOutlineMode(boolean outlineMode)
protected StrictBounds getDrawArea()
public PageFormat getPageFormat()
PageDrawable
getPageFormat
in interface PageDrawable
public Dimension getPreferredSize()
getPreferredSize
in interface PageDrawable
public double getHeight()
public double getWidth()
public boolean isPreserveAspectRatio()
public boolean isDrawPageBackground()
public void setDrawPageBackground(boolean drawPageBackground)
public void draw(Graphics2D graphics, Rectangle2D area)
draw
in interface PageDrawable
graphics
- the graphics device.area
- the area inside which the object should be drawn.protected void processRootBand(StrictBounds pageBounds)
protected Rectangle2D createClipRect(StrictBounds bounds)
protected LogicalPageBox getRootBox()
protected void setDrawArea(StrictBounds drawArea)
protected void drawOutlineBox(Graphics2D g2, RenderBox box)
protected void processLinksAndAnchors(RenderNode box)
protected void drawBookmark(RenderNode box, String bookmark)
protected void drawHyperlink(RenderNode box, String target, String window, String title)
public boolean startCanvasBox(CanvasRenderBox box)
startCanvasBox
in class IterateStructuralProcessStep
protected boolean startBlockBox(BlockRenderBox box)
startBlockBox
in class IterateStructuralProcessStep
protected boolean startRowBox(RenderBox box)
startRowBox
in class IterateStructuralProcessStep
protected boolean startTableCellBox(TableCellRenderBox box)
startTableCellBox
in class IterateStructuralProcessStep
protected boolean startBox(RenderBox box)
protected boolean startTableRowBox(TableRowRenderBox box)
startTableRowBox
in class IterateStructuralProcessStep
protected boolean startTableSectionBox(TableSectionRenderBox box)
startTableSectionBox
in class IterateStructuralProcessStep
protected void finishTableSectionBox(TableSectionRenderBox box)
finishTableSectionBox
in class IterateStructuralProcessStep
protected boolean startTableBox(TableRenderBox box)
startTableBox
in class IterateStructuralProcessStep
protected void finishTableBox(TableRenderBox box)
finishTableBox
in class IterateStructuralProcessStep
protected boolean startTableColumnGroupBox(TableColumnGroupNode box)
startTableColumnGroupBox
in class IterateStructuralProcessStep
protected boolean startAutoBox(RenderBox box)
startAutoBox
in class IterateStructuralProcessStep
protected boolean startInlineBox(InlineRenderBox box)
startInlineBox
in class IterateStructuralProcessStep
protected boolean isIgnoreBorderWhenDrawingOutline()
protected void renderBoxBorderAndBackground(RenderBox box)
protected Rectangle2D.Double getBoxArea()
protected LogicalPageDrawable.TextSpec getTextSpec()
protected void setTextSpec(LogicalPageDrawable.TextSpec textSpec)
protected void finishInlineBox(InlineRenderBox box)
finishInlineBox
in class IterateStructuralProcessStep
protected void processParagraphChilds(ParagraphRenderBox box)
processParagraphChilds
in class IterateStructuralProcessStep
protected void processTextLine(RenderBox lineBox, long contentAreaX1, long contentAreaX2)
public long getContentAreaX2()
public void setContentAreaX2(long contentAreaX2)
public long getContentAreaX1()
public void setContentAreaX1(long contentAreaX1)
public boolean isTextLineOverflow()
public void setTextLineOverflow(boolean textLineOverflow)
protected void processOtherNode(RenderNode node)
processOtherNode
in class IterateStructuralProcessStep
protected void processRenderableContent(RenderableReplacedContentBox box)
processRenderableContent
in class IterateStructuralProcessStep
protected void drawReplacedContent(RenderableReplacedContentBox content)
protected void drawAnchor(RenderNode content)
content
- the render-node that defines the anchor.protected boolean drawImage(RenderableReplacedContentBox content, Image image)
content
- image
- protected boolean drawDrawable(RenderableReplacedContentBox content, Graphics2D g2, DrawableWrapper d)
protected void drawText(RenderableText renderableText)
protected void drawText(RenderableText renderableText, long contentX2)
renderableText
- the text node that should be rendered.contentX2
- protected void drawComplexText(RenderableComplexText renderableComplexText, Graphics2D g2)
protected final CodePointBuffer getCodePointBuffer()
protected boolean isNormalTextSpacing(RenderableText text)
protected void configureStroke(StyleSheet layoutContext, Graphics2D g2)
protected void configureGraphics(StyleSheet layoutContext, Graphics2D g2)
public OutputProcessorMetaData getMetaData()
public void clip(StrictBounds bounds)
public void clearClipping()
public Graphics2D getGraphics()
public RenderNode[] getNodesAt(double x, double y, String namespace, String name)
getNodesAt
in interface PageDrawable
x
- the x coordinatey
- the y coordinatenamespace
- the namespace on which to filter onname
- the name on which to filter onpublic RenderNode[] getNodesAt(double x, double y, double width, double height, String namespace, String name)
PageDrawable
getNodesAt
in interface PageDrawable
x
- the x coordinate of the origin of the area.y
- the y coordinate of the origin of the area.width
- the height of the area.height
- the width of the area.namespace
- the attribute's namespace.name
- the attribute's name.Copyright © 2017 Hitachi Vantara. All rights reserved.