This is an automated email from the ASF dual-hosted git repository. carlosrovira pushed a commit to branch feature/jewel-ui-set in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 97f4e77e3bfe76e006fefd919f5943449ccd4fe8 Author: Carlos Rovira <[email protected]> AuthorDate: Thu Mar 15 23:00:12 2018 +0100 Insert a ViewBead that is in JewelTheme and compiles ok, but JewelExample can't see it, why?? --- examples/royale/JewelExample/pom.xml | 4 +- .../Jewel/src/main/resources/jewel-framework.css | 71 ---------------------- frameworks/themes/JewelTheme/pom.xml | 39 ++++++++++++ .../JewelTheme/src/main/resources/defaults.css | 1 + .../src/main/royale/JewelThemeClasses.as | 2 +- .../apache/royale/beads/views/LabelViewBead.mxml | 59 ++++++++++++++++++ .../src/main/sass/components/_label.sass | 1 + 7 files changed, 103 insertions(+), 74 deletions(-) diff --git a/examples/royale/JewelExample/pom.xml b/examples/royale/JewelExample/pom.xml index 19f1837..31fd5b8 100644 --- a/examples/royale/JewelExample/pom.xml +++ b/examples/royale/JewelExample/pom.xml @@ -97,13 +97,13 @@ <type>swc</type> <scope>theme</scope> </dependency> - <dependency> + <!-- <dependency> <groupId>org.apache.royale.framework</groupId> <artifactId>JewelBlueTheme</artifactId> <version>0.9.3-SNAPSHOT</version> <type>swc</type> <scope>theme</scope> - </dependency> + </dependency> --> </dependencies> </project> diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-framework.css b/frameworks/projects/Jewel/src/main/resources/jewel-framework.css deleted file mode 100644 index ac1da5e..0000000 --- a/frameworks/projects/Jewel/src/main/resources/jewel-framework.css +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 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. - */ -@namespace "library://ns.apache.org/royale/jewel"; -.layout.horizontal { - white-space: nowrap; - display: block; -} -.layout.horizontal > * { - display: inline-block !important; -} - -.layout.vertical { - vertical-align: top; -} -.layout.vertical > * { - display: block !important; -} - -.jewel.label { - IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel"); - white-space: nowrap; -} - -TextField { - IBeadModel: ClassReference("org.apache.royale.html.beads.models.TextModel"); -} - -Slider { - IBeadModel: ClassReference("org.apache.royale.html.beads.models.RangeModel"); - IBeadView: ClassReference("org.apache.royale.jewel.beads.SliderView"); - IBeadLayout: ClassReference("org.apache.royale.html.beads.layouts.HorizontalSliderLayout"); - IBeadController: ClassReference("org.apache.royale.html.beads.controllers.HSliderMouseController"); - position: relative; -} - -.SliderTrack { - position: absolute; -} - -.SliderThumb { - position: absolute; - border-radius: 15px; -} - -@media -royale-swf { - Slider { - iThumbView: ClassReference("org.apache.royale.jewel.beads.SliderThumbView"); - iTrackView: ClassReference("org.apache.royale.jewel.beads.SliderTrackView"); - } - - RadioButton { - IBeadModel: ClassReference("org.apache.royale.html.beads.models.ValueToggleButtonModel"); - IBeadView: ClassReference("org.apache.royale.jewel.beads.RadioButtonView"); - } -} - -/*# sourceMappingURL=jewel-framework.css.map */ diff --git a/frameworks/themes/JewelTheme/pom.xml b/frameworks/themes/JewelTheme/pom.xml index 6370b58..84e7e1e 100644 --- a/frameworks/themes/JewelTheme/pom.xml +++ b/frameworks/themes/JewelTheme/pom.xml @@ -61,6 +61,7 @@ <artifactId>sass-maven-plugin</artifactId> <version>3.5.2</version> <configuration> + <targets>JSRoyale,SWF</targets> <resources> <resource> <source> @@ -85,4 +86,42 @@ </plugins> </build> + <dependencies> + <dependency> + <groupId>com.adobe.flash.framework</groupId> + <artifactId>playerglobal</artifactId> + <version>${flash.version}</version> + <type>swc</type> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.royale.framework</groupId> + <artifactId>Basic</artifactId> + <version>0.9.3-SNAPSHOT</version> + <type>swc</type> + <classifier>swf</classifier> + </dependency> + <dependency> + <groupId>org.apache.royale.framework</groupId> + <artifactId>Basic</artifactId> + <version>0.9.3-SNAPSHOT</version> + <type>swc</type> + <classifier>js</classifier> + </dependency> + <dependency> + <groupId>org.apache.royale.framework</groupId> + <artifactId>Language</artifactId> + <version>0.9.3-SNAPSHOT</version> + <type>swc</type> + <classifier>swf</classifier> + </dependency> + <dependency> + <groupId>org.apache.royale.framework</groupId> + <artifactId>Language</artifactId> + <version>0.9.3-SNAPSHOT</version> + <type>swc</type> + <classifier>js</classifier> + </dependency> + </dependencies> + </project> diff --git a/frameworks/themes/JewelTheme/src/main/resources/defaults.css b/frameworks/themes/JewelTheme/src/main/resources/defaults.css index 714ec69..9022239 100644 --- a/frameworks/themes/JewelTheme/src/main/resources/defaults.css +++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css @@ -221,6 +221,7 @@ * Jewel Label */ .jewel.label { + IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead"); font-family: "Lato", sans-serif; font-size: 0.75rem; } diff --git a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as index 20662dc..cb5d275 100644 --- a/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as +++ b/frameworks/themes/JewelTheme/src/main/royale/JewelThemeClasses.as @@ -27,7 +27,7 @@ package */ internal class JewelThemeClasses { - + import org.apache.royale.beads.views.LabelViewBead; LabelViewBead; } } \ No newline at end of file diff --git a/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml new file mode 100644 index 0000000..815c4dd --- /dev/null +++ b/frameworks/themes/JewelTheme/src/main/royale/org/apache/royale/beads/views/LabelViewBead.mxml @@ -0,0 +1,59 @@ +<?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. + +--> +<js:MXMLBeadView xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:js="library://ns.apache.org/royale/basic"> + + <fx:Script> + <![CDATA[ + // import org.apache.royale.core.ITitleBarModel; + // import org.apache.royale.core.UIBase; + // import org.apache.royale.events.Event; + // import com.transpiledactionscript.puremvc.royale.employeeadmin.model.CustomPanelWithControlBarModel; + + // private function clickHandler():void + // { + // var newEvent:org.apache.royale.events.Event = new org.apache.royale.events.Event('close'); + // UIBase(_strand).dispatchEvent(newEvent); + // } + ]]> + </fx:Script> + + <js:TextButton text="VIEWBEAD!!"/> + + <!-- <js:beads> + <js:MXMLBeadViewDataBinding /> + <js:LayoutChangeNotifier watchedProperty="{titleLabel.text}" /> + <js:LayoutChangeNotifier watchedProperty="{additionalInfoLabel.text}" /> + </js:beads> + + <js:Label id="titleLabel" text="{CustomPanelWithControlBarModel(model).title}" className="TitleBarTitle" > + <js:style> + <js:SimpleCSSStyles fontWeight="inherit" marginLeft="5" /> + </js:style> + </js:Label> + <js:Label id="additionalInfoLabel" text="{CustomPanelWithControlBarModel(model).info}" height="16"> + <js:style> + <js:SimpleCSSStyles fontWeight="inherit" marginRight="5" /> + </js:style> + </js:Label> + <js:CloseButton id="closeButton" click="clickHandler()" className="TitleBarCloseButton" + visible="{CustomPanelWithControlBarModel(model).showCloseButton}"/> + --> +</js:MXMLBeadView> \ No newline at end of file diff --git a/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass index 63b60c9..27906d1 100644 --- a/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass +++ b/frameworks/themes/JewelTheme/src/main/sass/components/_label.sass @@ -22,6 +22,7 @@ */ .jewel.label //IBeadView: ClassReference("org.apache.royale.html.beads.TextFieldView") + IBeadView: ClassReference("org.apache.royale.beads.views.LabelViewBead") font: family: $font-stack size: $font-size \ No newline at end of file -- To stop receiving notification emails like this one, please contact [email protected].
