Skip to content

Cell Visuals and Eventing

Borislav Iordanov edited this page Oct 22, 2015 · 1 revision

#summary Introduction to CellContainerVisual and associated EventPubSubs.

= Introduction =

The radical Seco evolution complicates the developpement and maintenance. So here is a quick introduction to some important pieces of the latest design.

= Details =

The key point in each niche is the so called top_cell_group, which is defined during the creation of a niche. It has a predefined handle ThisNiche.TOP_CELL_GROUP_HANDLE and contains
menu and two toolbars - e.g. three Cells which values are JComponent-s. Top Cell Group have a CellContainerVisual which is responsible for creation of all the GUI stuff. So, on niche startup the Top Cell Group' visual is called (bind()) and it builds the GUI: PiccoloCanvas is created and then all the CellGroup children's visual are asked to create their GUI representations. During that phase CellContainerVisual adds itself as a subscriber and eventHandler to Top Cell Group, so it can react on add/deletion/rename etc of all its children. The same thing is done by other container visuals as TabbedPaneVisual and NBUIVisual, which continue to spread the events framework down the Top Cell Group children's children. So we end up with a working solution in which every cell insert/delete/modification will be automatically handled by creating/removing or modifying the GUI according to the rules of the CellContainerVisual in use.

To be continued...

Clone this wiki locally