Class NTxOverflow

java.lang.Object
net.thevpc.ntexup.api.document.style.NTxOverflow

public final class NTxOverflow extends Object
Declarative policy for the parts of a node's painting that leave its own layout box. Resolved from the NTxPropName.OVERFLOW property (with the NTxPropName.OVERFLOW_MARGIN and NTxPropName.OVERFLOW_FADE modifiers) and applied centrally by the engine, so any node type can opt in without writing custom code.

The crop box is the node's own bounds inflated on each side by the configured margin. A positive margin lets a controlled amount of overflow be shown; a negative one insets the crop inside the bounds.

Overflow is purely visual: like CSS overflow it never changes the node's measured size or position.

  • Field Details

    • VISIBLE

      public static final NTxOverflow VISIBLE
      Shared no-op instance: nothing is cropped.
  • Constructor Details

    • NTxOverflow

      public NTxOverflow(NTxOverflow.Mode mode, double top, double right, double bottom, double left, double fadeTop, double fadeRight, double fadeBottom, double fadeLeft)
  • Method Details

    • mode

      public NTxOverflow.Mode mode()
    • isVisible

      public boolean isVisible()
    • isFade

      public boolean isFade()
    • top

      public double top()
    • right

      public double right()
    • bottom

      public double bottom()
    • left

      public double left()
    • fadeTop

      public double fadeTop()
    • fadeRight

      public double fadeRight()
    • fadeBottom

      public double fadeBottom()
    • fadeLeft

      public double fadeLeft()
    • clipShape

      public Shape clipShape(NTxBounds2D bounds)
      The rectangle the node is cropped to: its bounds inflated by the margins.
    • clipBounds

      public NTxBounds2D clipBounds(NTxBounds2D bounds)
      Same as clipShape(NTxBounds2D) but as bounds.