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/08/25 09:52:49 UTC

[royale-asjs] branch develop updated: Jewel NumericStepper examples

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 570a09e  Jewel NumericStepper examples
570a09e is described below

commit 570a09e3db0f33ed263d2d8fbf6d6ddafdfe5347
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sat Aug 25 11:52:45 2018 +0200

    Jewel NumericStepper examples
---
 .../JewelExample/src/main/royale/MainContent.mxml  |  1 +
 .../src/main/royale/NumericStepperPlayGround.mxml  | 55 ++++++++++++++++++++++
 .../src/main/royale/models/MainNavigationModel.as  |  1 +
 .../Icons/src/main/royale/MaterialIconType.as      |  2 +
 4 files changed, 59 insertions(+)

diff --git a/examples/royale/JewelExample/src/main/royale/MainContent.mxml b/examples/royale/JewelExample/src/main/royale/MainContent.mxml
index d43f2ea..22c43b2 100644
--- a/examples/royale/JewelExample/src/main/royale/MainContent.mxml
+++ b/examples/royale/JewelExample/src/main/royale/MainContent.mxml
@@ -112,6 +112,7 @@ limitations under the License.
         <local:WelcomeSection isActive="true"/>
         <local:AlertPlayGround id="alert_panel"/>
         <local:ButtonPlayGround id="button_panel"/>
+        <local:NumericStepperPlayGround id="numericstepper_panel"/>
         <local:DateComponentsPlayGround id="datecomponents_panel"/>
         <local:DropDownListPlayGround id="dropdownlist_panel"/>
         <local:CheckBoxPlayGround id="checkbox_panel"/>
diff --git a/examples/royale/JewelExample/src/main/royale/NumericStepperPlayGround.mxml b/examples/royale/JewelExample/src/main/royale/NumericStepperPlayGround.mxml
new file mode 100644
index 0000000..c3e18e3
--- /dev/null
+++ b/examples/royale/JewelExample/src/main/royale/NumericStepperPlayGround.mxml
@@ -0,0 +1,55 @@
+<?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.
+
+-->
+<j:SectionContent xmlns:fx="http://ns.adobe.com/mxml/2009"
+		xmlns:j="library://ns.apache.org/royale/jewel"
+		xmlns:html="library://ns.apache.org/royale/html">
+
+	<fx:Script>
+		<![CDATA[      
+            private function valueChangeHandler(event:Event):void {
+                result.text = "Default NumericStepper: " + numericStepper.value;
+            }
+		]]>
+	</fx:Script>
+
+	<j:Card width="600">
+		<html:H3 text="Jewel NumericStepper"/>
+
+		<j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
+			<j:NumericStepper id="numericStepper" valueChange="valueChangeHandler(event)"/>
+			<j:Label id="result" text="Default NumericStepper: "/>
+		</j:HGroup>
+		
+		<j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
+			<j:NumericStepper value="30"/>
+			<j:Label text="NumericStepper value='30'"/>
+		</j:HGroup>
+
+		<j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
+			<j:NumericStepper minimum="10" maximum="100"/>
+			<j:Label text="NumericStepper minimum='10' and maximum='100'"/>
+		</j:HGroup>
+
+		<j:HGroup gap="3" itemsVerticalAlign="itemsCentered">
+			<j:NumericStepper stepSize="2"/>
+			<j:Label text="NumericStepper stepSize='2'"/>
+		</j:HGroup>
+	</j:Card>
+</j:SectionContent>
diff --git a/examples/royale/JewelExample/src/main/royale/models/MainNavigationModel.as b/examples/royale/JewelExample/src/main/royale/models/MainNavigationModel.as
index b409561..39097a3 100644
--- a/examples/royale/JewelExample/src/main/royale/models/MainNavigationModel.as
+++ b/examples/royale/JewelExample/src/main/royale/models/MainNavigationModel.as
@@ -27,6 +27,7 @@ package models
         private var _controlsDrawerNavigation:ArrayList = new ArrayList([            
             new NavigationLinkVO("Alert", "alert_panel", MaterialIconType.WEB_ASSET),
             new NavigationLinkVO("Button", "button_panel", MaterialIconType.CROP_7_5),
+            new NavigationLinkVO("NumericStepper", "numericstepper_panel", MaterialIconType.UNFOLD_MORE),
             new NavigationLinkVO("Date Components", "datecomponents_panel", MaterialIconType.DATE_RANGE),
             new NavigationLinkVO("DropDownList", "dropdownlist_panel", MaterialIconType.CREDIT_CARD),
             new NavigationLinkVO("CheckBox", "checkbox_panel", MaterialIconType.CHECK_BOX),
diff --git a/frameworks/projects/Icons/src/main/royale/MaterialIconType.as b/frameworks/projects/Icons/src/main/royale/MaterialIconType.as
index b03ca2b..ceda59a 100644
--- a/frameworks/projects/Icons/src/main/royale/MaterialIconType.as
+++ b/frameworks/projects/Icons/src/main/royale/MaterialIconType.as
@@ -1071,5 +1071,7 @@ package
         public static const STAR_HALF:String = 'star_half';
         
         public static const LIST_ALT:String = 'list_alt';
+        public static const UNFOLD_MORE:String = 'unfold_more';
+        public static const UNFOLD_LESS:String = 'unfold_less';
     }
 }