Interface ColumnFormatMetrics

    • Method Detail

      • withEscapeCode

        default ColumnFormatMetrics withEscapeCode​(java.lang.String aEscapeCode)
        Sets an ANSI Escape-Code for the header and the rows and returns this ColumnFormatMetrics instance as of the Builder-Pattern. In case an ANSI Escape-Code is set, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Parameters:
        aEscapeCode - The String to be used for ANSI escaping.
        Returns:
        This ColumnFormatMetrics instance to continue configuration.
      • withEscapeCodeFactory

        default ColumnFormatMetrics withEscapeCodeFactory​(EscapeCodeFactory aEscapeCodeFactory)
        Sets an ANSI Escape-Code factory for the header and the rows and returns this ColumnFormatMetrics instance as of the Builder-Pattern. In case an ANSI Escape-Code has been determined by the EscapeCodeFactory, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Parameters:
        aEscapeCodeFactory - The EscapeCodeFactory to be used for determining ANSI escaping.
        Returns:
        This ColumnFormatMetrics instance to continue configuration.
      • setEscapeCodeFactory

        default void setEscapeCodeFactory​(EscapeCodeFactory aEscapeCodeFactory)
        Sets an ANSI Escape-Code factory for the header and the rows. In case an ANSI Escape-Code has been determined by the EscapeCodeFactory, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Parameters:
        aEscapeCodeFactory - The EscapeCodeFactory to be used for determining ANSI escaping.
      • withHeaderEscapeCodeFactory

        default ColumnFormatMetrics withHeaderEscapeCodeFactory​(EscapeCodeFactory aEscapeCodeFactory)
        Sets an ANSI Escape-Code factory for the header and the rows and returns this ColumnFormatMetrics instance as of the Builder-Pattern. In case an ANSI Escape-Code has been determined by the EscapeCodeFactory, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Parameters:
        aEscapeCodeFactory - The EscapeCodeFactory to be used for determining ANSI escaping.
        Returns:
        the column format metrics
      • setHeaderEscapeCodeFactory

        void setHeaderEscapeCodeFactory​(EscapeCodeFactory aEscapeCodeFactory)
        Sets an ANSI Escape-Code factory for the header. In case an ANSI Escape-Code is set, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Parameters:
        aEscapeCodeFactory - The EscapeCodeFactory to be used for determining ANSI escaping.
      • getHeaderEscapeCodeFactory

        EscapeCodeFactory getHeaderEscapeCodeFactory​()
        Gets the ANSI Escape-Code factory for the header. In case an ANSI Escape-Code is set, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Returns:
        The EscapeCodeFactory to be used for determining ANSI escaping.
      • toHeaderEscapeCode

        java.lang.String toHeaderEscapeCode​(java.lang.Object aIdentifier)
        Determines the ANSI Escape-Code by evaluating the provided ID: If an EscapeCodeFactory has been set via setEscapeCodeFactory(EscapeCodeFactory) and the factory returns a value different to null, then this value is returned. Else the value returned by getHeaderEscapeCode() is returned as fallback.
        Parameters:
        aIdentifier - The ID for which to lookup an Escape-Code.
        Returns:
        The identified Escape-Code or null if none was identifiable.
      • withRowEscapeCodeFactory

        default ColumnFormatMetrics withRowEscapeCodeFactory​(EscapeCodeFactory aEscapeCodeFactory)
        Sets an ANSI Escape-Code factory for the row and the rows and returns this ColumnFormatMetrics instance as of the Builder-Pattern. In case an ANSI Escape-Code has been determined by the EscapeCodeFactory, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Parameters:
        aEscapeCodeFactory - The EscapeCodeFactory to be used for determining ANSI escaping.
        Returns:
        the column format metrics
      • setRowEscapeCodeFactory

        void setRowEscapeCodeFactory​(EscapeCodeFactory aEscapeCodeFactory)
        Sets an ANSI Escape-Code factory for the row. In case an ANSI Escape-Code is set, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Parameters:
        aEscapeCodeFactory - The EscapeCodeFactory to be used for determining ANSI escaping. configuration.
      • getRowEscapeCodeFactory

        EscapeCodeFactory getRowEscapeCodeFactory​()
        Gets the ANSI Escape-Code factory for the row. In case an ANSI Escape-Code is set, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Returns:
        The EscapeCodeFactory to be used for determining ANSI escaping.
      • toRowEscapeCode

        java.lang.String toRowEscapeCode​(java.lang.Object aIdentifier)
        Determines the ANSI Escape-Code by evaluating the provided ID: If an EscapeCodeFactory has been set via setEscapeCodeFactory(EscapeCodeFactory) and the factory returns a value different to null, then this value is returned. Else the value returned by getRowEscapeCode() is returned as fallback.
        Parameters:
        aIdentifier - The ID for which to lookup an Escape-Code.
        Returns:
        The identified Escape-Code or null if none was identifiable.
      • setEscapeCode

        default void setEscapeCode​(java.lang.String aEscapeCode)
        Sets an ANSI Escape-Code for the header and the rows. In case an ANSI Escape-Code is set, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Parameters:
        aEscapeCode - The String to be used for ANSI escaping.
      • withHeaderEscapeCode

        default ColumnFormatMetrics withHeaderEscapeCode​(java.lang.String aEscapeCode)
        Sets an ANSI Escape-Code for the header and returns this ColumnFormatMetrics instance as of the Builder-Pattern. In case an ANSI Escape-Code is set, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Parameters:
        aEscapeCode - The String to be used for ANSI escaping.
        Returns:
        This ColumnFormatMetrics instance to continue configuration.
      • setHeaderEscapeCode

        void setHeaderEscapeCode​(java.lang.String aEscapeCode)
        Sets an ANSI Escape-Code for the header. In case an ANSI Escape-Code is set, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Parameters:
        aEscapeCode - The String to be used for ANSI escaping.
      • getHeaderEscapeCode

        java.lang.String getHeaderEscapeCode​()
        Returns the ANSI Escape-Code for the header. In case an ANSI Escape-Code is set, then the ANSI Escape-Code is prepended and an ANSI Reset-Code is appended to the according text being printed.
        Returns:
        The String to be used for ANSI escaping.
      • withRowEscapeCode

        default ColumnFormatMetrics withRowEscapeCode​(java.lang.String aEscapeCode)
        Sets an ANSI Escape-Code for the rows and returns this ColumnFormatMetrics instance as of the Builder-Pattern. The latest ANSI Escape-Code being set wins.
        Parameters:
        aEscapeCode - The String to be used for ANSI escaping.
        Returns:
        This ColumnFormatMetrics instance to continue configuration.
      • setRowEscapeCode

        void setRowEscapeCode​(java.lang.String aEscapeCode)
        Sets an ANSI Escape-Code for the rows and returns this ColumnFormatMetrics instance as of the Builder-Pattern. The latest ANSI Escape-Code being set wins.
        Parameters:
        aEscapeCode - The String to be used for ANSI escaping.
      • getRowEscapeCode

        java.lang.String getRowEscapeCode​()
        Returns the ANSI Escape-Code for the rows and returns this ColumnFormatMetrics instance as of the Builder-Pattern. The latest ANSI Escape-Code being set wins.
        Returns:
        The String to be used for ANSI escaping.
      • withColumnWidth

        default ColumnFormatMetrics withColumnWidth​(int aColumnWidth)
        Specified by:
        withColumnWidth in interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<ColumnWidthMetrics>
      • setHeaderHorizAlignTextMode

        void setHeaderHorizAlignTextMode​(HorizAlignTextMode aHorizAlignTextMode)
        Sets an alignment mode for the header.
        Parameters:
        aHorizAlignTextMode - The HorizAlignTextMode to be used for aligning the text.
      • getHeaderHorizAlignTextMode

        HorizAlignTextMode getHeaderHorizAlignTextMode​()
        Gets the alignment mode for the header.
        Returns:
        The HorizAlignTextMode to be used for aligning the text.
      • setRowHorizAlignTextMode

        void setRowHorizAlignTextMode​(HorizAlignTextMode aHorizAlignTextMode)
        Sets an alignment mode for the row.
        Parameters:
        aHorizAlignTextMode - The HorizAlignTextMode to be used for aligning the text.
      • setHeaderMoreTextMode

        void setHeaderMoreTextMode​(MoreTextMode aMoreTextMode)
        Sets a more-text mode for the header.
        Parameters:
        aMoreTextMode - The MoreTextMode to be used for truncating the text.
      • getHeaderMoreTextMode

        MoreTextMode getHeaderMoreTextMode​()
        Gets the alignment mode for the header.
        Returns:
        The MoreTextMode to be used for truncating the text.
      • setRowMoreTextMode

        void setRowMoreTextMode​(MoreTextMode aMoreTextMode)
        Sets a more-text mode for the row.
        Parameters:
        aMoreTextMode - The MoreTextMode to be used for truncating the text.
      • getRowMoreTextMode

        MoreTextMode getRowMoreTextMode​()
        Gets the alignment mode for the row.
        Returns:
        The MoreTextMode to be used for truncating the text.
      • setHeaderSplitTextMode

        void setHeaderSplitTextMode​(SplitTextMode aSplitTextMode)
        Sets the SplitTextMode for the header.
        Parameters:
        aSplitTextMode - The SplitTextMode to be set for the header;
      • fromColumnFormatMetrics

        default void fromColumnFormatMetrics​(ColumnFormatMetrics aColumnFormatMetrics)
        From column format metrics.
        Parameters:
        aColumnFormatMetrics - the column format metrics