All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.mit.ai.psg.jexa.Jexa

java.lang.Object
   |
   +----edu.mit.ai.psg.ui.outlines.Outliner
           |
           +----edu.mit.ai.psg.jexa.Jexa

public class Jexa
extends Outliner
Jexa: Java EXAminer --- Create outlines of objects.

Jexa must be initialized before use. Call Jexa.initialize(); (static initializers aren't always invoked as of Java 1.1.6.)

Standard call to start Jexa is Jexa.makeOutlineFrame(Object);

Outline elements may be expanded/collapsed by clicking on the -/+ button, or double clicking on the object.

Popup menu on object allows Jexa.mousedObject to be set to the object, so user may navigate through object, then call methods using the object (e.g., using a source code interpreter such as JevaES --- see edu.mit.ai.psg.jevaESUI.JevaESUI).

Outline created depends on class of object examined. Default outline is based on properties found by java.beans.Introspector (or elements of arrays). There are special outline generators for java.util.Dictionary (shows key/element pairs of Dictionary) and java.lang.Class (shows just static variables of Class). (An alternate default generator, ObjectOutline, just uses java.lang.reflect fields rather than bean introspection.) Popup menu allows user to recompute outline using an alternate outline generator.

See edu.mit.ai.psg.ui.outlines.Outliner for more on how to extend the outliner with new kinds of outline generators.

Author:
CarlManning, caroma@ai.mit.edu
Copyright (c) 1997, 1998 Massachusetts Institute of Technology
See Also:
Outliner

Variable Index

 o isInitialized
 o mousedObject
mousedObject: Public variable which can be set via menu while browsing

Constructor Index

 o Jexa()

Method Index

 o addPopupMenuItems(PopupMenu, Object, Component)
addPopUpMenuItems: Adds general menu items to components in outline, including the "set Jexa.mousedObject" menu item.
 o initialize()
Call initialize before use
 o makeOutlineComponent(Object)
Generate a new java.awt.Component for obj to add to an outline.
 o makeOutlineFrame(Object)
Create a Frame window with an outline for obj

Variables

 o isInitialized
 public static boolean isInitialized
 o mousedObject
 public static Object mousedObject
mousedObject: Public variable which can be set via menu while browsing

Constructors

 o Jexa
 public Jexa()

Methods

 o makeOutlineFrame
 public static Frame makeOutlineFrame(Object obj)
Create a Frame window with an outline for obj

 o makeOutlineComponent
 public static Component makeOutlineComponent(Object obj)
Generate a new java.awt.Component for obj to add to an outline. Uses generator for obj's most specific class or interface. (static method for other tools to call)

 o initialize
 public static void initialize()
Call initialize before use

 o addPopupMenuItems
 public void addPopupMenuItems(PopupMenu menu,
                               Object obj,
                               Component component)
addPopUpMenuItems: Adds general menu items to components in outline, including the "set Jexa.mousedObject" menu item. Extend this method to add additional popup menu items to all outline. components (if extending, be sure to call super.addPopupMenuItems).

Overrides:
addPopupMenuItems in class Outliner

All Packages  Class Hierarchy  This Package  Previous  Next  Index