Class AbstractBorderElement

    • Field Detail

      • UP

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

        public static final int RIGHT
        Constant for a line segment, directing from a center of symbol right the the symbol boundary.
        See Also:
        Constant Field Values
      • DOWN

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

        public static final int LEFT
        Constant for a line segment, directing from a center of symbol left the the symbol boundary.
        See Also:
        Constant Field Values
      • 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 Detail

      • 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 Detail

      • 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
      • convert2Char

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