Class BorderManager

java.lang.Object
org.apache.fop.render.txt.border.BorderManager

public class BorderManager extends Object
This keeps all information about borders for current processed page.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Matrix for storing information about one border element.
    private int
    Height of current processed border.
    private int
    x-coordinate of upper left point of current processed border.
    private int
    y-coordinate of upper left point of current processed border.
    private TXTState
    Stores TXTState for transforming border elements.
    private int
    Width of current processed border.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BorderManager(int pageWidth, int pageHeight, TXTState state)
    Constructs BorderManger, using pageWidth and pageHeight for creating borderInfo.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addBorderElement(int x, int y, int style, int type)
    Adds border element to borderInfo.
    getCharacter(int x, int y)
     
    int
     
    int
     
    int
     
    int
     
    void
    setHeight(int height)
    Sets height of current processed border.
    void
    setStartX(int startX)
    Sets x-coordinate of upper left point of current processed border.
    void
    setStartY(int startY)
    Sets y-coordinate of upper left point of current processed border.
    void
    setWidth(int width)
    Sets width of current processed border.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • borderInfo

      private AbstractBorderElement[][] borderInfo
      Matrix for storing information about one border element.
    • width

      private int width
      Width of current processed border.
    • height

      private int height
      Height of current processed border.
    • startX

      private int startX
      x-coordinate of upper left point of current processed border.
    • startY

      private int startY
      y-coordinate of upper left point of current processed border.
    • state

      private TXTState state
      Stores TXTState for transforming border elements.
  • Constructor Details

    • BorderManager

      public BorderManager(int pageWidth, int pageHeight, TXTState state)
      Constructs BorderManger, using pageWidth and pageHeight for creating borderInfo.
      Parameters:
      pageWidth - page width
      pageHeight - page height
      state - TXTState
  • Method Details

    • addBorderElement

      public void addBorderElement(int x, int y, int style, int type)
      Adds border element to borderInfo.
      Parameters:
      x - x-coordinate
      y - y-coordinate
      style - border-style
      type - border element type, binary representation of wich gives information about availability or absence of corresponding side.
    • getCharacter

      public Character getCharacter(int x, int y)
      Parameters:
      x - x-coordinate
      y - y-coordinate
      Returns:
      if border element at point (x,y) is available, returns instance of Character, created on char, given by corresponding border element, otherwise returns null.
    • getWidth

      public int getWidth()
      Returns:
      width of current processed border.
    • setWidth

      public void setWidth(int width)
      Sets width of current processed border.
      Parameters:
      width - width of border
    • getHeight

      public int getHeight()
      Returns:
      height of current processed border.
    • setHeight

      public void setHeight(int height)
      Sets height of current processed border.
      Parameters:
      height - height of border
    • getStartX

      public int getStartX()
      Returns:
      x-coordinate of upper left point of current processed border.
    • setStartX

      public void setStartX(int startX)
      Sets x-coordinate of upper left point of current processed border.
      Parameters:
      startX - x-coordinate of upper left border's point.
    • getStartY

      public int getStartY()
      Returns:
      y-coordinate of upper left point of current processed border.
    • setStartY

      public void setStartY(int startY)
      Sets y-coordinate of upper left point of current processed border.
      Parameters:
      startY - y-coordinate of upper left border's point.