Class CollapsingBorderModel

  • Direct Known Subclasses:
    CollapsingBorderModelEyeCatching

    public abstract class CollapsingBorderModel
    extends java.lang.Object
    This class is a superclass for the two collapsing border models defined in the XSL 1.0 specification.
    • Constructor Detail

      • CollapsingBorderModel

        public CollapsingBorderModel()
    • Method Detail

      • getBorderModelFor

        public static CollapsingBorderModel getBorderModelFor​(int borderCollapse)
        Parameters:
        borderCollapse - border collapse control
        Returns:
        the border model for the cell
      • getOtherSide

        public static int getOtherSide​(int side)
        Parameters:
        side - the side on the current cell
        Returns:
        the adjacent side on the neighbouring cell
      • isVerticalRelation

        protected boolean isVerticalRelation​(int side)
        Parameters:
        side - the side to investigate
        Returns:
        true if the adjacent cell is before or after
      • determineWinner

        public abstract BorderSpecification determineWinner​(BorderSpecification border1,
                                                            BorderSpecification border2,
                                                            boolean discard)
        Returns the border which wins the border conflict resolution. In case the two borders are equivalent (identical, or only the color is different), null is returned.
        Parameters:
        border1 - a border specification
        border2 - another border specification
        discard - true if the .conditionality component of the border width must be taken into account
        Returns:
        the winning border, null if the two borders are equivalent