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/08/23 10:23:56 UTC
[royale-asjs] branch develop updated: jewel: remove Jewel
ControlBar since is just a HGroup,
so really a duplicate and introducing code and files not needed
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 c4f29a2 jewel: remove Jewel ControlBar since is just a HGroup, so really a duplicate and introducing code and files not needed
c4f29a2 is described below
commit c4f29a2bd1898aa9f507b4b945116a584490f6aa
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Aug 23 12:23:43 2020 +0200
jewel: remove Jewel ControlBar since is just a HGroup, so really a duplicate and introducing code and files not needed
---
...E0010_Customization_through_the_Royale_API.mxml | 2 +-
.../src/main/royale/AlertPlayGround.mxml | 4 +-
.../projects/Jewel/src/main/resources/defaults.css | 16 ----
.../Jewel/src/main/resources/jewel-manifest.xml | 1 -
.../royale/org/apache/royale/jewel/ControlBar.as | 87 ----------------------
.../apache/royale/jewel/beads/views/AlertView.as | 72 ++++++++----------
.../src/main/sass/components/_controlbar.sass | 34 ---------
.../projects/Jewel/src/main/sass/defaults.sass | 1 -
.../sass/components-emphasized/_controlbar.sass | 24 ------
.../main/sass/components-primary/_controlbar.sass | 24 ------
.../sass/components-secondary/_controlbar.sass | 22 ------
.../themes/JewelTheme/src/main/sass/defaults.sass | 3 -
12 files changed, 36 insertions(+), 254 deletions(-)
diff --git a/examples/blog/BE0010_Customization_through_the_Royale_API/src/main/royale/BE0010_Customization_through_the_Royale_API.mxml b/examples/blog/BE0010_Customization_through_the_Royale_API/src/main/royale/BE0010_Customization_through_the_Royale_API.mxml
index 7c35a15..ea89cff 100644
--- a/examples/blog/BE0010_Customization_through_the_Royale_API/src/main/royale/BE0010_Customization_through_the_Royale_API.mxml
+++ b/examples/blog/BE0010_Customization_through_the_Royale_API/src/main/royale/BE0010_Customization_through_the_Royale_API.mxml
@@ -39,7 +39,7 @@
private var alert:Alert;
private var check:CheckBox;
- // Adding content to Alert component and changing ControlBar's Buttons Layout
+ // Adding content to Alert component and changing controlBar's Buttons Layout
private function clickHandler(event:MouseEvent):void {
alert = Alert.show("This example shows access to AlertView and ControlBar to add a CheckBox to Alert's content area and expand Buttons layout and change defaults. The height of the alert is set up to 300px too.", "Cutomized Alert Example", 3);
alert.addEventListener(CloseEvent.CLOSE, alertClickHandler);
diff --git a/examples/jewel/TourDeJewel/src/main/royale/AlertPlayGround.mxml b/examples/jewel/TourDeJewel/src/main/royale/AlertPlayGround.mxml
index 2ad5df4..c6920e8 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/AlertPlayGround.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/AlertPlayGround.mxml
@@ -45,9 +45,9 @@ limitations under the License.
private var alert:Alert;
private var check:CheckBox;
- // changing ControlBar's Buttons Layout
+ // changing controlBar's Buttons Layout
private function clickHandler2(event:MouseEvent):void {
- alert = Alert.show("This example shows access to AlertView and ControlBar to expand Buttons layout and change defaults. The height of the alert is set up to 300px too.", "Save Changes", 3);
+ alert = Alert.show("This example shows access to AlertView and controlBar to expand Buttons layout and change defaults. The height of the alert is set up to 300px too.", "Save Changes", 3);
alert.height = 300;
check = new CheckBox();
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index f3d8560..d0e1481 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -385,22 +385,6 @@ j|ToggleButtonBar {
width: inherit;
}
-.jewel.controlbar {
- background-color: transparent;
- padding: 0px;
- min-height: 34px;
-}
-
-j|ControlBar {
- IBeadView: ClassReference("org.apache.royale.html.beads.GroupView");
- IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.HorizontalLayout");
-}
-
-@media -royale-swf {
- j|ControlBar {
- IMeasurementBead: ClassReference("org.apache.royale.html.beads.ControlBarMeasurementBead");
- }
-}
.jewel.combobox {
display: inline-flex;
}
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index 4df1ca3..d9b0b77 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -75,7 +75,6 @@
<component id="RadioButton" class="org.apache.royale.jewel.RadioButton"/>
<component id="CheckBox" class="org.apache.royale.jewel.CheckBox"/>
<component id="Alert" class="org.apache.royale.jewel.Alert"/>
- <component id="ControlBar" class="org.apache.royale.jewel.ControlBar"/>
<component id="TitleBar" class="org.apache.royale.jewel.TitleBar"/>
<component id="List" class="org.apache.royale.jewel.List"/>
<component id="VirtualList" class="org.apache.royale.jewel.VirtualList"/>
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ControlBar.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ControlBar.as
deleted file mode 100644
index 5c012f5..0000000
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ControlBar.as
+++ /dev/null
@@ -1,87 +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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.jewel
-{
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
- import org.apache.royale.core.IBeadLayout;
- import org.apache.royale.core.IChrome;
- import org.apache.royale.jewel.Group;
- import org.apache.royale.utils.loadBeadFromValuesManager;
-
-
- /**
- * The ControlBar class is used within a Panel as a place to position
- * additional controls. The ControlBar appears at the bottom of the
- * org.apache.royale.html.Panel
- * and is not part of the Panel's scrollable content area. The ControlBar
- * is a Container and implements the org.apache.royale.core.IChrome interface, indicating that is
- * outside of the Container's content area. The ControlBar uses the following
- * beads:
- *
- * org.apache.royale.core.IBeadModel: the data model for the component.
- * org.apache.royale.core.IMeasurementBead: helps determine the overlay size of the ControlBar for layout.
- * org.apache.royale.core.IBorderBead: if present, displays a border around the component.
- * org.apache.royale.core.IBackgroundBead: if present, displays a solid background below the ControlBar.
- *
- * @toplevel
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.9.4
- */
- public class ControlBar extends Group implements IChrome
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.9.4
- */
- public function ControlBar()
- {
- super();
-
- typeNames = "jewel controlbar";
- }
-
- /**
- * @private
- */
- override public function addedToParent():void
- {
- super.addedToParent();
- loadBeadFromValuesManager(IBeadLayout, "iBeadLayout", this);
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- return addElementToWrapper(this,'div');
- }
- }
-}
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 6a5053f..4412a51 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
@@ -27,17 +27,16 @@ package org.apache.royale.jewel.beads.views
import org.apache.royale.core.IUIBase;
import org.apache.royale.core.ValuesManager;
import org.apache.royale.core.layout.EdgeData;
+ import org.apache.royale.events.Event;
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
+ COMPILE::JS
{
- import org.apache.royale.jewel.ControlBar;
+ import org.apache.royale.jewel.HGroup;
}
import org.apache.royale.core.IAlertModel;
- import org.apache.royale.core.IBeadLayout;
import org.apache.royale.core.IParent;
import org.apache.royale.core.IStrand;
import org.apache.royale.core.StyledUIBase;
@@ -52,7 +51,6 @@ package org.apache.royale.jewel.beads.views
import org.apache.royale.jewel.Label;
import org.apache.royale.jewel.TitleBar;
import org.apache.royale.jewel.VGroup;
- import org.apache.royale.jewel.beads.layouts.HorizontalLayout;
import org.apache.royale.jewel.beads.views.AlertTitleBarView;
/**
@@ -135,27 +133,27 @@ package org.apache.royale.jewel.beads.views
COMPILE::SWF
{
- var backgroundColor:Object = ValuesManager.valuesImpl.getValue(value, "background-color");
- var backgroundImage:Object = ValuesManager.valuesImpl.getValue(value, "background-image");
- if (backgroundColor != null || backgroundImage != null)
- {
- loadBeadFromValuesManager(IBackgroundBead, "iBackgroundBead", value);
- }
-
- var borderStyle:String;
- var borderStyles:Object = ValuesManager.valuesImpl.getValue(value, "border");
- if (borderStyles is Array)
- {
- borderStyle = borderStyles[1];
- }
- if (borderStyle == null)
- {
- borderStyle = ValuesManager.valuesImpl.getValue(value, "border-style") as String;
- }
- if (borderStyle != null && borderStyle != "none")
- {
- loadBeadFromValuesManager(IBorderBead, "iBorderBead", value);
- }
+ var backgroundColor:Object = ValuesManager.valuesImpl.getValue(value, "background-color");
+ var backgroundImage:Object = ValuesManager.valuesImpl.getValue(value, "background-image");
+ if (backgroundColor != null || backgroundImage != null)
+ {
+ loadBeadFromValuesManager(IBackgroundBead, "iBackgroundBead", value);
+ }
+
+ var borderStyle:String;
+ var borderStyles:Object = ValuesManager.valuesImpl.getValue(value, "border");
+ if (borderStyles is Array)
+ {
+ borderStyle = borderStyles[1];
+ }
+ if (borderStyle == null)
+ {
+ borderStyle = ValuesManager.valuesImpl.getValue(value, "border-style") as String;
+ }
+ if (borderStyle != null && borderStyle != "none")
+ {
+ loadBeadFromValuesManager(IBorderBead, "iBorderBead", value);
+ }
}
alertModel = (_strand as UIBase).model as IAlertModel;
@@ -176,17 +174,13 @@ package org.apache.royale.jewel.beads.views
content.addElement(label);
IParent(_strand).addElement(content);
- // ControlBar
+ // controlBar
createButtons();
IParent(_strand).addElement(controlBar);
- var layout:HorizontalLayout = controlBar.getBeadByType(IBeadLayout) as HorizontalLayout;
- layout.itemsHorizontalAlign = "itemsRight";
- layout.gap = 2;
-
COMPILE::SWF
{
- refreshSize();
+ refreshSize();
}
setTimeout(prepareForPopUp, 300);
@@ -196,7 +190,7 @@ package org.apache.royale.jewel.beads.views
{
COMPILE::JS
{
- UIBase(_strand).element.classList.add("open");
+ UIBase(_strand).element.classList.add("open");
}
}
@@ -204,16 +198,16 @@ package org.apache.royale.jewel.beads.views
{
COMPILE::SWF
{
- controlBar = new Group();
+ controlBar = new Group();
}
COMPILE::JS
{
- controlBar = new ControlBar();
-
- // var controlBarLayout:HorizontalLayout = new HorizontalLayout();
- // controlBar.addBead(controlBarLayout);
- // controlBarLayout.itemsHorizontalAlign = "itemsSpaceBetween";
+ controlBar = new HGroup();
+ controlBar.className = "controlbar";
+
+ (controlBar as HGroup).itemsHorizontalAlign = "itemsRight";
+ (controlBar as HGroup).gap = 2;
}
var flags:uint = alertModel.flags;
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_controlbar.sass b/frameworks/projects/Jewel/src/main/sass/components/_controlbar.sass
deleted file mode 100644
index 416eea4..0000000
--- a/frameworks/projects/Jewel/src/main/sass/components/_controlbar.sass
+++ /dev/null
@@ -1,34 +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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-.jewel.controlbar
- background-color: transparent
- padding: 0px
- min-height: 34px
-
-j|ControlBar
- IBeadView: ClassReference("org.apache.royale.html.beads.GroupView")
- IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.HorizontalLayout")
-
-@media -royale-swf
- j|ControlBar
- IMeasurementBead: ClassReference("org.apache.royale.html.beads.ControlBarMeasurementBead")
- // --- IBackgroundBead: ClassReference("org.apache.royale.html.beads.SolidBackgroundBead")
- // --- IBorderBead: ClassReference("org.apache.royale.html.beads.SingleLineBorderBead")
- //border: 1px solid #333333
diff --git a/frameworks/projects/Jewel/src/main/sass/defaults.sass b/frameworks/projects/Jewel/src/main/sass/defaults.sass
index 1d48c00..fa126d0 100644
--- a/frameworks/projects/Jewel/src/main/sass/defaults.sass
+++ b/frameworks/projects/Jewel/src/main/sass/defaults.sass
@@ -29,7 +29,6 @@
@import "components/buttonbar"
@import "components/card"
@import "components/checkbox"
-@import "components/controlbar"
@import "components/combobox"
@import "components/datagrid"
@import "components/datechooser"
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components-emphasized/_controlbar.sass b/frameworks/themes/JewelTheme/src/main/sass/components-emphasized/_controlbar.sass
deleted file mode 100644
index 94b2221..0000000
--- a/frameworks/themes/JewelTheme/src/main/sass/components-emphasized/_controlbar.sass
+++ /dev/null
@@ -1,24 +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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-// Jewel ControlBar
-
-// ControlBar variables
-
-//.jewel.controlbar
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components-primary/_controlbar.sass b/frameworks/themes/JewelTheme/src/main/sass/components-primary/_controlbar.sass
deleted file mode 100644
index 94b2221..0000000
--- a/frameworks/themes/JewelTheme/src/main/sass/components-primary/_controlbar.sass
+++ /dev/null
@@ -1,24 +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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-// Jewel ControlBar
-
-// ControlBar variables
-
-//.jewel.controlbar
\ No newline at end of file
diff --git a/frameworks/themes/JewelTheme/src/main/sass/components-secondary/_controlbar.sass b/frameworks/themes/JewelTheme/src/main/sass/components-secondary/_controlbar.sass
deleted file mode 100644
index 5ddca20..0000000
--- a/frameworks/themes/JewelTheme/src/main/sass/components-secondary/_controlbar.sass
+++ /dev/null
@@ -1,22 +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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-// Jewel ControlBar
-
-// ControlBar variables
diff --git a/frameworks/themes/JewelTheme/src/main/sass/defaults.sass b/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
index 20984b1..7b769bf 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/defaults.sass
@@ -34,7 +34,6 @@
@import "components-primary/card"
@import "components-primary/checkbox"
@import "components-primary/combobox"
-@import "components-primary/controlbar"
@import "components-primary/datagrid"
@import "components-primary/datechooser"
@import "components-primary/datefield"
@@ -70,7 +69,6 @@
@import "components-secondary/button"
@import "components-secondary/card"
@import "components-secondary/checkbox"
-@import "components-secondary/controlbar"
@import "components-secondary/datagrid"
@import "components-secondary/dropdownlist"
@import "components-secondary/itemRenderer"
@@ -90,7 +88,6 @@
@import "components-emphasized/button"
@import "components-emphasized/card"
@import "components-emphasized/checkbox"
-@import "components-emphasized/controlbar"
@import "components-emphasized/datagrid"
@import "components-emphasized/dropdownlist"
@import "components-emphasized/itemRenderer"