You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kw...@apache.org on 2024/11/13 09:06:57 UTC

(maven-doxia) 01/01: [DOXIA-760] Clarify table justification semantics and introduce new "JUSTIFY_DEFAULT" alignment

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch feature/clarify-table-justification-default
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git

commit 718d771bcb89c28b8db56ff2e21ee903ea7d1507
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Nov 13 10:06:50 2024 +0100

    [DOXIA-760] Clarify table justification semantics and introduce new
    "JUSTIFY_DEFAULT" alignment
---
 .../src/main/java/org/apache/maven/doxia/sink/Sink.java     | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/Sink.java b/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/Sink.java
index f92e045b..07b3774c 100644
--- a/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/Sink.java
+++ b/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/Sink.java
@@ -121,6 +121,14 @@ public interface Sink extends AutoCloseable {
      */
     int SECTION_LEVEL_6 = 6;
 
+    /**
+     * Default alignment for table cells.
+     * Actual value depends on the implementation.
+     * @see #tableRows(int[], boolean)
+     * @since 2.1.0
+     */
+    int JUSTIFY_DEFAULT = -1;
+
     /**
      * Center alignment for table cells.
      * @see #tableRows(int[], boolean)
@@ -1122,11 +1130,14 @@ public interface Sink extends AutoCloseable {
      * If null a left alignment is assumed by default. If this array
      * has less elements than there are columns in the table then the value of
      * the last array element will be taken as default for the remaining table cells.
-     * @param grid true to provide a grid, false otherwise.
+     * Each element of the array must be one of the following constants:
+     * {@link #JUSTIFY_LEFT}, {@link #JUSTIFY_CENTER}, {@link #JUSTIFY_RIGHT} or {@link #JUSTIFY_DEFAULT}.
+     * @param grid true to render a grid, false otherwise.
      * @see #table(SinkEventAttributes)
      * @see #JUSTIFY_CENTER
      * @see #JUSTIFY_LEFT
      * @see #JUSTIFY_RIGHT
+     * @see #JUSTIFY_DEFAULT
      */
     void tableRows(int[] justification, boolean grid);