external
Uncle Unc Home Sirius GUI Toolkit

GUI Toolkit

Sirius can be used as a toolkit to develop bespoke GUI applications. The method for doing so is slightly different than with a standard GUI toolkit, in which one adds textboxes, drop-down lists and checkboxes to a set of panels and then connect them to the logic of the application and its data structures using event handler code.

Developing a Sirius-based application proceeds roughly as follows:

Sketch out the data structures of the application, or, if porting an existing app, determine what its data structures are. These should be identified in terms of parent-child hierarchies and properties and methods of each parent and child. Arrays and similar grouping structures can be easily bound as children of their containing object.

Wrap the top-level object or 'root-node' of the data structure in an Uncle Unc item, using a Factory object. Using java reflection, all public methods and properties can be exposed (with special treatment for bean Accessor and Mutator methods and for Array-like properties or methods that return Array-like objects), or individually expose properties and methods. At present, the latter approach requires coding, but we hope to provide XML-based customisation soon.

Attach that Item to a Sirius top-level panel, or to a custom UncContainer panel containg your choice of views of the widget.

Make the container visible, in a Frame or Window, or inside any other java GUI panel.

Iteratively refine the data structure to present the properties and methods in a way that suits you and your end-users.

Each widget in the toolkit is descended from an abstract base class called ClientPane. A ClientPane represents an Uncle Unc Item in a particular way, say by showing its properties and methods, by listing all its children, or by listing its parentage. Some are primarily designed to provide visual information on the Item, others to manipulate the Item, and the tree of data to which it belongs.

The UncContainer is a java Panel that will automatically synchronise any ClientPanes placed into it so that they point to the same Item. Thus if a navigation ClientPane shifts focus from a parent to one of its children, all other ClientPane views in the container will automatically refresh to that Item too.

Key widgets in the set at present are:

ViewPane displays a list of child items of the currently-selected item, along with customisable columns displaying additional properties. (Note that the customisation is done to the Item, not to the ViewPane.) Clicking on an Item will invoke it's default method, which is by default to open the View up and display its children. If you think this sounds like a file explorer, you're on the right track.

ItemPane displays properties and methods of an Item. Properties can be edited if they are writeable, and methods can be invoked, with parameters filled in by expanding forms. Coupled with the ViewPane, this provides the backbone of an object tree browser framework.

NavBar provides buttons for moving up the tree, and backwards and forwards in a history list, as well as a few other customisable options.

Pager Pane allows a view to divide its children into 'pages', and give a flexible GUI representation of the available pages, current position, and navigation between pages. Replicates the functionality commonly found in search engine listings.

Filter Bar allows a view to filter which children it displays using regular expressions (either simple 'globbing' or Perl-style), filtering on any property that can be treated by the ViewPane as a column, and also allowing pre-configured filters for specific tasks. Supports simple arithmetic filtering for numerical and date columns by default (e.g. %gt; and <).

Ancestor Pickers show all parents of the current item in a list. Two versions are available, giving either a 'breadcrumb' trail (as popularised by Yahoo!) or a drop-down list of ancestors for a more compact widget.

Grouping widgets for hiding or showing categories of properties and/or children in pre-defined groups. A useful way or increasing useability when Items expose large numbers of methods or properties. Important methods and properties may be designated as 'ubiquitous', in which case they don't get hidden by te grouping mechanism.

credits
hosted by
SourceForge Logo
projects
download