Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » [javadoc | source]
com.lowagie.text
public class: Rectangle [javadoc | source]
java.lang.Object
   com.lowagie.text.Rectangle

All Implemented Interfaces:
    Element

Direct Known Subclasses:
    HeaderFooter, RtfTableCell, ImgPostscript, ImgCCITT, SimpleTable, Jpeg, ImgTemplate, PdfTable, RtfCell, RtfHeaderFooter, RectangleReadOnly, SimpleCell, RtfHeaderFooters, RtfHeaderFooter, PdfPCell, ImgRaw, Table, Image, PdfCell, RtfHeaderFooterGroup, Cell, Jpeg2000, ImgWMF, Watermark

A Rectangle is the representation of a geometric figure. Rectangles support constant width borders using #setBorderWidth(float) and #setBorder(int) . They also support borders that vary in width/color on each side using methods like #setBorderWidthLeft(float) or #setBorderColorLeft(java.awt.Color) .
Field Summary
public static final  int UNDEFINED    This is the value that will be used as undefined
public static final  int TOP    This represents one side of the border of the Rectangle
public static final  int BOTTOM    This represents one side of the border of the Rectangle
public static final  int LEFT    This represents one side of the border of the Rectangle
public static final  int RIGHT    This represents one side of the border of the Rectangle
public static final  int NO_BORDER    This represents a rectangle without borders. 
public static final  int BOX    This represents a type of border. 
protected  float llx    the lower left x-coordinate. 
protected  float lly    the lower left y-coordinate. 
protected  float urx    the upper right x-coordinate. 
protected  float ury    the upper right y-coordinate. 
protected  int rotation    The rotation of the Rectangle 
protected  int border    This represents the status of the 4 sides of the rectangle. 
protected  float borderWidth    This is the width of the border around this rectangle. 
protected  Color borderColor    The color of the border of this rectangle. 
protected  Color backgroundColor    This is the color of the background of this rectangle. 
protected  boolean useVariableBorders    Whether variable width/color borders are used. 
protected  float borderWidthLeft    The width of the left border of this rectangle. 
protected  float borderWidthRight    The width of the right border of this rectangle. 
protected  float borderWidthTop    The width of the top border of this rectangle. 
protected  float borderWidthBottom    The width of the bottom border of this rectangle. 
protected  Color borderColorLeft    The color of the left border of this rectangle. 
protected  Color borderColorRight    The color of the right border of this rectangle. 
protected  Color borderColorTop    The color of the top border of this rectangle. 
protected  Color borderColorBottom    The color of the bottom border of this rectangle. 
Constructor:
 public Rectangle(Rectangle rect) 
    Constructs a Rectangle -object.
    Parameters:
    rect - another Rectangle
 public Rectangle(float urx,
    float ury) 
 public Rectangle(float llx,
    float lly,
    float urx,
    float ury) 
Method from com.lowagie.text.Rectangle Summary:
cloneNonPositionParameters,   disableBorderSide,   enableBorderSide,   getBackgroundColor,   getBorder,   getBorderColor,   getBorderColorBottom,   getBorderColorLeft,   getBorderColorRight,   getBorderColorTop,   getBorderWidth,   getBorderWidthBottom,   getBorderWidthLeft,   getBorderWidthRight,   getBorderWidthTop,   getBottom,   getBottom,   getChunks,   getGrayFill,   getHeight,   getLeft,   getLeft,   getRight,   getRight,   getRotation,   getTop,   getTop,   getWidth,   hasBorder,   hasBorders,   isContent,   isNestable,   isUseVariableBorders,   normalize,   process,   rectangle,   rotate,   setBackgroundColor,   setBorder,   setBorderColor,   setBorderColorBottom,   setBorderColorLeft,   setBorderColorRight,   setBorderColorTop,   setBorderWidth,   setBorderWidthBottom,   setBorderWidthLeft,   setBorderWidthRight,   setBorderWidthTop,   setBottom,   setGrayFill,   setLeft,   setRight,   setTop,   setUseVariableBorders,   softCloneNonPositionParameters,   toString,   type
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.Rectangle Detail:
 public  void cloneNonPositionParameters(Rectangle rect) 
    Copies all of the parameters from a Rectangle object except the position.
 public  void disableBorderSide(int side) 
    Disables the border on the specified side.
 public  void enableBorderSide(int side) 
    Enables the border on the specified side.
 public Color getBackgroundColor() 
    Gets the backgroundcolor.
 public int getBorder() 
    Returns the exact type of the border.
 public Color getBorderColor() 
    Gets the color of the border.
 public Color getBorderColorBottom() 
    Gets the color of a border.
 public Color getBorderColorLeft() 
    Gets the color of a border.
 public Color getBorderColorRight() 
    Gets the color of a border.
 public Color getBorderColorTop() 
    Gets the color of a border.
 public float getBorderWidth() 
    Gets the borderwidth.
 public float getBorderWidthBottom() 
    Gets the width of a border.
 public float getBorderWidthLeft() 
    Gets the width of a border.
 public float getBorderWidthRight() 
    Gets the width of a border.
 public float getBorderWidthTop() 
    Gets the width of a border.
 public float getBottom() 
    Returns the lower left y-coordinate.
 public float getBottom(float margin) 
    Returns the lower left y-coordinate, considering a given margin.
 public ArrayList getChunks() 
    Gets all the chunks in this element.
 public float getGrayFill() 
    Gets the grayscale.
 public float getHeight() 
    Returns the height of the rectangle.
 public float getLeft() 
    Returns the lower left x-coordinate.
 public float getLeft(float margin) 
    Returns the lower left x-coordinate, considering a given margin.
 public float getRight() 
    Returns the upper right x-coordinate.
 public float getRight(float margin) 
    Returns the upper right x-coordinate, considering a given margin.
 public int getRotation() 
    Gets the rotation of the rectangle
 public float getTop() 
    Returns the upper right y-coordinate.
 public float getTop(float margin) 
    Returns the upper right y-coordinate, considering a given margin.
 public float getWidth() 
    Returns the width of the rectangle.
 public boolean hasBorder(int type) 
    Indicates if the table has a some type of border.
 public boolean hasBorders() 
    Indicates if the table has borders.
 public boolean isContent() 
 public boolean isNestable() 
 public boolean isUseVariableBorders() 
    Indicates whether variable width borders are being used. Returns true if setBorderWidthLeft, setBorderWidthRight, setBorderWidthTop, or setBorderWidthBottom has been called.
 public  void normalize() 
    Switches lowerleft with upperright
 public boolean process(ElementListener listener) 
    Processes the element by adding it (or the different parts) to an ElementListener.
 public Rectangle rectangle(float top,
    float bottom) 
    Gets a Rectangle that is altered to fit on the page.
 public Rectangle rotate() 
    Swaps the values of urx and ury and of lly and llx in order to rotate the rectangle.
 public  void setBackgroundColor(Color value) 
    Sets the backgroundcolor of the rectangle.
 public  void setBorder(int value) 
    Enables/Disables the border on the specified sides. The border is specified as an integer bitwise combination of the constants: LEFT, RIGHT, TOP, BOTTOM.
 public  void setBorderColor(Color value) 
    Sets the color of the border.
 public  void setBorderColorBottom(Color value) 
    Sets the value of the border color
 public  void setBorderColorLeft(Color value) 
    Sets the value of the border color
 public  void setBorderColorRight(Color value) 
    Sets the value of the border color
 public  void setBorderColorTop(Color value) 
    Sets the value of the border color
 public  void setBorderWidth(float value) 
    Sets the borderwidth of the table.
 public  void setBorderWidthBottom(float borderWidthBottom) 
    Sets the width of a border
 public  void setBorderWidthLeft(float borderWidthLeft) 
    Sets the width of a border
 public  void setBorderWidthRight(float borderWidthRight) 
    Sets the width of a border
 public  void setBorderWidthTop(float borderWidthTop) 
    Sets the width of a border
 public  void setBottom(float value) 
    Sets the lower left y-coordinate.
 public  void setGrayFill(float value) 
    Sets the grayscale of the rectangle.
 public  void setLeft(float value) 
    Sets the lower left x-coordinate.
 public  void setRight(float value) 
    Sets the upper right x-coordinate.
 public  void setTop(float value) 
    Sets the upper right y-coordinate.
 public  void setUseVariableBorders(boolean useVariableBorders) 
    Sets a parameter indicating if the rectangle has variable borders
 public  void softCloneNonPositionParameters(Rectangle rect) 
    Copies all of the parameters from a Rectangle object except the position.
 public String toString() 
 public int type() 
    Gets the type of the text element.