Home » iText-2.1.7 » com.lowagie » text » [javadoc | source]
com.lowagie.text
public class: Rectangle [javadoc | source]
java.lang.Object
   com.lowagie.text.Rectangle

All Implemented Interfaces:
    Element

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  Color backgroundColor    This is the color of the background of this rectangle. 
protected  int border    This represents the status of the 4 sides of the rectangle. 
protected  boolean useVariableBorders    Whether variable width/color borders are used. 
protected  float borderWidth    This is the width of the border around this rectangle. 
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 borderColor    The color of the 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:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.Rectangle Detail:
 public  void cloneNonPositionParameters(Rectangle rect) 
    Copies each of the parameters, except the position, from a Rectangle object
 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 the bottom border.
 public Color getBorderColorLeft() 
    Gets the color of the left border.
 public Color getBorderColorRight() 
    Gets the color of the right border.
 public Color getBorderColorTop() 
    Gets the color of the top border.
 public float getBorderWidth() 
    Gets the borderwidth.
 public float getBorderWidthBottom() 
    Gets the width of the bottom border.
 public float getBorderWidthLeft() 
    Gets the width of the left border.
 public float getBorderWidthRight() 
    Gets the width of the right border.
 public float getBorderWidthTop() 
    Gets the width of the top 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 whether the specified type of border is set.
 public boolean hasBorders() 
    Indicates whether some type of border is set.
 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() 
    Normalizes the rectangle. Switches lower left with upper right if necessary.
 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() 
    Rotates the rectangle. Swaps the values of llx and lly and of urx and ury.
 public  void setBackgroundColor(Color backgroundColor) 
    Sets the backgroundcolor of the rectangle.
 public  void setBorder(int border) 
    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 borderColor) 
    Sets the color of the border.
 public  void setBorderColorBottom(Color borderColorBottom) 
    Sets the color of the bottom border.
 public  void setBorderColorLeft(Color borderColorLeft) 
    Sets the color of the left border.
 public  void setBorderColorRight(Color borderColorRight) 
    Sets the color of the right border.
 public  void setBorderColorTop(Color borderColorTop) 
    Sets the color of the top border.
 public  void setBorderWidth(float borderWidth) 
    Sets the borderwidth of the table.
 public  void setBorderWidthBottom(float borderWidthBottom) 
    Sets the width of the bottom border.
 public  void setBorderWidthLeft(float borderWidthLeft) 
    Sets the width of the left border.
 public  void setBorderWidthRight(float borderWidthRight) 
    Sets the width of the right border.
 public  void setBorderWidthTop(float borderWidthTop) 
    Sets the width of the top border.
 public  void setBottom(float lly) 
    Sets the lower left y-coordinate.
 public  void setGrayFill(float value) 
    Sets the the background color to a grayscale value.
 public  void setLeft(float llx) 
    Sets the lower left x-coordinate.
 public  void setRight(float urx) 
    Sets the upper right x-coordinate.
 public  void setTop(float ury) 
    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 each of the parameters, except the position, from a Rectangle object if the value is set there
 public String toString() 
 public int type() 
    Gets the type of the text element.