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 2120fcd tour-de-jewel: add prompt change examples in each affected
play ground
2120fcd is described below
commit 2120fcd64f6525e517ef33f906b3cc4d328b687b
Author: Carlos Rovira <[email protected]>
AuthorDate: Wed Mar 4 23:28:45 2020 +0100
tour-de-jewel: add prompt change examples in each affected play ground
---
.../src/main/royale/ComboBoxPlayGround.mxml | 19 +++++++++
.../src/main/royale/DateComponentsPlayGround.mxml | 6 ++-
.../src/main/royale/DropDownListPlayGround.mxml | 48 +++++++++++-----------
.../src/main/royale/TextInputPlayGround.mxml | 9 ++--
4 files changed, 54 insertions(+), 28 deletions(-)
diff --git
a/examples/royale/TourDeJewel/src/main/royale/ComboBoxPlayGround.mxml
b/examples/royale/TourDeJewel/src/main/royale/ComboBoxPlayGround.mxml
index ea8581e..daaf5a1 100644
--- a/examples/royale/TourDeJewel/src/main/royale/ComboBoxPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/ComboBoxPlayGround.mxml
@@ -62,6 +62,9 @@ limitations under the License.
}
return intro + evaluated;
}
+
+ [Bindable]
+ public var promptText:String = "Icons and Text...";
]]>
</fx:Script>
@@ -226,6 +229,22 @@ limitations under the License.
<j:GridCell desktopNumerator="1" desktopDenominator="1"
tabletNumerator="1" tabletDenominator="1" phoneNumerator="1"
phoneDenominator="1">
<j:Card>
+ <html:H3 text="Jewel ComboBox with custom
itemrenderer"/>
+
+ <j:ComboBox
className="cmbSimpleiIconListItemRenderer" labelField="label"
+ rowCount="4"
rowHeight="52"
+
dataProvider="{listModel.avengers}">
+ <j:beads>
+ <j:ComboBoxTextPrompt
prompt="{promptText}"/>
+ <j:SearchFilter/>
+ </j:beads>
+ </j:ComboBox>
+ <j:Button text="change prompt"
click="promptText = 'other text'"/>
+ </j:Card>
+ </j:GridCell>
+
+ <j:GridCell desktopNumerator="1" desktopDenominator="1"
tabletNumerator="1" tabletDenominator="1" phoneNumerator="1"
phoneDenominator="1">
+ <j:Card>
<html:H3 text="Jewel ComboBox
ComboBoxTrucatedText"/>
<j:ComboBox labelField="label"
dataProvider="{listModel.avengers}">
diff --git
a/examples/royale/TourDeJewel/src/main/royale/DateComponentsPlayGround.mxml
b/examples/royale/TourDeJewel/src/main/royale/DateComponentsPlayGround.mxml
index 5eab077..134db20 100644
--- a/examples/royale/TourDeJewel/src/main/royale/DateComponentsPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/DateComponentsPlayGround.mxml
@@ -83,6 +83,9 @@ limitations under the License.
[Bindable]
public var someDate:Date = new Date (1973,3,5);
+
+ [Bindable]
+ public var promptText:String = "DD/MM/YYYY";
]]>
</fx:Script>
@@ -141,12 +144,13 @@ limitations under the License.
<j:HGroup gap="3">
<j:DateField id="dateFieldES"
change="dateFieldESChanged()" beadsAdded="configDateFieldToES()">
<j:beads>
- <j:DateFieldTextPrompt
prompt="DD/MM/YYYY"/>
+ <j:DateFieldTextPrompt
prompt="{promptText}"/>
</j:beads>
</j:DateField>
<j:Button text="Selecciona Hoy"
click="dateFieldESToToday()" emphasis="primary"/>
</j:HGroup>
<j:Label id="dateFieldESSelectedDate"
multiline="true" html="<strong>DateField fecha seleccionada:</strong> "/>
+ <j:Button text="Change Prompt"
emphasis="secondary" click="promptText = 'Other prompt'"/>
</j:Card>
</j:GridCell>
diff --git
a/examples/royale/TourDeJewel/src/main/royale/DropDownListPlayGround.mxml
b/examples/royale/TourDeJewel/src/main/royale/DropDownListPlayGround.mxml
index eb16132..d08bc20 100644
--- a/examples/royale/TourDeJewel/src/main/royale/DropDownListPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/DropDownListPlayGround.mxml
@@ -48,6 +48,8 @@ limitations under the License.
return intro + evaluated;
}
+ [Bindable]
+ public var promptText:String = "Select Watchmen...";
]]>
</fx:Script>
@@ -114,7 +116,7 @@ limitations under the License.
<j:HGroup gap="3">
<j:DropDownList
localId="watchmenDropDownList" dataProvider="{listModel.watchmen}">
<j:beads>
-
<j:DropDownListTextPrompt prompt="Select Watchmen..."/>
+
<j:DropDownListTextPrompt prompt="{promptText}"/>
</j:beads>
</j:DropDownList>
<j:Button text="deselect"
click="watchmenDropDownList.selectedIndex = -1" emphasis="primary"/>
@@ -124,6 +126,7 @@ limitations under the License.
<j:NumericStepper
valueChange="watchmenDropDownList.selectedIndex = event.target.value"
minimum="0" maximum="5"/>
</j:HGroup>
<j:Label
multiline="true"localId="watchmenDropDownListResult"
html="{describeItem(watchmenDropDownList.selectedItem)}"/>
+ <j:Button text="Change Prompt"
emphasis="secondary" click="promptText = 'Other prompt'"/>
</j:VGroup>
</j:Card>
</j:GridCell>
@@ -220,17 +223,15 @@ limitations under the License.
<j:Card>
<html:H3 text="Jewel DropDownList Disabled"/>
- <j:VGroup gap="3">
- <j:HGroup gap="3"
itemsVerticalAlign="itemsCentered">
- <j:DropDownList
labelField="label" dataProvider="{listModel.avengers}">
- <j:beads>
- <j:Disabled
disabled="{disable_ddl.selected}"/>
-
<j:DropDownListTextPrompt prompt="Disabled..."/>
- </j:beads>
- </j:DropDownList>
- <j:CheckBox
localId="disable_ddl" text="Disable ComboBox?" selected="true"/>
- </j:HGroup>
- </j:VGroup>
+ <j:HGroup gap="3"
itemsVerticalAlign="itemsCentered">
+ <j:DropDownList labelField="label"
dataProvider="{listModel.avengers}">
+ <j:beads>
+ <j:Disabled
disabled="{disable_ddl.selected}"/>
+
<j:DropDownListTextPrompt prompt="Disabled..."/>
+ </j:beads>
+ </j:DropDownList>
+ <j:CheckBox localId="disable_ddl"
text="Disable ComboBox?" selected="true"/>
+ </j:HGroup>
</j:Card>
</j:GridCell>
@@ -238,18 +239,17 @@ limitations under the License.
<j:Card>
<html:H3 text="Jewel DropDownList
requireSelection"/>
- <j:VGroup gap="3">
- <j:HGroup gap="3"
itemsVerticalAlign="itemsCentered">
- <j:DropDownList localId="rqddl"
labelField="label" dataProvider="{listModel.avengers}" selectedIndex="2">
- <j:beads>
-
<j:DropDownListTextPrompt prompt="Required Selection..."/>
-
<j:RequireSelection requireSelection="{requiredSelecion_ddl.selected}"/>
- </j:beads>
- </j:DropDownList>
- <j:CheckBox
localId="requiredSelecion_ddl" text="Require Selection?"/>
- </j:HGroup>
- <j:Button text="deselect"
click="rqddl.selectedIndex = -1" emphasis="primary"/>
- </j:VGroup>
+ <j:HGroup gap="3"
itemsVerticalAlign="itemsCentered">
+ <j:DropDownList localId="rqddl"
labelField="label" dataProvider="{listModel.avengers}" selectedIndex="2">
+ <j:beads>
+
<j:DropDownListTextPrompt prompt="Required Selection..."/>
+ <j:RequireSelection
requireSelection="{requiredSelecion_ddl.selected}"/>
+ </j:beads>
+ </j:DropDownList>
+ <j:CheckBox
localId="requiredSelecion_ddl" text="Require Selection?"/>
+ </j:HGroup>
+ <j:Button text="deselect"
click="rqddl.selectedIndex = -1" emphasis="primary"/>
+
</j:Card>
</j:GridCell>
diff --git
a/examples/royale/TourDeJewel/src/main/royale/TextInputPlayGround.mxml
b/examples/royale/TourDeJewel/src/main/royale/TextInputPlayGround.mxml
index 2379301..f266f6c 100644
--- a/examples/royale/TourDeJewel/src/main/royale/TextInputPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/TextInputPlayGround.mxml
@@ -41,6 +41,9 @@ limitations under the License.
{
trace("enter pressed");
}
+
+ [Bindable]
+ public var promptText:String = "With prompt...";
]]>
</fx:Script>
@@ -77,10 +80,10 @@ limitations under the License.
</j:beads>
<j:TextInput id="textToChange">
<j:beads>
- <j:TextPrompt
prompt="With prompt..."/>
+ <j:TextPrompt
prompt="{promptText}"/>
</j:beads>
</j:TextInput>
- <j:Button text="Send"
emphasis="secondary"/>
+ <j:Button text="Change Prompt"
emphasis="secondary" click="promptText = 'Other text'"/>
</j:Group>
<j:TextInput text="Disabled with text...">
@@ -192,7 +195,7 @@ limitations under the License.
<j:TextPrompt prompt="With
prompt..."/>
</j:beads>
</j:TextArea>
-
+
<j:TextArea text="A TextArea">
<j:beads>
<j:TextPrompt prompt="with
prompt..."/>