All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.mit.ai.psg.jexa.ObjectOutline

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----edu.mit.ai.psg.ui.outlines.OutlineTree
                                   |
                                   +----edu.mit.ai.psg.jexa.ObjectOutline

public class ObjectOutline
extends OutlineTree
ObjectOutline: displays public fields of objects and elements of Arrays (uncovered using java.lang.reflect and java.lang.Class methods). For collapsed object description, uses method Stringify.printToString() instead of Object.toString() to print up to Stringify.printLength elements of arrays and java.lang.Dictionary's. Generates children for all elements when expanded.

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

Variable Index

 o defaultColor
Default foreground color
 o myObject

Constructor Index

 o ObjectOutline(Object)

Method Index

 o actionPerformed(ActionEvent)
ActionPerformed: Toggles whether tree is displayed expanded (showing children) or not (only showing root).
 o addPopupMenuTitle(PopupMenu)
Uses object's toString() as title
 o generateChildren()
Generate children for public fields of objects (discovered through reflection methods of java.lang.Class and java.lang.reflect) and elements of arrays
 o makeLabelComponent(String)
Set foreground color of returned label to default color

Variables

 o myObject
 public Object myObject
 o defaultColor
 public static Color defaultColor
Default foreground color

Constructors

 o ObjectOutline
 public ObjectOutline(Object obj)

Methods

 o actionPerformed
 public void actionPerformed(ActionEvent e)
ActionPerformed: Toggles whether tree is displayed expanded (showing children) or not (only showing root).

Overrides:
actionPerformed in class OutlineTree
 o generateChildren
 public void generateChildren()
Generate children for public fields of objects (discovered through reflection methods of java.lang.Class and java.lang.reflect) and elements of arrays

Overrides:
generateChildren in class OutlineTree
 o makeLabelComponent
 public Component makeLabelComponent(String string)
Set foreground color of returned label to default color

Overrides:
makeLabelComponent in class OutlineTree
 o addPopupMenuTitle
 public void addPopupMenuTitle(PopupMenu menu)
Uses object's toString() as title

Overrides:
addPopupMenuTitle in class OutlineTree

All Packages  Class Hierarchy  This Package  Previous  Next  Index