Package ca.cgjennings.layout
Class PageShape.InsetShape
- java.lang.Object
-
- ca.cgjennings.layout.PageShape
-
- ca.cgjennings.layout.PageShape.InsetShape
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ca.cgjennings.layout.PageShape
PageShape.CompoundShape, PageShape.CupShape, PageShape.GeometricShape, PageShape.InsetShape, PageShape.MergedShape
-
-
Field Summary
-
Fields inherited from class ca.cgjennings.layout.PageShape
RECTANGLE_SHAPE
-
-
Constructor Summary
Constructors Constructor Description InsetShape(double leftInset, double rightInset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debugDraw(java.awt.Graphics2D g, java.awt.geom.Rectangle2D rect)
This function is called when the markup renderer is painting its text box for debugging purposes.double
getLeftInset(double y1, double y2)
Return the narrowest (maximum) left edge inset between y1 and y2.double
getRightInset(double y1, double y2)
Return the narrowest (maximum) right edge inset between y1 and y2.
-
-
-
Method Detail
-
getLeftInset
public double getLeftInset(double y1, double y2)
Description copied from class:PageShape
Return the narrowest (maximum) left edge inset between y1 and y2. y1 must be <= y2.- Overrides:
getLeftInset
in classPageShape
-
getRightInset
public double getRightInset(double y1, double y2)
Description copied from class:PageShape
Return the narrowest (maximum) right edge inset between y1 and y2. y1 must be <= y2.- Overrides:
getRightInset
in classPageShape
-
debugDraw
public void debugDraw(java.awt.Graphics2D g, java.awt.geom.Rectangle2D rect)
Description copied from class:PageShape
This function is called when the markup renderer is painting its text box for debugging purposes. It should draw lines or a shape to indicate how the margins are modified by this shape. The default implementation samples the left and right insets at regular intervals to construct an approximate shape. Subclasses are encouraged to override this to provide more efficient and/or more accurate implementations.
-
-