Logo

18.6.1 Tabulator

As shown in Section 18.1, a Tabulator is an explicit browser that allows us to:

  • create panes and organize them in a table layout, and
  • create transmissions between ports of these panes.

The creation and laying out of panes is achieved via a simple scripting API similar to the algorithm behind the computation of a treemap visualization. The following UML diagram lists the relevant methods for this API.

Tabulator layout

The creation of three panes at the same level can be achieved like:

browser column: #paneOne.
browser column: #paneTwo.
browser column: #paneThree.

or:

browser row: #paneOne.
browser row: #paneTwo.
browser row: #paneThree.

If we want to nest the last two into a parent cell that is placed at the same level as #paneOne, we can achieve it in the following way:

browser column: #paneOne.
browser column: [ :c |
c row: #paneTwo; c row: #paneThree ].

respectively:

browser row: #paneOne.
browser row: [ :r |
r column: #paneTwo; r column: #paneThree ].

Thus, the row: and column: messages can be passed a block with one parameter that allows for further nesting. A row will allow us to create nested columns, while in a column we will be able to create nested rows. These parent rows and columns do not have a name because they are only an implementation detail related to the laying out of panes. Only the cells with names lead to the creation of panes that can later be accessed for transmissions.

Once panes are created, we can deal with transmissions. A transmission can be created by simply calling transmit. For example, defining a transmission that sets the presentations on #paneThree based on ports from paneOne and portB can be done via a construct like:

browser transmit 
from: #paneOne;
from: #paneTwo->#portB;
fromOutside: #outsidePort;
to: #paneThree;
andShow: [ :a |
"specification of presentations" ].

More details about the specification of a transmission are presented in Section 18.4.

Add a Note