Class AbstractBorderElement

java.lang.Object
org.apache.fop.render.txt.border.AbstractBorderElement
All Implemented Interfaces:
Constants
Direct Known Subclasses:
DashedBorderElement, DottedBorderElement, SolidAndDoubleBorderElement

public abstract class AbstractBorderElement extends Object implements Constants
This class keeps information about abstract border element, i.e. specifies border element for one text position.
  • Field Details

    • UP

      public static final int UP
      Constant for a line segment, directing from a center of symbol up the the symbol boundary.
      See Also:
    • DOWN

      public static final int DOWN
      Constant for a line segment, directing from a center of symbol down the the symbol boundary.
      See Also:
    • LEFT

      public static final int LEFT
      Constant for a line segment, directing from a center of symbol left the the symbol boundary.
      See Also:
    • data

      protected int[] data
      I-th element of this array specify, if there line from center of symbol to corresponding side (UP, RIGHT, DOWN, LEFT).
  • Constructor Details

    • AbstractBorderElement

      public AbstractBorderElement()
      Initializes a newly created AbstractBorderElement object so that it represents an empty border element.
    • AbstractBorderElement

      public AbstractBorderElement(int type)
      Constructs a newly allocated AbstractBorderElement object. Fills array data using binary representation of type.
      Parameters:
      type - binary representation of type gives data
  • Method Details

    • getData

      public int getData(int side)
      Returns value of side's element of data.
      Parameters:
      side - integer, representing side
      Returns:
      value of side's element
    • setData

      public void setData(int side, int value)
      Sets a value for data[side].
      Parameters:
      side - integer, representing side
      value - a new value for data[side]
    • transformElement

      public void transformElement(TXTState state)
      Transform border element in according with state.
      Parameters:
      state - instance of TXTState
    • merge

      public abstract AbstractBorderElement merge(AbstractBorderElement e)
      Merges with border element.
      Parameters:
      e - instance of AbstractBorderElement
      Returns:
      instance of AbstractBorderElement
    • convert2Char

      public abstract char convert2Char()
      Convert internal representation of border element to char.
      Returns:
      corresponding char