Home >> Media Group >> Research >> ViPER
Downloads -- Documentation -- Developers -- Discussion
LAMP     The Language and Media Processing Laboratory

Describing a Java Application with the Limn3

Right now, there isn't a manual for developing with the tool. I recommend looking at ViPER-GT's configuration (viper/gt/CONFIG/gt-config.n3), the Limn3 specification, the schemata, and the Design and Implementation paper. I'll put notes and howtos here as they become necessary, as well.

Constructing the Menu

When a bean that extends a frame or window is loaded, Limn3 will load any menu items attached to it, as well. The menu assertions will use the menu namespace as well as the rdfs label and comment properties. A menu item has an associated action, a label, and menu. There is also a mnemonic character - the character in the label that is underlined and used to access the menu with the keyboard.

First, a menu must be declared. These are the internal nodes in the menu tree. Here is an example of a menu declaration:

      a menu:Menu ;
      rdfs:label "File" ;
      menu:mnemonic "F" ;
      menu:attachment lal:Core ;
      rdfs:comment "File menu, for manipulating files" ;
      menu:priority "0" .

This declares the File menu, attaching it to the main application frame. The first line declares the URI of the menu, the second line declares the item as a menu, and the third line gives the text displayed on the menu. The text label can be internationalized using the @language syntax. The attachment property is used here to attache the menu to a top level frame, although it can also be used to attache the menu to another menu. The comment is used by the help system. The priority is used to sort the menus, starting at 0 and ending at -1. (This is a lot easier to remember than whatever 0xFFFF:FFFF is in decimal.)

To declare a menu item, identify a thing as a menu:Item and, with the menu:attachment property, bind it to a declared menu. The menu item declaration is similar to the menu declaration, but it also contains a menu:generates property linking to the item to the action it generates.

A third class should be declared in the menu namespace allowing grouping of items and submenus. I could add a seperator, but I think the grouping has more of the appropriate feel. Also, it will make it easier to convert from groups to submenus.