User:Oleg Kobchenko/Grid Test Drive

From J Wiki
Jump to navigation Jump to search

The new Grid component in j601 is really exciting.

Here's a few highlights, some as step-ups from the previous grid control:

  • it is really fast, regardless that the previous grid was C++
  • automatic alternating colors and subtle borders are aesthetically attractive
  • scrollbars finally got tracking; its own scrollbars make it simpler to integrate a grid in a custom form
  • keyboard movements are more consistent and intuitive; keyboard selection works very well, though choice of Ctrl+Arrows as opposed to Shift+Arrows is non-typical.
  • excellent choice of fonts and text layout; automatic switch to mono space font for multiline cells.
  • automatic resizing of each cell and the grid window to fit all or most of the data.

Overall, it creates a solid professional look and feel.

It Just Works

The new grid overcomes adoption barrier by providing immediate use akin to the pattern of load 'plot' / plot whatever. So now it's

   load 'grid'
   grid whatever

The usefulness of casual grid use is to free up the session space, display information side-by-side, allow for scrolling.

So let's see how far the whatever can be pushed.

A great companion for viewmat.

   load 'viewmat'
   (grid ] viewmat) !/~i.8

Viewmat.png

A text browser, or a list similar to wdselect.

   load 'files'
   grid ,.<;._2 toJ fread 'profile.ijs'

Text.png

A directory browser.

   grid 1!:0<'*.*'

Files.png

An ad-hoc locale browser. I am really looking forward to see the ability of embed images as cell icons.

   grid (,.<@nc_z_"0) nl_z_''

Locale.png

Displaying naturally tabular information.

   load 'dates'
   grid 2 3$calendar 2006,>:i.6

Calendar.png

Grid is amazingly adjustible to display higher rank information in a compact way. Note automatic switch to mono space font for multiline cells.

   grid i.3 4

   grid i.3 4 5
|length error: initdata
|   'rws cls'    =.s

   grid <"1 i.3 4 5

   grid <"2 i.2 3 3 3

Hidim.png

This can be taken even further combining with J boxed formatting. Grid mono spaced font nicely accomodates that. How about 6 dimensions in one view?!

   grid <"2 each <"4 i.2 2 2 2 2 2

6dim.png

Information.png As of this writing grid did not display Unicode correctly.


Contributed by Oleg Kobchenko.

temporary note: I updated this page for the ibeta (make sure you download the latest version, see the forum message. Also, please note some proposals for the grid verb. -- Chris Burke <<DateTime(2006-03-01T01:59:56Z)>>


Contributed by Oleg Kobchenko.

temporary note: I updated this page for the ibeta (make sure you download the latest version, see the forum message. Also, please note some proposals for the grid verb. -- Chris Burke <<DateTime(2006-03-01T01:59:56Z)>>