CollapsingBorderModel (Apache FOP 2.7 API)
Date: 2022-01-12

org.apache.fop.layoutmgr.table

## Class CollapsingBorderModel

- java.lang.Object
- - org.apache.fop.layoutmgr.table.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.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static int` | `AFTER` after side
    `protected static int` | `BEFORE` before side
    `protected static int` | `END` end side
    `protected static int` | `START` start side

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CollapsingBorderModel()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract BorderSpecification` | `determineWinner(BorderSpecification border1, BorderSpecification border2)` Returns the border which wins the border conflict resolution.
    `abstract BorderSpecification` | `determineWinner(BorderSpecification border1, BorderSpecification border2, boolean discard)` Returns the border which wins the border conflict resolution.
    `static CollapsingBorderModel` | `getBorderModelFor(int borderCollapse)`
    `static int` | `getOtherSide(int side)`
    `protected boolean` | `isVerticalRelation(int side)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BEFORE

          protected static final int BEFORE

      before side
      See Also:
        Constant Field Values

    - #### AFTER

          protected static final int AFTER

      after side
      See Also:
        Constant Field Values

    - #### START

          protected static final int START

      start side
      See Also:
        Constant Field Values

    - #### END

          protected static final int END

      end side
      See Also:
        Constant Field Values

  - ### 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

    - #### determineWinner

          public abstract BorderSpecification determineWinner(BorderSpecification border1,
                                                              BorderSpecification border2)

      Returns the border which wins the border conflict resolution. Same as `determineWinner(border1, border2, false)`.
      Parameters:
        `border1` - a border specification
        `border2` - another border specification
      Returns:
        the winning border, null if the two borders are equivalent
      See Also:
        `determineWinner(BorderSpecification,BorderSpecification,boolean)`

Copyright 1999-2022 The Apache Software Foundation. All Rights Reserved.