You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2018/07/29 19:35:59 UTC
[royale-asjs] branch develop updated: SimpleTable fixes and add
centered text
This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 9b54e87 SimpleTable fixes and add centered text
9b54e87 is described below
commit 9b54e87a079de7a8511b4f97035ec08ceb8d60e0
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Jul 29 21:35:55 2018 +0200
SimpleTable fixes and add centered text
---
.../src/main/royale/TablePlayGround.mxml | 39 +++++++++++++++++++---
.../projects/Jewel/src/main/resources/defaults.css | 5 ---
.../royale/org/apache/royale/jewel/SimpleTable.as | 2 +-
.../Jewel/src/main/sass/components/_table.sass | 9 ++---
4 files changed, 41 insertions(+), 14 deletions(-)
diff --git a/examples/royale/JewelExample/src/main/royale/TablePlayGround.mxml b/examples/royale/JewelExample/src/main/royale/TablePlayGround.mxml
index f4d6ab4..181d994 100644
--- a/examples/royale/JewelExample/src/main/royale/TablePlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/TablePlayGround.mxml
@@ -26,7 +26,7 @@ limitations under the License.
<js:ContainerDataBinding/>
</j:beads>
- <j:Card width="500">
+ <j:Card width="550">
<html:H3 text="Jewel Table"/>
<j:SimpleTable>
@@ -38,6 +38,9 @@ limitations under the License.
<j:TableHeader width="140">
<j:Label text="Text Column" />
</j:TableHeader>
+ <j:TableHeader width="140">
+ <j:Label text="Centered Text Column" />
+ </j:TableHeader>
<j:TableHeader>
<j:Label text="Number Column">
<j:beads>
@@ -53,7 +56,14 @@ limitations under the License.
<js:FontIcon text="{MaterialIconType.INSERT_DRIVE_FILE}" material="true"/>
</j:TableCell>
<j:TableCell>
- <j:Label text="Some Text" />
+ <j:Label text="Some text" />
+ </j:TableCell>
+ <j:TableCell>
+ <j:Label text="Some centered text">
+ <j:beads>
+ <j:TextAlign align="center"/>
+ </j:beads>
+ </j:Label>
</j:TableCell>
<j:TableCell>
<j:Label text="71">
@@ -68,7 +78,14 @@ limitations under the License.
<js:FontIcon text="{MaterialIconType.INSERT_DRIVE_FILE}" material="true"/>
</j:TableCell>
<j:TableCell>
- <j:Label text="More Text" />
+ <j:Label text="More text" />
+ </j:TableCell>
+ <j:TableCell>
+ <j:Label text="More centered text">
+ <j:beads>
+ <j:TextAlign align="center"/>
+ </j:beads>
+ </j:Label>
</j:TableCell>
<j:TableCell>
<j:Label text="56">
@@ -83,7 +100,14 @@ limitations under the License.
<js:FontIcon text="{MaterialIconType.INSERT_DRIVE_FILE}" material="true"/>
</j:TableCell>
<j:TableCell>
- <j:Label text="More Text 2" />
+ <j:Label text="More text 2" />
+ </j:TableCell>
+ <j:TableCell>
+ <j:Label text="More centered text 2" >
+ <j:beads>
+ <j:TextAlign align="center"/>
+ </j:beads>
+ </j:Label>
</j:TableCell>
<j:TableCell>
<j:Label text="346">
@@ -109,6 +133,13 @@ limitations under the License.
</j:VGroup>
</j:TableCell>
<j:TableCell>
+ <j:Label text="More centered text 3" >
+ <j:beads>
+ <j:TextAlign align="center"/>
+ </j:beads>
+ </j:Label>
+ </j:TableCell>
+ <j:TableCell>
<j:Label text="240">
<j:beads>
<j:TextAlign align="right"/>
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index f125166..64c9fb3 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -2812,11 +2812,6 @@ j|Slider {
padding: 12px 18px;
}
-j|SimpleTable {
- IViewport: ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport");
- IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel");
-}
-
.alignTextLeft {
text-align: left;
}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SimpleTable.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SimpleTable.as
index afb8e06..4da092b 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SimpleTable.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SimpleTable.as
@@ -35,7 +35,7 @@ package org.apache.royale.jewel
* @playerversion AIR 2.6
* @productversion Royale 0.9.3
*/
- public class SimpleTable extends Container
+ public class SimpleTable extends Group
{
/**
* constructor.
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_table.sass b/frameworks/projects/Jewel/src/main/sass/components/_table.sass
index b367b5c..9ff06c5 100644
--- a/frameworks/projects/Jewel/src/main/sass/components/_table.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_table.sass
@@ -59,15 +59,16 @@
// text-align: right
j|SimpleTable
- IViewport: ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport")
- IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel")
+j|TBody
+ // IViewport: ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport")
+ // IViewportModel: ClassReference("org.apache.royale.html.beads.models.ViewportModel")
+j|THead
+j|TFoot
j|Table
// IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.SimpleTableLayout")
// IBeadView: ClassReference("org.apache.royale.jewel.beads.views.TableView")
- // mimic SWF version which does not support border-collapse
-
j|TableHeader
j|TableCell