Class YGLayout.Buffer

All Implemented Interfaces:
Iterable<YGLayout>, Pointer
Enclosing class:
YGLayout

public static class YGLayout.Buffer extends StructBuffer<YGLayout,YGLayout.Buffer>
An array of YGLayout structs.
  • Constructor Details

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new YGLayout.Buffer instance backed by the specified container.

      Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by YGLayout.SIZEOF, and its mark will be undefined.

      The created buffer instance holds a strong reference to the container object.

    • Buffer

      public Buffer(long address, int cap)
  • Method Details

    • positions

      public FloatBuffer positions()
      Returns:
      a FloatBuffer view of the positions field.
    • positions

      public float positions(int index)
      Returns:
      the value at the specified index of the positions field.
    • dimensions

      public FloatBuffer dimensions()
      Returns:
      a FloatBuffer view of the dimensions field.
    • dimensions

      public float dimensions(int index)
      Returns:
      the value at the specified index of the dimensions field.
    • margin

      public FloatBuffer margin()
      Returns:
      a FloatBuffer view of the margin field.
    • margin

      public float margin(int index)
      Returns:
      the value at the specified index of the margin field.
    • border

      public FloatBuffer border()
      Returns:
      a FloatBuffer view of the border field.
    • border

      public float border(int index)
      Returns:
      the value at the specified index of the border field.
    • padding

      public FloatBuffer padding()
      Returns:
      a FloatBuffer view of the padding field.
    • padding

      public float padding(int index)
      Returns:
      the value at the specified index of the padding field.
    • direction

      public int direction()
      Returns:
      the value of the direction field.
    • didUseLegacyFlag

      public boolean didUseLegacyFlag()
      Returns:
      the value of the didUseLegacyFlag field.
    • doesLegacyStretchFlagAffectsLayout

      public boolean doesLegacyStretchFlagAffectsLayout()
      Returns:
      the value of the doesLegacyStretchFlagAffectsLayout field.
    • hadOverflow

      public boolean hadOverflow()
      Returns:
      the value of the hadOverflow field.
    • computedFlexBasisGeneration

      public int computedFlexBasisGeneration()
      Returns:
      the value of the computedFlexBasisGeneration field.
    • computedFlexBasis

      public YGFloatOptional computedFlexBasis()
      Returns:
      a YGFloatOptional view of the computedFlexBasis field.
    • generationCount

      public int generationCount()
      Returns:
      the value of the generationCount field.
    • lastOwnerDirection

      public int lastOwnerDirection()
      Returns:
      the value of the lastOwnerDirection field.
    • nextCachedMeasurementsIndex

      public int nextCachedMeasurementsIndex()
      Returns:
      the value of the nextCachedMeasurementsIndex field.
    • cachedMeasurements

      public YGCachedMeasurement.Buffer cachedMeasurements()
      Returns:
      a YGCachedMeasurement.Buffer view of the cachedMeasurements field.
    • cachedMeasurements

      public YGCachedMeasurement cachedMeasurements(int index)
      Returns:
      a YGCachedMeasurement view of the struct at the specified index of the cachedMeasurements field.
    • measuredDimensions

      public FloatBuffer measuredDimensions()
      Returns:
      a FloatBuffer view of the measuredDimensions field.
    • measuredDimensions

      public float measuredDimensions(int index)
      Returns:
      the value at the specified index of the measuredDimensions field.
    • cachedLayout

      public YGCachedMeasurement cachedLayout()
      Returns:
      a YGCachedMeasurement view of the cachedLayout field.