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 2020/01/11 10:26:17 UTC

[royale-asjs] branch develop updated: styleduibase: some places where left behind in the emphasis constants refactor

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 351260d  styleduibase: some places where left behind in the emphasis constants refactor
351260d is described below

commit 351260d3350771bfe508de2950716f91b8ea11b2
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sat Jan 11 11:26:09 2020 +0100

    styleduibase: some places where left behind in the emphasis constants refactor
---
 .../royale/TourDeJewel/src/main/royale/ButtonPlayGround.mxml     | 4 ++--
 .../royale/TourDeJewel/src/main/royale/LayoutsPlayGround.mxml    | 9 ---------
 examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml  | 4 +++-
 .../royale/TourDeJewel/src/main/royale/SliderPlayGround.mxml     | 6 ++++--
 .../royale/TourDeJewel/src/main/royale/SnackbarPlayGround.mxml   | 7 ++++---
 examples/royale/TourDeJewel/src/main/royale/TablePlayGround.mxml | 4 +++-
 .../royale/TourDeJewel/src/main/royale/WizardPlayGround.mxml     | 5 +++--
 .../main/royale/org/apache/royale/jewel/beads/views/AlertView.as | 1 +
 .../royale/org/apache/royale/jewel/beads/views/WizardView.as     | 8 ++++----
 9 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/examples/royale/TourDeJewel/src/main/royale/ButtonPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/ButtonPlayGround.mxml
index 77163ca..11c5af2 100644
--- a/examples/royale/TourDeJewel/src/main/royale/ButtonPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/ButtonPlayGround.mxml
@@ -72,7 +72,7 @@ limitations under the License.
 					</j:beads>
 				</j:Button>
 
-				<j:SimpleButton emphasis="{Button.EMPHASIZED}"/>
+				<j:SimpleButton emphasis="{StyledUIBase.EMPHASIZED}"/>
 			</j:Card>
 		</j:GridCell>
 		<j:GridCell desktopNumerator="1" desktopDenominator="2" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1">
@@ -174,7 +174,7 @@ limitations under the License.
                         <j:ToolTip toolTip="show/hide FooterBar"/>
                     </j:beads>
                 </j:ToggleButton>
-				<j:ToggleButton text="Icon and Text" selectedText="Icon and Text" emphasis="{Button.SECONDARY}">
+				<j:ToggleButton text="Icon and Text" selectedText="Icon and Text" emphasis="{StyledUIBase.SECONDARY}">
                     <j:icon>
                         <js:ToggleFontIcon text="{MaterialIconType.VISIBILITY}" selectedText="{MaterialIconType.VISIBILITY_OFF}" material="true"/>
                     </j:icon>
diff --git a/examples/royale/TourDeJewel/src/main/royale/LayoutsPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/LayoutsPlayGround.mxml
index 1a57d31..0d8b6dc 100644
--- a/examples/royale/TourDeJewel/src/main/royale/LayoutsPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/LayoutsPlayGround.mxml
@@ -22,15 +22,6 @@ limitations under the License.
 	xmlns:html="library://ns.apache.org/royale/html" 
 	xmlns:js="library://ns.apache.org/royale/basic" 
 	xmlns:c="components.*" sourceCodeUrl="LayoutsPlayGround.mxml">
-	
-	<fx:Script>
-		<![CDATA[      
-            private function clickHandler(event:MouseEvent):void {
-                // button.emphasis = (button.emphasis == Button.PRIMARY) ? "" : Button.PRIMARY;
-            }
-
-		]]>
-	</fx:Script>
 
 	<!-- <j:beads>
         <js:ContainerDataBinding/>
diff --git a/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml
index f9f14d0..b224fd0 100644
--- a/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml
@@ -27,6 +27,8 @@ limitations under the License.
 	<fx:Script>
 		<![CDATA[
 			import org.apache.royale.collections.ArrayList;
+			import org.apache.royale.core.StyledUIBase;
+
 			import vos.IconListVO;
 
 			private function onChange(event:Event):void {
@@ -178,7 +180,7 @@ limitations under the License.
 						<j:Label text="Click on render's icon will remove that renderer" multiline="true" width="200"/>
 					</j:VGroup>
 					<j:VGroup gap="3">
-						<j:Button text="change data" emphasis="{Button.PRIMARY}" click="changeListData()"/>
+						<j:Button text="change data" emphasis="{StyledUIBase.PRIMARY}" click="changeListData()"/>
 						<j:Button text="Add item" click="addItem()"/>
 						<j:Button text="Remove first item" click="removeItemAt()"/>
 						<j:Button text="Update first item" click="updateFirstItem()"/>
diff --git a/examples/royale/TourDeJewel/src/main/royale/SliderPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/SliderPlayGround.mxml
index 7edada3..7fa28f9 100644
--- a/examples/royale/TourDeJewel/src/main/royale/SliderPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/SliderPlayGround.mxml
@@ -25,6 +25,8 @@ limitations under the License.
 	
 	<fx:Script>
 		<![CDATA[
+		import org.apache.royale.core.StyledUIBase;
+
 		
 		private function clickHandler(event:MouseEvent):void
 		{
@@ -94,7 +96,7 @@ limitations under the License.
 				</j:beads>
 			</j:HSlider>
 
-			<j:Button localId="button1" text="HSlider to 400x200" width="250" height="80" emphasis="{Button.PRIMARY}" click="clickHandler(event)"/>
+			<j:Button localId="button1" text="HSlider to 400x200" width="250" height="80" emphasis="{StyledUIBase.PRIMARY}" click="clickHandler(event)"/>
 
 		</j:Card>
 		<j:Card width="350" height="400">
@@ -107,7 +109,7 @@ limitations under the License.
 						<j:Disabled/>
 					</j:beads>
 				</j:VSlider>
-				<j:Button localId="button2" text="VSlider to 190x160" width="150" height="80" emphasis="{Button.PRIMARY}" click="clickHandler(event)"/>
+				<j:Button localId="button2" text="VSlider to 190x160" width="150" height="80" emphasis="{StyledUIBase.PRIMARY}" click="clickHandler(event)"/>
 			</j:HGroup>
 		</j:Card>
 	</j:Group>
diff --git a/examples/royale/TourDeJewel/src/main/royale/SnackbarPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/SnackbarPlayGround.mxml
index 941abb1..ef85681 100644
--- a/examples/royale/TourDeJewel/src/main/royale/SnackbarPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/SnackbarPlayGround.mxml
@@ -25,6 +25,7 @@ limitations under the License.
 	
 	<fx:Script>
 		<![CDATA[
+			import org.apache.royale.core.StyledUIBase;
 			import org.apache.royale.jewel.Snackbar;
 
 			// Event handler function uses a static method to show
@@ -75,9 +76,9 @@ limitations under the License.
 				<j:Label text="Click the button below to display Snackbar with different emphasis" multiline="true"/>
 				<j:VGroup gap="8">
 					<j:Button text="Default" id="button" click="Snackbar.show('This is Default')"/>
-					<j:Button text="Primary" emphasis="{Button.PRIMARY}" click="{Snackbar.show('This is Primary').emphasis = Button.PRIMARY}"/>
-					<j:Button text="Secondary" emphasis="{Button.SECONDARY}" click="{Snackbar.show('Secondary with ACTION',4000,'ACTION').emphasis = Button.SECONDARY}"/>
-					<j:Button text="Emphasized" emphasis="{Button.EMPHASIZED}" click="{Snackbar.show('This is Emphasized with some message').emphasis = Button.EMPHASIZED}"/>
+					<j:Button text="Primary" emphasis="{StyledUIBase.PRIMARY}" click="{Snackbar.show('This is Primary').emphasis = StyledUIBase.PRIMARY}"/>
+					<j:Button text="Secondary" emphasis="{StyledUIBase.SECONDARY}" click="{Snackbar.show('Secondary with ACTION',4000,'ACTION').emphasis = StyledUIBase.SECONDARY}"/>
+					<j:Button text="Emphasized" emphasis="{StyledUIBase.EMPHASIZED}" click="{Snackbar.show('This is Emphasized with some message').emphasis = StyledUIBase.EMPHASIZED}"/>
 				</j:VGroup>
 			</j:Card>
 		</j:GridCell>
diff --git a/examples/royale/TourDeJewel/src/main/royale/TablePlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/TablePlayGround.mxml
index dbe51fd..66cf5d9 100644
--- a/examples/royale/TourDeJewel/src/main/royale/TablePlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/TablePlayGround.mxml
@@ -166,7 +166,7 @@ limitations under the License.
 											<js:FontIcon text="{MaterialIconType.SEARCH}" material="true"/>
 										</j:icon>
 									</j:IconTextInput>
-									<j:Button text="SEARCH" emphasis="{Button.PRIMARY}"/>
+									<j:Button text="SEARCH" emphasis="{StyledUIBase.PRIMARY}"/>
 								</j:HGroup>
 							</j:TableCell>
 						</j:TableRow>
@@ -220,6 +220,8 @@ limitations under the License.
 	<fx:Script>
 		<![CDATA[
 			import org.apache.royale.collections.ArrayList;
+			import org.apache.royale.core.StyledUIBase;
+
 			import vos.GuitarristVO;
 
 			private function onChange(event:Event):void {
diff --git a/examples/royale/TourDeJewel/src/main/royale/WizardPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/WizardPlayGround.mxml
index 36e0040..6686acc 100644
--- a/examples/royale/TourDeJewel/src/main/royale/WizardPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/WizardPlayGround.mxml
@@ -25,6 +25,7 @@ limitations under the License.
 	
 	<fx:Script>
 		<![CDATA[
+			import org.apache.royale.core.StyledUIBase;
 			import org.apache.royale.jewel.Button;
 			import org.apache.royale.jewel.events.WizardEvent;
 			
@@ -56,7 +57,7 @@ limitations under the License.
 		<j:Wizard id="wizard" width="100%" height="500">
 			<j:previousButton>
 				<j:Group>
-					<j:IconButton emphasis="{Button.SECONDARY}">
+					<j:IconButton emphasis="{StyledUIBase.SECONDARY}">
 						<j:icon>
 							<js:FontIcon text="{MaterialIconType.KEYBOARD_ARROW_LEFT}" material="true" size="48"/>
 						</j:icon>
@@ -66,7 +67,7 @@ limitations under the License.
 
 			<j:nextButton>
 				<j:Group>
-					<j:IconButton emphasis="{Button.SECONDARY}">
+					<j:IconButton emphasis="{StyledUIBase.SECONDARY}">
 						<j:icon>
 							<js:FontIcon text="{MaterialIconType.KEYBOARD_ARROW_RIGHT}" material="true" size="48"/>
 						</j:icon>
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertView.as
index 9b801b7..6a5053f 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertView.as
@@ -30,6 +30,7 @@ package org.apache.royale.jewel.beads.views
 	import org.apache.royale.html.beads.IBackgroundBead;
 	import org.apache.royale.html.beads.IBorderBead;
 	import org.apache.royale.utils.loadBeadFromValuesManager;
+    import org.apache.royale.events.Event;
 	}
 	COMPILE::JS
 	{
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/WizardView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/WizardView.as
index 47f8b7b..6d6429d 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/WizardView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/WizardView.as
@@ -20,17 +20,17 @@ package org.apache.royale.jewel.beads.views
 {
 	COMPILE::SWF {
 	import org.apache.royale.core.SimpleCSSStylesWithFlex;
+	import org.apache.royale.events.IEventDispatcher;
 	}
 	import org.apache.royale.core.IBeadView;
 	import org.apache.royale.core.IContainerBaseStrandChildrenHost;
 	import org.apache.royale.core.ILayoutView;
 	import org.apache.royale.core.IStrand;
+	import org.apache.royale.core.StyledUIBase;
 	import org.apache.royale.core.UIBase;
 	import org.apache.royale.core.ValuesManager;
 	import org.apache.royale.events.Event;
-	import org.apache.royale.events.IEventDispatcher;
 	import org.apache.royale.html.beads.GroupView;
-	import org.apache.royale.jewel.Button;
 	import org.apache.royale.jewel.HGroup;
 	import org.apache.royale.jewel.IconButton;
 	import org.apache.royale.jewel.Label;
@@ -228,7 +228,7 @@ package org.apache.royale.jewel.beads.views
 			
 			// add previous button
 			if (previousButton == null) {
-				previousButton = createButton("previous", Button.SECONDARY) as UIBase;
+				previousButton = createButton("previous", StyledUIBase.SECONDARY) as UIBase;
 			}
 			previousButton.className = "jewel wizard previous";
 			if (previousButton != null && previousButton.parent == null) {
@@ -242,7 +242,7 @@ package org.apache.royale.jewel.beads.views
 
 			// add next button
 			if (nextButton == null) {
-				nextButton = createButton("next", Button.SECONDARY) as UIBase;
+				nextButton = createButton("next", StyledUIBase.SECONDARY) as UIBase;
 			}
 			nextButton.className = "jewel wizard next";
 			if (nextButton != null && nextButton.parent == null) {