Interface IHCCol<IMPLTYPE extends IHCCol<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:
    AbstractHCCol, HCCol

    public interface IHCCol<IMPLTYPE extends IHCCol<IMPLTYPE>>
    extends IHCElement<IMPLTYPE>
    Base interface for a table column.
    Author:
    Philip Helger
    • Method Detail

      • isStar

        default boolean isStar()
        Returns:
        true if this is a star column (width == "*")
      • getWidth

        @Nullable
        String getWidth()
        Returns:
        The width definition of the column as a string or null if no width is present.
      • setWidth

        @Nonnull
        default IMPLTYPE setWidth​(@Nonnegative
                                  int nWidth)
        Set the width in pixel.
        Parameters:
        nWidth - Pixel width.
        Returns:
        this
      • setWidthPerc

        @Nonnull
        default IMPLTYPE setWidthPerc​(@Nonnegative
                                      double dPerc)
        Set the width in percent.
        Parameters:
        dPerc - percentage width.
        Returns:
        this
      • setWidth

        @Nonnull
        IMPLTYPE setWidth​(@Nullable
                          String sWidth)
        Set the width as string. May either be a pure integer or e.g. a percentage value (like "50%") or "*" for "any".
        Parameters:
        sWidth - The width as a string. May be null.
        Returns:
        this