Package com.helger.html.hc.html.tabular
Interface IHCTable<IMPLTYPE extends IHCTable<IMPLTYPE>>
-
- Type Parameters:
IMPLTYPE- Implementation type
- All Superinterfaces:
com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>,com.helger.commons.hierarchy.IHasChildren<IHCNode>,com.helger.commons.hierarchy.IHasChildrenRecursive<IHCNode>,com.helger.commons.hierarchy.IHasChildrenSorted<IHCNode>,IHCElement<IMPLTYPE>,IHCHasCSSClasses<IMPLTYPE>,IHCHasCSSStyles<IMPLTYPE>,IHCHasID<IMPLTYPE>,IHCNode,Serializable
- All Known Implementing Classes:
AbstractHCBaseTable,AbstractHCTable,HCTable
public interface IHCTable<IMPLTYPE extends IHCTable<IMPLTYPE>> extends IHCElement<IMPLTYPE>
Base interface for HTML tables- Author:
- Philip Helger
-
-
Field Summary
-
Fields inherited from interface com.helger.html.hc.html.IHCElement
DEFAULT_TABINDEX
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default IMPLTYPEaddBodyClass(ICSSClassProvider aCSSClassProvider)default HCRowaddBodyRow()default IMPLTYPEaddBodyRow(HCRow aRow)default HCRowaddBodyRowAt(int nIndex)Add a body row at the specified index.default IMPLTYPEaddBodyRowAt(int nIndex, HCRow aRow)Add a body row at the specified index.IMPLTYPEaddColumn(IHCCol<?> aCol)Add the specified column.IMPLTYPEaddColumnAt(int nIndex, IHCCol<?> aCol)Add the specified column at the specified index.default IMPLTYPEaddColumns(IHCCol<?> aCol)Deprecated.Use addColumn instead.default IMPLTYPEaddColumns(IHCCol<?>... aCols)Add multiple columns at once.default IMPLTYPEaddColumns(Iterable<? extends IHCCol<?>> aCols)Add multiple columns at once.default IMPLTYPEaddFooterClass(ICSSClassProvider aCSSClassProvider)default HCRowaddFooterRow()default IMPLTYPEaddFooterRow(HCRow aRow)default HCRowaddFooterRowAt(int nIndex)Add a footer row at the specified index.default IMPLTYPEaddFooterRowAt(int nIndex, HCRow aRow)Add a footer row at the specified index.default IMPLTYPEaddHeaderClass(ICSSClassProvider aCSSClassProvider)default HCRowaddHeaderRow()default IMPLTYPEaddHeaderRow(HCRow aRow)default HCRowaddHeaderRowAt(int nIndex)Add a header row at the specified index.default IMPLTYPEaddHeaderRowAt(int nIndex, HCRow aRow)Add a header row at the specified index.default IMPLTYPEaddSpanningBodyContent(IHCNode aNode)default IMPLTYPEaddSpanningBodyContent(String sText)default IMPLTYPEaddSpanningFooterContent(IHCNode aNode)default IMPLTYPEaddSpanningFooterContent(String sText)default IMPLTYPEaddSpanningHeaderContent(IHCNode aNode)default IMPLTYPEaddSpanningHeaderContent(String sText)voidcheckInternalConsistency()default com.helger.commons.collection.impl.ICommonsSet<ICSSClassProvider>getAllBodyClasses()default StringgetAllBodyClassesAsString()default com.helger.commons.collection.impl.ICommonsList<HCRow>getAllBodyRows()default com.helger.commons.collection.impl.ICommonsList<? extends IHCCol<?>>getAllColumns()default com.helger.commons.collection.impl.ICommonsSet<ICSSClassProvider>getAllFooterClasses()default StringgetAllFooterClassesAsString()default com.helger.commons.collection.impl.ICommonsList<HCRow>getAllFooterRows()default com.helger.commons.collection.impl.ICommonsSet<ICSSClassProvider>getAllHeaderClasses()default StringgetAllHeaderClassesAsString()default com.helger.commons.collection.impl.ICommonsList<HCRow>getAllHeaderRows()HCTBodygetBody()default StringgetBodyID()default HCRowgetBodyRowAtIndex(int nIndex)default intgetBodyRowCount()intgetCellPadding()intgetCellSpacing()HCColGroupgetColGroup()intgetColumnCount()default HCRowgetFirstBodyRow()default HCRowgetFirstFooterRow()default HCRowgetFirstHeaderRow()HCTFootgetFoot()default StringgetFooterID()default HCRowgetFooterRowAtIndex(int nIndex)default intgetFooterRowCount()HCTHeadgetHead()default StringgetHeaderID()default HCRowgetHeaderRowAtIndex(int nIndex)default intgetHeaderRowCount()default HCRowgetLastBodyRow()default HCRowgetLastFooterRow()default HCRowgetLastHeaderRow()default booleanhasBodyClasses()default booleanhasBodyID()default booleanhasBodyRows()default booleanhasFooterClasses()default booleanhasFooterID()default booleanhasFooterRows()default booleanhasHeaderClasses()default booleanhasHeaderID()default booleanhasHeaderRows()default IMPLTYPEremoveAllBodyRows()IMPLTYPEremoveAllColumns()Remove all column definitions.default IMPLTYPEremoveAllFooterRows()default IMPLTYPEremoveAllHeaderRows()default IMPLTYPEremoveBodyClass(ICSSClassProvider aCSSClassProvider)default IMPLTYPEremoveBodyRowAt(int nIndex)Remove the body row at the specified index.IMPLTYPEremoveColumnAt(int nColumnIndex)Remove the column definition at the specified index.default IMPLTYPEremoveFooterClass(ICSSClassProvider aCSSClassProvider)default IMPLTYPEremoveFooterRowAt(int nIndex)Remove a footer row at the specified index.default IMPLTYPEremoveHeaderClass(ICSSClassProvider aCSSClassProvider)default IMPLTYPEremoveHeaderRowAt(int nIndex)Remove the header row at the specified index.IMPLTYPEsetBody(HCTBody aBody)default IMPLTYPEsetBodyID(String sID)IMPLTYPEsetCellPadding(int nCellPadding)Set the cell padding.IMPLTYPEsetCellSpacing(int nCellSpacing)Set the cell spacing.IMPLTYPEsetFoot(HCTFoot aFoot)default IMPLTYPEsetFooterID(String sID)IMPLTYPEsetHead(HCTHead aHead)default IMPLTYPEsetHeaderID(String sID)Set the ID of the table head.default IMPLTYPEsetSpanningFooterContent(IHCNode aNode)default IMPLTYPEsetSpanningFooterContent(String sText)default IMPLTYPEsetSpanningHeaderContent(IHCNode aNode)default IMPLTYPEsetSpanningHeaderContent(String sText)default IMPLTYPEsortAllBodyRows(Comparator<? super HCRow> aComparator)default IMPLTYPEsortAllFooterRows(Comparator<? super HCRow> aComparator)default IMPLTYPEsortAllHeaderRows(Comparator<? super HCRow> aComparator)-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildren
forAllChildren, forAllChildren, forAllChildrenBreakable, forAllChildrenMapped, getChildCount, getChildren, hasChildren, hasNoChildren
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildrenRecursive
forAllChildrenRecursive, forAllChildrenRecursive
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildrenSorted
findFirstChild, findFirstChildMapped, getAllChildren, getChildAtIndex, getFirstChild, getLastChild
-
Methods inherited from interface com.helger.html.hc.html.IHCElement
addEventHandler, containsEventHandler, customAttrs, getAccessKey, getContentEditable, getDirection, getDraggable, getElement, getEventHandler, getEventMap, getLanguage, getRole, getTabIndex, getTagName, getTitle, getTranslate, isHidden, isSpellCheck, isTranslateOff, isTranslateOn, isTranslateUndefined, isUnfocusable, prependEventHandler, removeAllEventHandler, setAccessKey, setContentEditable, setDirection, setDraggable, setEventHandler, setHidden, setLanguage, setRole, setSpellCheck, setTabIndex, setTitle, setTranslate, setTranslate, setUnfocusable, withCustomAttrs
-
Methods inherited from interface com.helger.html.hc.html.IHCHasCSSClasses
addClass, addClasses, addClasses, addClasses, containsClass, getAllClasses, getAllClassesAsString, getAllClassNames, hasAnyClass, removeAllClasses, removeClass
-
Methods inherited from interface com.helger.html.hc.html.IHCHasCSSStyles
addStyle, addStyle, addStyles, addStyles, addStyles, containsStyle, getAllStyles, getAllStylesAsString, getAllStyleValues, getStyleValue, hasAnyStyle, hasStyle, removeAllStyles, removeStyle
-
Methods inherited from interface com.helger.html.hc.IHCHasID
ensureID, getID, hasID, hasNoID, setID, setUniqueID
-
Methods inherited from interface com.helger.html.hc.IHCNode
canConvertToMicroNode, consistencyCheck, convertToMicroNode, customizeNode, finalizeNodeState, getNodeState, getPlainText, registerExternalResources
-
-
-
-
Method Detail
-
getCellSpacing
@CheckForSigned int getCellSpacing()
- Returns:
- The cell spacing. Values ≤ 0 mean undefined.
-
setCellSpacing
@Nonnull IMPLTYPE setCellSpacing(int nCellSpacing)
Set the cell spacing.- Parameters:
nCellSpacing- New value. Values ≤ 0 mean undefined.- Returns:
- this
-
getCellPadding
@CheckForSigned int getCellPadding()
- Returns:
- The cell padding. Values ≤ 0 mean undefined.
-
setCellPadding
@Nonnull IMPLTYPE setCellPadding(int nCellPadding)
Set the cell padding.- Parameters:
nCellPadding- New value. Values ≤ 0 mean undefined.- Returns:
- this
-
getColGroup
@Nullable HCColGroup getColGroup()
- Returns:
- The column group used for this table. May be
nullif undefined.
-
getAllColumns
@Nonnull @ReturnsMutableCopy default com.helger.commons.collection.impl.ICommonsList<? extends IHCCol<?>> getAllColumns()
-
addColumn
@Nonnull IMPLTYPE addColumn(@Nullable IHCCol<?> aCol)
Add the specified column.- Parameters:
aCol- The column to be added. May benull.- Returns:
- this
-
addColumnAt
@Nonnull IMPLTYPE addColumnAt(@Nonnegative int nIndex, @Nullable IHCCol<?> aCol)
Add the specified column at the specified index.- Parameters:
nIndex- The index where the column should be added. Must be ≥ 0.aCol- The column to be added. May benull.- Returns:
- this
-
addColumns
@Nonnull @Deprecated(forRemoval=false) @DevelopersNote("Use addColumn") default IMPLTYPE addColumns(@Nullable IHCCol<?> aCol)
Deprecated.Use addColumn instead.Add a single column.- Parameters:
aCol- The column to be added. May benull.- Returns:
- this
-
addColumns
@Nonnull default IMPLTYPE addColumns(@Nullable IHCCol<?>... aCols)
Add multiple columns at once.- Parameters:
aCols- The columns to be added. May benulland may containnullelements.- Returns:
- this
-
addColumns
@Nonnull default IMPLTYPE addColumns(@Nullable Iterable<? extends IHCCol<?>> aCols)
Add multiple columns at once.- Parameters:
aCols- The columns to be added. May benulland may containnullelements.- Returns:
- this
-
removeColumnAt
@Nonnull IMPLTYPE removeColumnAt(@Nonnegative int nColumnIndex)
Remove the column definition at the specified index. This does not affect any row contents.- Parameters:
nColumnIndex- The index of the column to remove- Returns:
- this
-
removeAllColumns
@Nonnull IMPLTYPE removeAllColumns()
Remove all column definitions. This does not affect any row contents.- Returns:
- this
-
getColumnCount
@Nonnegative int getColumnCount()
- Returns:
- The number of columns as specified in the column group. If no column group is defined, 0 is returned.
-
setHeaderID
@Nonnull default IMPLTYPE setHeaderID(@Nullable String sID)
Set the ID of the table head.- Parameters:
sID- The table head ID. May benull-- Returns:
- this
-
hasHeaderID
default boolean hasHeaderID()
- Returns:
trueif a table header ID is present,falseotherwise
-
getAllHeaderClasses
@Nonnull @ReturnsMutableCopy default com.helger.commons.collection.impl.ICommonsSet<ICSSClassProvider> getAllHeaderClasses()
-
addHeaderClass
@Nonnull default IMPLTYPE addHeaderClass(@Nonnull ICSSClassProvider aCSSClassProvider)
-
removeHeaderClass
@Nonnull default IMPLTYPE removeHeaderClass(@Nonnull ICSSClassProvider aCSSClassProvider)
-
hasHeaderClasses
default boolean hasHeaderClasses()
-
hasHeaderRows
default boolean hasHeaderRows()
-
getHeaderRowCount
@Nonnegative default int getHeaderRowCount()
-
getHeaderRowAtIndex
@Nullable default HCRow getHeaderRowAtIndex(@Nonnegative int nIndex)
-
getAllHeaderRows
@Nonnull @ReturnsMutableCopy default com.helger.commons.collection.impl.ICommonsList<HCRow> getAllHeaderRows()
-
addHeaderRowAt
@Nonnull default HCRow addHeaderRowAt(@Nonnegative int nIndex)
Add a header row at the specified index.- Parameters:
nIndex- The index to be used. Should be ≥ 0.- Returns:
- this for chaining
-
addHeaderRowAt
@Nonnull default IMPLTYPE addHeaderRowAt(@Nonnegative int nIndex, @Nullable HCRow aRow)
Add a header row at the specified index.- Parameters:
nIndex- The index to be used. Should be ≥ 0.aRow- The row to be added. May benull.- Returns:
- this for chaining
-
removeHeaderRowAt
@Nonnull default IMPLTYPE removeHeaderRowAt(@Nonnegative int nIndex)
Remove the header row at the specified index.- Parameters:
nIndex- The index to be used. Should be ≥ 0.- Returns:
- this for chaining
-
sortAllHeaderRows
@Nonnull default IMPLTYPE sortAllHeaderRows(@Nonnull Comparator<? super HCRow> aComparator)
-
hasFooterID
default boolean hasFooterID()
- Returns:
trueif a Footer ID is present,falseotherwise
-
getAllFooterClasses
@Nonnull @ReturnsMutableCopy default com.helger.commons.collection.impl.ICommonsSet<ICSSClassProvider> getAllFooterClasses()
-
addFooterClass
@Nonnull default IMPLTYPE addFooterClass(@Nonnull ICSSClassProvider aCSSClassProvider)
-
removeFooterClass
@Nonnull default IMPLTYPE removeFooterClass(@Nonnull ICSSClassProvider aCSSClassProvider)
-
hasFooterClasses
default boolean hasFooterClasses()
-
hasFooterRows
default boolean hasFooterRows()
-
getFooterRowCount
@Nonnegative default int getFooterRowCount()
-
getFooterRowAtIndex
@Nullable default HCRow getFooterRowAtIndex(@Nonnegative int nIndex)
-
getAllFooterRows
@Nonnull @ReturnsMutableCopy default com.helger.commons.collection.impl.ICommonsList<HCRow> getAllFooterRows()
-
addFooterRowAt
@Nonnull default HCRow addFooterRowAt(@Nonnegative int nIndex)
Add a footer row at the specified index.- Parameters:
nIndex- The index to be used. Should be ≥ 0.- Returns:
- this for chaining
-
addFooterRowAt
@Nonnull default IMPLTYPE addFooterRowAt(@Nonnegative int nIndex, @Nullable HCRow aRow)
Add a footer row at the specified index.- Parameters:
nIndex- The index to be used. Should be ≥ 0.aRow- The row to be added. May benull.- Returns:
- this for chaining
-
removeFooterRowAt
@Nonnull default IMPLTYPE removeFooterRowAt(@Nonnegative int nIndex)
Remove a footer row at the specified index.- Parameters:
nIndex- The index to be used. Should be ≥ 0.- Returns:
- this for chaining
-
sortAllFooterRows
@Nonnull default IMPLTYPE sortAllFooterRows(@Nonnull Comparator<? super HCRow> aComparator)
-
hasBodyID
default boolean hasBodyID()
- Returns:
trueif a body ID is present,falseotherwise
-
getAllBodyClasses
@Nonnull @ReturnsMutableCopy default com.helger.commons.collection.impl.ICommonsSet<ICSSClassProvider> getAllBodyClasses()
-
addBodyClass
@Nonnull default IMPLTYPE addBodyClass(@Nonnull ICSSClassProvider aCSSClassProvider)
-
removeBodyClass
@Nonnull default IMPLTYPE removeBodyClass(@Nonnull ICSSClassProvider aCSSClassProvider)
-
hasBodyClasses
default boolean hasBodyClasses()
-
hasBodyRows
default boolean hasBodyRows()
-
getBodyRowCount
@Nonnegative default int getBodyRowCount()
-
getBodyRowAtIndex
@Nullable default HCRow getBodyRowAtIndex(@Nonnegative int nIndex)
-
getAllBodyRows
@Nonnull @ReturnsMutableCopy default com.helger.commons.collection.impl.ICommonsList<HCRow> getAllBodyRows()
-
addBodyRowAt
@Nonnull default HCRow addBodyRowAt(@Nonnegative int nIndex)
Add a body row at the specified index.- Parameters:
nIndex- The index to be used. Should be ≥ 0.- Returns:
- this for chaining
-
addBodyRowAt
@Nonnull default IMPLTYPE addBodyRowAt(@Nonnegative int nIndex, @Nullable HCRow aRow)
Add a body row at the specified index.- Parameters:
nIndex- The index to be used. Should be ≥ 0.aRow- The row to be added. May benull.- Returns:
- this for chaining
-
removeBodyRowAt
@Nonnull default IMPLTYPE removeBodyRowAt(@Nonnegative int nIndex)
Remove the body row at the specified index.- Parameters:
nIndex- The index to be used. Should be ≥ 0.- Returns:
- this for chaining
-
sortAllBodyRows
@Nonnull default IMPLTYPE sortAllBodyRows(@Nonnull Comparator<? super HCRow> aComparator)
-
setSpanningHeaderContent
@Nonnull default IMPLTYPE setSpanningHeaderContent(@Nullable String sText)
-
setSpanningHeaderContent
@Nonnull default IMPLTYPE setSpanningHeaderContent(@Nullable IHCNode aNode)
-
addSpanningHeaderContent
@Nonnull default IMPLTYPE addSpanningHeaderContent(@Nullable String sText)
-
addSpanningHeaderContent
@Nonnull default IMPLTYPE addSpanningHeaderContent(@Nullable IHCNode aNode)
-
setSpanningFooterContent
@Nonnull default IMPLTYPE setSpanningFooterContent(@Nullable String sText)
-
setSpanningFooterContent
@Nonnull default IMPLTYPE setSpanningFooterContent(@Nullable IHCNode aNode)
-
addSpanningFooterContent
@Nonnull default IMPLTYPE addSpanningFooterContent(@Nullable String sText)
-
addSpanningFooterContent
@Nonnull default IMPLTYPE addSpanningFooterContent(@Nullable IHCNode aNode)
-
checkInternalConsistency
void checkInternalConsistency()
-
-