Package com.storedobject.pdf
Class PDFRectangle
java.lang.Object
com.storedobject.pdf.PDFRectangle
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
Represents bottom side.static int
Represents all sides (as a box).static int
Represents left side.static int
Represents "no border".static int
Represents right side.static int
Represents top side.static int
Uses to represent an "undefined" value.Fields inherited from interface com.storedobject.pdf.PDFElement
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, TEXT_DIRECTION_DEFAULT, TEXT_DIRECTION_LTR, TEXT_DIRECTION_NO_BIDI, TEXT_DIRECTION_RTL
-
Constructor Summary
ConstructorsConstructorDescriptionPDFRectangle
(float x2, float y2) Constructor.PDFRectangle
(float x1, float y1, float x2, float y2) Constructor.PDFRectangle
(float x1, float y1, float x2, float y2, int rotation) Constructor.PDFRectangle
(float x2, float y2, int rotation) Constructor.PDFRectangle
(PDFRectangle another) Construct from another. -
Method Summary
Modifier and TypeMethodDescriptionGet the background color.int
Get the border value.Get the border color.Get the color for the bottom border.Get the color for the left border.Get the color for the right border.Get the color for the top border.float
Get the border thickness.float
Get the thickness of the bottom border.float
Get the thickness of the left border.float
Get the thickness of the right border.float
Get the thickness of the top border.float
Get the bottom value.float
Get the gray fill value.float
Get the height.float
getLeft()
float
getRight()
Get the right value.int
Get the rotation value.float
getTop()
Get the top value.float
getWidth()
Get the width.rotate()
Create a rotated instance.void
setBackgroundColor
(PDFColor color) Set the background color.void
setBorder
(int borders) Set borders.void
setBorderColor
(PDFColor color) Set the border color.void
setBorderColorBottom
(PDFColor color) Set the color for the bottom border.void
setBorderColorLeft
(PDFColor color) Set the color for the left border.void
setBorderColorRight
(PDFColor color) Set the color for the right border.void
setBorderColorTop
(PDFColor color) Set the color for the top border.void
setBorderWidth
(float thickness) Set the border thickness.void
setBorderWidthBottom
(float thickness) Set the thickness of the bottom border.void
setBorderWidthLeft
(float thickness) Set the thickness of the left border.void
setBorderWidthRight
(float thickness) Set the thickness of the right border.void
setBorderWidthTop
(float thickness) Set the thickness of the top border.void
setBottom
(float value) Set the bottom value.void
setGrayFill
(float fillValue) Set the gray fill value (between 0.0 and 1.0).void
setLeft
(float value) Set the left value.void
setRight
(float value) Set the right value.void
setRotation
(int rotation) Set rotation in degrees.void
setTop
(float value) Set the top value.
-
Field Details
-
UNDEFINED
public static int UNDEFINEDUses to represent an "undefined" value. -
TOP
public static int TOPRepresents top side. -
BOTTOM
public static int BOTTOMRepresents bottom side. -
LEFT
public static int LEFTRepresents left side. -
RIGHT
public static int RIGHTRepresents right side. -
NO_BORDER
public static int NO_BORDERRepresents "no border". -
BOX
public static int BOXRepresents all sides (as a box).
-
-
Constructor Details
-
PDFRectangle
public PDFRectangle(float x1, float y1, float x2, float y2) Constructor.- Parameters:
x1
- Coordinate x1 (Lower left).y1
- Coordinate y1 (Lower left).x2
- Coordinate x2 (Upper right).y2
- Coordinate y2 (Upper right).
-
PDFRectangle
public PDFRectangle(float x1, float y1, float x2, float y2, int rotation) Constructor.- Parameters:
x1
- Coordinate x1 (Lower left).y1
- Coordinate y1 (Lower left).x2
- Coordinate x2 (Upper right).y2
- Coordinate y2 (Upper right).rotation
- Rotation in degrees (multiples fo 90 only).
-
PDFRectangle
public PDFRectangle(float x2, float y2) Constructor. (x1, y1) will be (0, 0).- Parameters:
x2
- Coordinate x2 (Upper right).y2
- Coordinate y2 (Upper right).
-
PDFRectangle
public PDFRectangle(float x2, float y2, int rotation) Constructor. (x1, y1) will be (0, 0).- Parameters:
x2
- Coordinate x2 (Upper right).y2
- Coordinate y2 (Upper right).rotation
- Rotation in degrees (multiples fo 90 only).
-
PDFRectangle
Construct from another.- Parameters:
another
- Another instance.
-
-
Method Details
-
rotate
-
setBorderWidth
public void setBorderWidth(float thickness) Set the border thickness.- Parameters:
thickness
- Border thickness.
-
setBorder
-
getWidth
public float getWidth()Get the width.- Returns:
- Width.
-
getHeight
public float getHeight()Get the height.- Returns:
- Height.
-
setGrayFill
public void setGrayFill(float fillValue) Set the gray fill value (between 0.0 and 1.0).- Parameters:
fillValue
- Gray fill value.
-
setRotation
public void setRotation(int rotation) Set rotation in degrees.- Parameters:
rotation
- Rotation (multiples of 90).
-
setLeft
public void setLeft(float value) Set the left value.- Parameters:
value
- Left.
-
getLeft
public float getLeft() -
setRight
public void setRight(float value) Set the right value.- Parameters:
value
- Right.
-
getRight
public float getRight()Get the right value.- Returns:
- Right.
-
setTop
public void setTop(float value) Set the top value.- Parameters:
value
- Top.
-
getTop
public float getTop()Get the top value.- Returns:
- Top.
-
setBottom
public void setBottom(float value) Set the bottom value.- Parameters:
value
- Bottom.
-
getBottom
public float getBottom()Get the bottom value.- Returns:
- Bottom.
-
getRotation
public int getRotation()Get the rotation value.- Returns:
- Rotation.
-
getBackgroundColor
-
setBackgroundColor
-
getGrayFill
public float getGrayFill()Get the gray fill value.- Returns:
- Gray fill.
-
getBorder
public int getBorder()Get the border value.- Returns:
- Border.
-
getBorderWidth
public float getBorderWidth()Get the border thickness.- Returns:
- Border thickness.
-
getBorderWidthLeft
public float getBorderWidthLeft()Get the thickness of the left border.- Returns:
- Border thickness.
-
setBorderWidthLeft
public void setBorderWidthLeft(float thickness) Set the thickness of the left border.- Parameters:
thickness
- Thickness.
-
getBorderWidthRight
public float getBorderWidthRight()Get the thickness of the right border.- Returns:
- Border thickness.
-
setBorderWidthRight
public void setBorderWidthRight(float thickness) Set the thickness of the right border.- Parameters:
thickness
- Thickness.
-
getBorderWidthTop
public float getBorderWidthTop()Get the thickness of the top border.- Returns:
- Border thickness.
-
setBorderWidthTop
public void setBorderWidthTop(float thickness) Set the thickness of the top border.- Parameters:
thickness
- Thickness.
-
getBorderWidthBottom
public float getBorderWidthBottom()Get the thickness of the bottom border.- Returns:
- Border thickness.
-
setBorderWidthBottom
public void setBorderWidthBottom(float thickness) Set the thickness of the bottom border.- Parameters:
thickness
- Thickness.
-
getBorderColor
-
setBorderColor
-
getBorderColorLeft
-
setBorderColorLeft
Set the color for the left border.- Parameters:
color
- Color.
-
getBorderColorRight
-
setBorderColorRight
Set the color for the right border.- Parameters:
color
- Color.
-
getBorderColorTop
-
setBorderColorTop
Set the color for the top border.- Parameters:
color
- Color.
-
getBorderColorBottom
-
setBorderColorBottom
Set the color for the bottom border.- Parameters:
color
- Color.
-