flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tink <f...@tink.ws >
Subject Re: Missing Spark Components List
Date Fri, 02 Mar 2012 09:11:52 GMT

On 1 Mar 2012, at 08:28, Omar Gonzalez wrote:

>> http://www.tink.ws/examples/**apache-flex/index.html<http://www.tink.ws/examples/apache-flex/index.html

>> >
>> If anyone is interested in looking at those, the source and examples
>> source is in my whiteboard.
>> Tink
> Nice, Tink. I'll add a link to the relevant components so people can  
> peep
> your code and contribute to your already started efforts and not  
> waste time
> on stuff that's already started.
> --
> Omar Gonzalez
> s9tpepper@apache.org
> Apache Flex PPMC Member

Hey Omar

I still see on the list no info next to ViewStack, and maybe I should  
be clearer about the code I've produce.

ViewStack, TabNavigator Accordion are all navigators. When I started  
dev on these components I wanted to follow what I ttok as the spark  
mantra to reduce the code leaving only the core functionality of a  
navigator, which for me meant 2 things

1. the component implements ISelectableList. i.e. the component can  
act as an IList with a selectedIndex, which means it can be used as a  
data provider to other controls.
2. deferred instantiation.

The idea that how the contents are laid out, displayed, animated etc  
to me seems something that shouldn't be in a navigator class, instead  
getting designated to a layout.

 From this basis I created 4 types of navigators, 2 low level groups,  
and 2 skinnable components, that use the groups in their skin. 1 set  
works by adding elements (child based), the other by adding an item  
renderer and data provider (data based). I had to create a  
DeferredGroup for the child based navigators, but deferred  
instantiation was simple for the data based components as they just  
leverage virtual layout.

It is then down to the layout you provide, to how the contents of the  
navigator are displayed, in the same way that Adobe provided a Group  
and have a VerticalLayout, HorizontalLayout or TileLayout, negating  
the need for any VGroup, HGroup (although Adobe still added them), or  

I haven't seen Adobes proposed code but the idea of having a  
ViewStack, an Accordion etc sounds like the old MX way. Flexible  
layouts and skins for me were one of the main advantages of spark, and  
I wanted to leverage this, not just build spark counterparts of MX  
components (which sounds slightly pointless).

The code in my whiteboard you choose what type of navigator you want,  
data or element based, you then pick a layout to control how the  
component looks. At the moment the layout has to implement  
INavigatorLayoutBase, and I've added the following layouts...

StackLayout -  navigator will act like a ViewStack
AccordionLayout - navigator will act like an accordion, with the  
option of adding a ButtonBar control as you see with a standard  
CarouselLayout - navigator will display it's elements layouts out  
along a curve or a complete circle
CoverflowLayout - navigator will act like a coverflow component
TimeMachineLayout and RolodexLayout - guess what.... ;)

The layouts also update a Scroller if found to add and remove a  
Scrollbar if required, change the direction of the scrollbar and also  
set the scroll bars up so when used they move a whole index at a time.  
The layouts can also be used with any of the standard spark components  
that accept a layout.

I have provided an Accordion, but to be honest I see no real reason  
for it to be there. If you want an Accordion, you can create a skin  
for a Navigator or DataNavigator, give the group inside an  
AccordionLayout and a ButtonBar and off you go.

I haven't provided a TabNavigator, but did show an example. You create  
a skin for a Navigator or DataNavigator, give the group inside an  
StackLayout add a ButtonBar and off you go.

Due to a StackLayout being the default layout for the navigator  
controls, you can just create any navigator and you have a component  
that acts as a ViewStack (with the addition of being able to navigator  
using a scroll bar if you set that property to true).

The idea of spark to me was there are lots of smaller parts that we  
can use to make up complex wholes that are much more flexible is what  
they can achieve than the mx components. For instance my MenuBar is  
just a ButtonBar that used DropDownList's for its item renderers, and  
each DropDownList uses a DropDownList for its item renderes and so on.  
I don't see how having a spark ViewStack or Accordion achieves this  

Hope this makes some sense


View raw message