现在的位置: 首页 > 综合 > 正文

Flex-based MDI (Multiple Document Interface)(转)

2013年10月18日 ⁄ 综合 ⁄ 共 1374字 ⁄ 字号 评论关闭
One thing that traditional web applications don't do well is MDI (Multiple Doucment Interface). Yes, there are frameworks that make it easier, but it simply is not reliable across multiple platforms and browsers. MDI just happens to be *another* one of those things that Flex allows you to do very easily and do well within a web based application. I'm not just talking about using the PopUpManager class to maintain multiple non-modal dialogs within the context of the application. I'm talking full-blown "windowed" applications that run within the context of the Flex swf. Take a look...

This is a prototype MDI application interface that allows for multiple window creation, minimizing/maximizing windows, window drag/drop, window allignment (tile and cascade). Don't forget this is just a prototype :-) ... I have every intention of making this better by adding animation/transitions to it, and by making it a bit more robust. On this, you can even double click the headers to toggle between minimized/restore state.

Sorry, this is closed source, but here's basically how I did it... There is a canvas that is used to contain the "windows". I created a base class that creates the window framework. The base class can be extended to contain pretty much any type of flex component that is derived from the mx.core.UIComponent class. I created a MDIManager class that contains functions for adding/removing windows from the canvas, and it manages alignment/reorganization of the windows.

Hopefully this is a good example to provoke some thought... What else can Flex do for me & my applications?

Launch the MDI demo application

Enjoy! 

抱歉!评论已关闭.