Adaptable TreeView UI Component for Flash as3

Here is a preview of a TreeView component I’m working on for the sake of the game editor I’m developing.

The main and big idea that I borrowed from Sibirjak (components and other useful things in flash as3) is the special approach that is taken for DataProviders.
See the common way we look at DataProviders in flash is that you need to provide it with very specific data in order for it to understand what to do with it. The approach taken by Sibirjak is to let the developer extend or implement its own DataProvider that will be able to read data from anything you want and transmit it to the component in an understandable form.

This is exactly what I did but maybe a little bit simplified and more flexible as this TreeView component allows you to directly modify the data it is displaying by drag and dropping items inside or next to another item. In other words, you simply can modify the hierarchy of the children of the objects you are displaying.

Here is an example with DisplayObjectContainers and DisplayObject, try drag and dropping items wherever you want and see the change being applied automatically. You could easily add a DataProvider for every specific type of object: XML, Array, Vector, Object, Node2D… or even a folder structure !