You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2021/01/26 19:20:39 UTC
[myfaces-tobago] 02/02: Update/fix docs
This is an automated email from the ASF dual-hosted git repository.
hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit a5e338355b9d450c09b28f65a6f782e4e423bf87
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Tue Jan 26 09:55:30 2021 +0100
Update/fix docs
---
.../taglib/component/GridLayoutTagDeclaration.java | 61 +++-------------------
.../taglib/declaration/HasColumnLayout.java | 13 +++--
.../internal/taglib/declaration/HasRowLayout.java | 13 +++--
3 files changed, 24 insertions(+), 63 deletions(-)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/GridLayoutTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/GridLayoutTagDeclaration.java
index 97866e5..2a36813 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/GridLayoutTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/GridLayoutTagDeclaration.java
@@ -33,65 +33,16 @@ import org.apache.myfaces.tobago.internal.taglib.declaration.HasSpacing;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
/**
- * <p>
- * WARNING: This component is preliminary and may be changed without a major release.
- * </p>
- *
- * Renders a GridLayout.
+ * Renders a grid-layout. The grid is defined by the columns and rows attributes. You can adjust the
+ * widths of the columns and rows by value of the tokens. The number of tokens describe the number of
+ * columns and rows.
* <pre>
* columns/rows ::= LAYOUT
* LAYOUT ::= TOKEN [" " TOKEN]+
- * TOKEN ::= AUTO | PIXEL | PROPORTIONAL
- * AUTO ::= "auto" | "fixed"
- * PIXEL ::= NUMBER "px"
- * PROPORTIONAL ::= NUMBER "fr"
+ * TOKEN ::= "auto" | MEASURE | FRACTION
+ * MEASURE ::= [NUMBER] ("px" | "em" | "ex" | "rem" | ...)
+ * FRACTION ::= [POSITIVE_INTEGER] "fr"
* </pre>
- * <table border="1">
- * <caption>GridLayout</caption>
- * <tr>
- * <th>Parent</th>
- * <th>Child</th>
- * <th>Okay?</th>
- * <th>Remarks</th>
- * </tr>
- * <tr>
- * <td>AUTO</td>
- * <td>any combination of AUTO or PIXEL but no PROPORTIONAL</td>
- * <td>okay</td>
- * <td>-</td>
- * </tr>
- * <tr>
- * <td>AUTO</td>
- * <td>any combination with at least one PROPORTIONAL</td>
- * <td>wrong</td>
- * <td>Layout manager cannot compute the auto value.</td>
- * </tr>
- * <tr>
- * <td>PIXEL</td>
- * <td>any combination of AUTO or PIXEL but no PROPORTIONAL</td>
- * <td>potentially wrong</td>
- * <td>The values depend on each other, the programmer has to keep consistency manually.</td>
- * </tr>
- * <tr>
- * <td>PIXEL</td>
- * <td>any combination with at least one PROPORTIONAL</td>
- * <td>okay</td>
- * <td>-</td>
- * </tr>
- * <tr>
- * <td>PROPORTIONAL</td>
- * <td>any combination of AUTO or PIXEL but no PROPORTIONAL</td>
- * <td>potentially wrong</td>
- * <td>No automatic matching:<ul><li>too little space: scroll bar</li>
- * <li>too much space: elements will be spread.</li></ul></td>
- * </tr>
- * <tr>
- * <td>PROPORTIONAL</td>
- * <td>any combination with at least one PROPORTIONAL</td>
- * <td>okay</td>
- * <td>-</td>
- * </tr>
- * </table>
*/
@Preliminary
@Tag(name = "gridLayout")
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasColumnLayout.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasColumnLayout.java
index 346d987..9797b05 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasColumnLayout.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasColumnLayout.java
@@ -24,12 +24,17 @@ import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
public interface HasColumnLayout {
/**
+ * <p>
* This value defines the layout constraints for column layout.
- * It is a semicolon separated list of layout tokens '[<n>]*', '<n>px' or 'auto'.
- * Where <n> is a non negative integer and the square brackets means optional.
- * Example: '2*;*;100px;auto'.
+ * It is a space separated list of layout tokens '<n>fr', '<measure>' or the keyword 'auto'.
+ * Where <n> is a positive integer and <measure> is a valid CSS length.
+ * Example: '2fr 1fr 100px 3rem auto'.
+ * </p>
+ * <p>
+ * Deprecated: The old syntax for "2fr" is "2*". The old name for "auto" is "fixed".
+ * </p>
*/
@TagAttribute
- @UIComponentTagAttribute(defaultValue = "1*")
+ @UIComponentTagAttribute(defaultValue = "1fr")
void setColumns(String columns);
}
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasRowLayout.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasRowLayout.java
index 4e400b4..eb57f93 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasRowLayout.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasRowLayout.java
@@ -24,12 +24,17 @@ import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
public interface HasRowLayout {
/**
+ * <p>
* This value defines the layout constraints for row layout.
- * It is a semicolon separated list of layout tokens '[<n>]*', '<n>px' or 'auto'.
- * Where <n> is a non negative integer and the square brackets means optional.
- * Example: '2*;*;100px;auto'.
+ * It is a space separated list of layout tokens '<n>fr', '<measure>' or the keyword 'auto'.
+ * Where <n> is a positive integer and <measure> is a valid CSS length.
+ * Example: '2fr 1fr 100px 3rem auto'.
+ * </p>
+ * <p>
+ * Deprecated: The old syntax for "2fr" is "2*". The old name for "auto" is "fixed".
+ * </p>
*/
@TagAttribute
- @UIComponentTagAttribute(defaultValue = "1*")
+ @UIComponentTagAttribute(defaultValue = "1fr")
void setRows(String rows);
}