Top Fields Constructors Methods
com.vladsch.flexmark.util.format

public Class TableCellOffsetInfo

extends Object
Class Inheritance
Imports
com.vladsch.flexmark.util.collection.BoundedMaxAggregator, .BoundedMinAggregator, com.vladsch.flexmark.util.sequence.BasedSequence, java.util.HashMap, .List, .Map, java.util.function.BiFunction

Field Summary

Modifier and TypeField and Description
public final int
private static final HashMap<TableSectionType, Integer>
public final Integer
public final Integer
public final int
public final int
public static final int
public static final int
public final TableSection
public final MarkdownTable
public final TableCell
public final TableRow
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
public
TableCellOffsetInfo(int offset, MarkdownTable table, TableSection section, TableRow tableRow, TableCell tableCell, int row, int column, Integer insideColumn, Integer insideOffset)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public TableCell
public TableCell
getPreviousCell(int offset)

public TableCell
getPreviousCell(TableRow tableRow, int offset)

private static int

Returns:

stop point found or -1 if not found
getStopOffset
(int
current offset
offset
,
MarkdownTable
for table
table
,
Map<TableSectionType, Integer>
map of stop points by section or null for default
stopPointsMap
,
boolean
true if next offset stop point, false for previous stop point of interest
nextOffset
)

Return the next/previous stop point of interest

Note

not terribly efficient because it goes through all cells of all rows.

private static boolean
haveRowEnd(int flags)

private static boolean
haveRowStart(int flags)

private static boolean
haveStopPoint(int flags, int mask)

private static boolean
haveTextEnd(int flags)

private static boolean
haveTextStart(int flags)

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public TableCellOffsetInfo

Returns:

offset in previous cell or null
nextCellOffset
(Integer
offset inside the cell, null if same as th
insideOffset
)

Only available if tableRow/tableCell are set and not in first cell of first row

Caution

NOT TESTED

public TableCellOffsetInfo

Returns:

next stop point offset or offset after end of table
nextOffsetStop
(Map<TableSectionType, Integer>
stop points of interest map by section or null
stopPointsMap
)

Available if somewhere in table

public TableCellOffsetInfo

Returns:

offset in previous cell or null
nextRowOffset
(Integer
offset inside the cell, null if same as th
insideOffset
)

Only available if not at last row

Caution

NOT TESTED

public TableCellOffsetInfo

Returns:

offset in previous cell or null
previousCellOffset
(Integer
offset inside the cell, null if same as the current cell inside offset
insideOffset
)

Only available if inside are set and not in first cell of first row

Caution

NOT TESTED

public TableCellOffsetInfo

Returns:

previous stop point offset or start of table offset
previousOffsetStop
(Map<TableSectionType, Integer>
stop points of interest map by section or null for default
stopPointsMap
)

Available if somewhere in table

public TableCellOffsetInfo

Returns:

offset in previous cell or null
previousRowOffset
(Integer
offset inside the cell, null if same as th
insideOffset
)

Only available if not at row 0

Caution

NOT TESTED

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

columnback to summary
public final int column
DEFAULT_STOP_POINTS_MAPback to summary
private static final HashMap<TableSectionType, Integer> DEFAULT_STOP_POINTS_MAP
insideColumnback to summary
public final Integer insideColumn
insideOffsetback to summary
public final Integer insideOffset
offsetback to summary
public final int offset
rowback to summary
public final int row
ROW_ENDback to summary
public static final int ROW_END
ROW_STARTback to summary
public static final int ROW_START
sectionback to summary
public final TableSection section
tableback to summary
public final MarkdownTable table
tableCellback to summary
public final TableCell tableCell
tableRowback to summary
public final TableRow tableRow
TEXT_ENDback to summary
public static final int TEXT_END
TEXT_STARTback to summary
public static final int TEXT_START

Constructor Detail

TableCellOffsetInfoback to summary
public TableCellOffsetInfo(int offset, MarkdownTable table, TableSection section, TableRow tableRow, TableCell tableCell, int row, int column, Integer insideColumn, Integer insideOffset)

Method Detail

canDeleteColumnback to summary
public boolean canDeleteColumn()
canDeleteRowback to summary
public boolean canDeleteRow()
getInsideColumnback to summary
public boolean getInsideColumn()
getPreviousCellback to summary
public TableCell getPreviousCell()
getPreviousCellback to summary
public TableCell getPreviousCell(int offset)
getPreviousCellback to summary
public TableCell getPreviousCell(TableRow tableRow, int offset)
getStopOffsetback to summary
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:int

current offset

table:MarkdownTable

for table

stopPointsMap:Map<TableSectionType, Integer>

map of stop points by section or null for default

nextOffset:boolean

true if next offset stop point, false for previous stop point of interest

Returns:int

stop point found or -1 if not found

haveRowEndback to summary
private static boolean haveRowEnd(int flags)
haveRowStartback to summary
private static boolean haveRowStart(int flags)
haveStopPointback to summary
private static boolean haveStopPoint(int flags, int mask)
haveTextEndback to summary
private static boolean haveTextEnd(int flags)
haveTextStartback to summary
private static boolean haveTextStart(int flags)
isAfterCaptionback to summary
public boolean isAfterCaption()
isAfterCellsback to summary
public boolean isAfterCells()
isBeforeCaptionback to summary
public boolean isBeforeCaption()
isBeforeCellsback to summary
public boolean isBeforeCells()
isCaptionLineback to summary
public boolean isCaptionLine()
isFirstCellback to summary
public boolean isFirstCell()
isInCellSpanback to summary
public boolean isInCellSpan()
isInsideCaptionback to summary
public boolean isInsideCaption()
isInsideCellback to summary
public boolean isInsideCell()
isLastCellback to summary
public boolean isLastCell()
isLastRowback to summary
public boolean isLastRow()
isSeparatorLineback to summary
public boolean isSeparatorLine()
nextCellOffsetback to summary
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:Integer

offset inside the cell, null if same as th

Returns:TableCellOffsetInfo

offset in previous cell or null

nextOffsetStopback to summary
public TableCellOffsetInfo nextOffsetStop(Map<TableSectionType, Integer> stopPointsMap)

Available if somewhere in table

Parameters
stopPointsMap:Map<TableSectionType, Integer>

stop points of interest map by section or null

Returns:TableCellOffsetInfo

next stop point offset or offset after end of table

nextRowOffsetback to summary
public TableCellOffsetInfo nextRowOffset(Integer insideOffset)

Only available if not at last row

Caution

NOT TESTED

Parameters
insideOffset:Integer

offset inside the cell, null if same as th

Returns:TableCellOffsetInfo

offset in previous cell or null

previousCellOffsetback to summary
public TableCellOffsetInfo previousCellOffset(Integer insideOffset)

Only available if inside are set and not in first cell of first row

Caution

NOT TESTED

Parameters
insideOffset:Integer

offset inside the cell, null if same as the current cell inside offset

Returns:TableCellOffsetInfo

offset in previous cell or null

previousOffsetStopback to summary
public TableCellOffsetInfo previousOffsetStop(Map<TableSectionType, Integer> stopPointsMap)

Available if somewhere in table

Parameters
stopPointsMap:Map<TableSectionType, Integer>

stop points of interest map by section or null for default

Returns:TableCellOffsetInfo

previous stop point offset or start of table offset

previousRowOffsetback to summary
public TableCellOffsetInfo previousRowOffset(Integer insideOffset)

Only available if not at row 0

Caution

NOT TESTED

Parameters
insideOffset:Integer

offset inside the cell, null if same as th

Returns:TableCellOffsetInfo

offset in previous cell or null

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override