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 2f14e5a tour-de-jewel: show example for ComboBox rowHeight and
rowCount
2f14e5a is described below
commit 2f14e5a43a27e60d9e17e7b79e4399c69c7236d6
Author: Carlos Rovira <[email protected]>
AuthorDate: Thu Feb 13 20:19:04 2020 +0100
tour-de-jewel: show example for ComboBox rowHeight and rowCount
---
.../src/main/royale/ComboBoxPlayGround.mxml | 24 ++++++++++++----------
.../src/main/royale/VirtualListsPlayGround.mxml | 2 +-
.../royale/org/apache/royale/jewel/ComboBox.as | 2 ++
.../ListSingleSelectionMouseController.as | 2 +-
4 files changed, 17 insertions(+), 13 deletions(-)
diff --git
a/examples/royale/TourDeJewel/src/main/royale/ComboBoxPlayGround.mxml
b/examples/royale/TourDeJewel/src/main/royale/ComboBoxPlayGround.mxml
index 7dea43e..db60805 100644
--- a/examples/royale/TourDeJewel/src/main/royale/ComboBoxPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/ComboBoxPlayGround.mxml
@@ -38,11 +38,6 @@ limitations under the License.
avengersComboBoxResult.html = "<strong>ComboBox
selectedItem:</strong> " + event.target.selectedItem.label;
}*/
- private function onValueChange(event:Event):void
- {
- cmb.width = slider_w.value;
- }
-
public function assignNewData():void
{
watchmenComboBox.dataProvider = new
ArrayList(["blue", "red", "yellow", "green"]);
@@ -137,15 +132,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 Resize"/>
+ <html:H3 text="Jewel ComboBox Sizing"/>
+
+ <j:ComboBox id="cmb" labelField="label"
dataProvider="{listModel.avengers}"/>
<j:HGroup gap="3"
itemsVerticalAlign="itemsCentered">
- <j:ComboBox id="cmb" labelField="label"
dataProvider="{listModel.avengers}"/>
- <j:Label text="Width: {cmb.width}px"/>
+ <j:Label text="width: {cmb.width}px"/>
+ <j:HSlider width="250" value="200"
minimum="100" maximum="400" valueChange="cmb.width = event.target.value;"/>
+ </j:HGroup>
+ <j:HGroup gap="3"
itemsVerticalAlign="itemsCentered">
+ <j:Label text="rowHeight:
{cmb.rowHeight}"/>
+ <j:HSlider width="150" value="34"
minimum="34" maximum="52" valueChange="cmb.rowHeight = event.target.value;"/>
+ </j:HGroup>
+ <j:HGroup gap="3"
itemsVerticalAlign="itemsCentered">
+ <j:Label text="rowCount:
{cmb.rowCount}"/>
+ <j:HSlider width="150" value="5"
minimum="3" maximum="8" valueChange="cmb.rowCount = event.target.value;"/>
</j:HGroup>
-
- <j:HSlider id="slider_w" width="250"
value="200" minimum="100" maximum="400" valueChange="onValueChange(event)"/>
-
</j:Card>
</j:GridCell>
diff --git
a/examples/royale/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
b/examples/royale/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
index 18aff8b..d877cf9 100644
--- a/examples/royale/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/VirtualListsPlayGround.mxml
@@ -143,7 +143,7 @@ limitations under the License.
<j:VirtualComboBox localId="virtualIconCmb"
className="cmbSimpleiIconListItemRenderer" labelField="label"
-
dataProvider="{listModel.bigIconListVOData}"
+
dataProvider="{listModel.bigIconListVOData}" rowCount="4" rowHeight="52"
/>
</j:Card>
</j:GridCell>
diff --git
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ComboBox.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ComboBox.as
index 2c7fcff..357b2bf 100644
---
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ComboBox.as
+++
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ComboBox.as
@@ -160,6 +160,7 @@ package org.apache.royale.jewel
ISelectionModel(model).selectedItem = value;
}
+ [Bindable("rowHeightChanged")]
/**
* The default height of each cell in every column
*
@@ -177,6 +178,7 @@ package org.apache.royale.jewel
(presentationModel as IComboBoxPresentationModel).rowHeight =
value;
}
+ [Bindable("rowCountChanged")]
/**
* Maximum number of rows visible in the ComboBox popup list.
* If there are fewer items in the dataProvider, the ComboBox
shows only as many items as there are in the dataProvider.
diff --git
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controllers/ListSingleSelectionMouseController.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controllers/ListSingleSelectionMouseController.as
index b48f1a9..458be51 100644
---
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controllers/ListSingleSelectionMouseController.as
+++
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controllers/ListSingleSelectionMouseController.as
@@ -24,7 +24,7 @@ package org.apache.royale.jewel.beads.controllers
import
org.apache.royale.html.beads.controllers.ListSingleSelectionMouseController;
import org.apache.royale.jewel.beads.models.IJewelSelectionModel;
-/**
+ /**
* The Jewel ListSingleSelectionMouseController class is a controller for
* org.apache.royale.jewel.List.
*