<-Prev Next->

Viewers and Canvas

The Java object viewers in jGRASP provide interface-based and structural views of Java collections classes and arrays during debugging and workbench operations. Often these views are more useful than the traditional tree view showing the fields of each object. For example, an interface-based view shows ArrayList and LinkedList in an identical way, as a List. Structural views show the internal structure of HashMaps and LinkedLists, among others. In array and collection class viewers, one element or sub-element, such as an element of a LinkedList, or a key or value in a HashMap, may be selected and will be displayed in a "sub viewer".

Viewers for other Java API classes clearly show properties of the objects, such as the color represented by a java.awt.Color. There are also viewers for primitives and primitive wrapper classes, showing the computation of a floating point value from the bits, and showing integer types in hex, octal, decimal, and binary.

Multiple viewers can be dragged onto a single Canvas window. This allows the layout and configuration of the viewers to be saved. The Canvas has controls similar to a video player that will automatically start and step through the code, pause, etc., so that it may be used for algorithm animation. It also has debugger controls, so that users can debug without leaving the canvas window.

jGRASP Viewers