This is an automated email from the ASF dual-hosted git repository. carlosrovira pushed a commit to branch feature/jewel-datagrid in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit d535b7cf035de922c36bf870990f59114de79e62 Author: Carlos Rovira <[email protected]> AuthorDate: Thu Nov 28 18:37:02 2019 +0100 jewel-buttonbar: starting example in Tour de Jewel --- .../src/main/royale/ButtonBarPlayGround.mxml | 77 ++++++++++++++++++++++ .../TourDeJewel/src/main/royale/MainContent.mxml | 1 + .../src/main/royale/models/MainNavigationModel.as | 1 + 3 files changed, 79 insertions(+) diff --git a/examples/royale/TourDeJewel/src/main/royale/ButtonBarPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/ButtonBarPlayGround.mxml new file mode 100644 index 0000000..2a6047a --- /dev/null +++ b/examples/royale/TourDeJewel/src/main/royale/ButtonBarPlayGround.mxml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--> +<c:ExampleAndSourceCodeTabbedSectionContent xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:j="library://ns.apache.org/royale/jewel" + xmlns:html="library://ns.apache.org/royale/html" + xmlns:js="library://ns.apache.org/royale/basic" + xmlns:models="models.*" + xmlns:c="components.*" sourceCodeUrl="ButtonBarPlayGround.mxml"> + + <fx:Script> + <![CDATA[ + [Bindable] + public var two_options:Array = ["Features", "Support"]; + + [Bindable] + public var three_options:Array = ["Features", "Support", "Service & Operations"]; + ]]> + </fx:Script> + + <c:beads> + <js:ContainerDataBinding/> + </c:beads> + + <j:Grid gap="true" itemsVerticalAlign="itemsSameHeight"> + <j:GridCell desktopNumerator="1" desktopDenominator="2" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1"> + <j:Card> + <html:H3 text="Jewel ButtonBar"/> + + <j:ButtonBar localId="bb1" change="bb1_label.text = bb1.selectedItem as String" + dataProvider="{two_options}"> + <!-- <j:dataProvider> + <fx:Array> + <fx:String>Features</fx:String> + <fx:String>Support</fx:String> + </fx:Array> + </j:dataProvider> --> + </j:ButtonBar> + <j:Label localId="bb1_label"/> + </j:Card> + </j:GridCell> + <j:GridCell desktopNumerator="1" desktopDenominator="2" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1"> + <j:Card> + <html:H4 text="ButtonBar"/> + + <j:ButtonBar localId="bb2" change="bb2_label.text = bb2.selectedItem as String" + dataProvider="{three_options}"> + <!-- <js:dataProvider> + <fx:Array> + <fx:String>Features</fx:String> + <fx:String>Support</fx:String> + <fx:String>Control</fx:String> + </fx:Array> + </js:dataProvider> --> + </j:ButtonBar> + <j:Label localId="bb2_label"/> + </j:Card> + </j:GridCell> + </j:Grid> + +</c:ExampleAndSourceCodeTabbedSectionContent> diff --git a/examples/royale/TourDeJewel/src/main/royale/MainContent.mxml b/examples/royale/TourDeJewel/src/main/royale/MainContent.mxml index 60c6257..accb213 100644 --- a/examples/royale/TourDeJewel/src/main/royale/MainContent.mxml +++ b/examples/royale/TourDeJewel/src/main/royale/MainContent.mxml @@ -248,6 +248,7 @@ limitations under the License. <local:TextInputPlayGround name="textinput_panel"/> <local:GridPlayGround name="grid_panel"/> <local:CardPlayGround name="card_panel"/> + <local:ButtonBarPlayGround name="buttonbar_panel"/> <local:DataGridPlayGround name="datagrid_panel"/> <local:TablePlayGround name="tables_panel"/> <local:FormsValidationPlayGround name="form_validation_panel"/> diff --git a/examples/royale/TourDeJewel/src/main/royale/models/MainNavigationModel.as b/examples/royale/TourDeJewel/src/main/royale/models/MainNavigationModel.as index 17a681f..ac2caa2 100644 --- a/examples/royale/TourDeJewel/src/main/royale/models/MainNavigationModel.as +++ b/examples/royale/TourDeJewel/src/main/royale/models/MainNavigationModel.as @@ -56,6 +56,7 @@ package models new NavigationLinkVO("Card", "card_panel", MaterialIconType.WEB_ASSET), new NavigationLinkVO("Layouts", "layouts_panel", MaterialIconType.VIEW_QUILT), new NavigationLinkVO("Grid", "grid_panel", MaterialIconType.GRID_ON), + new NavigationLinkVO("ButtonBar", "buttonbar_panel", MaterialIconType.VIEW_CAROUSEL), new NavigationLinkVO("DataGrid", "datagrid_panel", MaterialIconType.VIEW_LIST), new NavigationLinkVO("Tables", "tables_panel", MaterialIconType.VIEW_COMFY), new NavigationLinkVO("TabBar", "tabbar_panel", MaterialIconType.TAB),
