Class TableCellOffsetInfo

java.lang.Object
com.vladsch.flexmark.util.format.TableCellOffsetInfo

public class TableCellOffsetInfo extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • isCaptionLine

      public boolean isCaptionLine()
    • isSeparatorLine

      public boolean isSeparatorLine()
    • isInsideCaption

      public boolean isInsideCaption()
    • isAfterCaption

      public boolean isAfterCaption()
    • isBeforeCaption

      public boolean isBeforeCaption()
    • isInsideCell

      public boolean isInsideCell()
    • getInsideColumn

      public boolean getInsideColumn()
    • isBeforeCells

      public boolean isBeforeCells()
    • getPreviousCell

      public TableCell getPreviousCell()
    • getPreviousCell

      public TableCell getPreviousCell(int offset)
    • getPreviousCell

      public TableCell getPreviousCell(TableRow tableRow, int offset)
    • isInCellSpan

      public boolean isInCellSpan()
    • isAfterCells

      public boolean isAfterCells()
    • canDeleteColumn

      public boolean canDeleteColumn()
    • canDeleteRow

      public boolean canDeleteRow()
    • isFirstCell

      public boolean isFirstCell()
    • isLastCell

      public boolean isLastCell()
    • isLastRow

      public boolean isLastRow()
    • previousCellOffset

      public TableCellOffsetInfo previousCellOffset(Integer insideOffset)
      Only available if inside are set and not in first cell of first row

      CAUTION: NOT TESTED

      Parameters:
      insideOffset - offset inside the cell, null if same as the current cell inside offset
      Returns:
      offset in previous cell or null
    • nextCellOffset

      public TableCellOffsetInfo nextCellOffset(Integer insideOffset)
      Only available if tableRow/tableCell are set and not in first cell of first row

      CAUTION: NOT TESTED

      Parameters:
      insideOffset - offset inside the cell, null if same as th
      Returns:
      offset in previous cell or null
    • previousRowOffset

      public TableCellOffsetInfo previousRowOffset(Integer insideOffset)
      Only available if not at row 0

      CAUTION: NOT TESTED

      Parameters:
      insideOffset - offset inside the cell, null if same as th
      Returns:
      offset in previous cell or null
    • nextRowOffset

      public TableCellOffsetInfo nextRowOffset(Integer insideOffset)
      Only available if not at last row

      CAUTION: NOT TESTED

      Parameters:
      insideOffset - offset inside the cell, null if same as th
      Returns:
      offset in previous cell or null
    • nextOffsetStop

      public TableCellOffsetInfo nextOffsetStop(Map<TableSectionType,Integer> stopPointsMap)
      Available if somewhere in table
      Parameters:
      stopPointsMap - stop points of interest map by section or null
      Returns:
      next stop point offset or offset after end of table
    • previousOffsetStop

      public TableCellOffsetInfo previousOffsetStop(Map<TableSectionType,Integer> stopPointsMap)
      Available if somewhere in table
      Parameters:
      stopPointsMap - stop points of interest map by section or null for default
      Returns:
      previous stop point offset or start of table offset
    • haveStopPoint

      private static boolean haveStopPoint(int flags, int mask)
    • haveRowStart

      private static boolean haveRowStart(int flags)
    • haveRowEnd

      private static boolean haveRowEnd(int flags)
    • haveTextStart

      private static boolean haveTextStart(int flags)
    • haveTextEnd

      private static boolean haveTextEnd(int flags)
    • getStopOffset

      private static int getStopOffset(int offset, MarkdownTable table, Map<TableSectionType,Integer> stopPointsMap, boolean nextOffset)
      Return the next/previous stop point of interest

      NOTE: not terribly efficient because it goes through all cells of all rows. Only intended for UI use where this is not an issue since it is done per user key

      Parameters:
      offset - current offset
      table - for table
      stopPointsMap - map of stop points by section or null for default
      nextOffset - true if next offset stop point, false for previous stop point of interest
      Returns:
      stop point found or -1 if not found
    • toString

      public String toString()
      Overrides:
      toString in class Object