All Packages Class Hierarchy This Package Previous Next Index
Class edu.mit.ai.psg.ui.outlines.Outliner
java.lang.Object
|
+----edu.mit.ai.psg.ui.outlines.Outliner
- public class Outliner
- extends Object
Outliner --- expandable/collapsible outlines.
(Similar to trees in many UI toolkits, but elements can be labeled.)
Standard call to start Outliner is
Outliner.makeOutlineFrame(Object);
Outline elements may be expanded/collapsed by clicking on the -/+ button,
or double clicking on the object.
Outline created depends on class of object examined. The default
ToStringComponentGenerator just creates a component based on the
print string of the object and does not create any children. To
use Outliner a program must initialize it with domain specific
outline generators by calling Outliner.putOutlineGenerator
A component outline generator implements IOutlineComponentGenerator.
When invoked, it returns a java.awt.Component, usually a subclass of
OutlineTree so the component can be expanded to have children itself.
- Author:
- CarlManning, caroma@ai.mit.edu
Copyright (c) 1997, 1998 Massachusetts Institute of Technology
-
defaultGenerator
- Default IOutlineComponentGenerator called if no generator found
in generators
-
generators
- Dictionary of IOutlineComponentGenerators keyed on interface or class
to which each applies
-
outliner
- outliner: an instance through which static methods indirectly
invoke their implementation methods.
-
Outliner()
-
-
addListeners(Object, Component)
- initialize object's outline Component by adding mouse event listeners.
-
addPopupMenuItems(PopupMenu, Object, Component)
- addPopUpMenuItems, adds menu items to every components in
outline, such as "Display item in own frame".
-
getAllGenerators(Object)
- Search class and its interfaces and superclasses for a class/interface
which has a generator, and return the first generator found
(most specific).
-
getExactOutlineGenerator(Class)
- Get the generator for exactly this interface or class
(not super-interfaces or super-classes)
-
getMostSpecificGenerator(Object)
- Search class and its interfaces and superclasses for a class/interface
which has a generator, and return the first generator found
(most specific).
-
getMostSpecificGeneratorImpl(Object)
- (overrideable implementation method)
-
makeOutlineComponent(Object)
- Generate a new AWT Component for obj to add to an outline.
-
makeOutlineComponentImpl(Object)
- (overrideable implementation method)
-
makeOutlineFrame(Object)
- Create a Frame window with an outline for obj
(static method for other tools to call)
-
makeOutlineFrame(Object, String)
-
-
makeOutlineFrameImpl(Object)
- overrideable/extendable implementation method
-
makeOutlineFrameImpl(Object, String)
-
-
putOutlineGenerator(Class, IOutlineComponentGenerator)
- Put a outline component generator for objects with this interface
in table.
-
removeOutlineGenerator(Class)
- Remove the generator specific for this interface or class
(not super-interfaces or super-classes)
outliner
public static Outliner outliner
- outliner: an instance through which static methods indirectly
invoke their implementation methods. Allows implementations of
these methods to be overridden in a subclass, yet other tools
can still invoke them through the static methods of this class.
If overriding, initialize this with instance of subclass.
generators
public static Dictionary generators
- Dictionary of IOutlineComponentGenerators keyed on interface or class
to which each applies
defaultGenerator
public static IOutlineComponentGenerator defaultGenerator
- Default IOutlineComponentGenerator called if no generator found
in generators
Outliner
public Outliner()
makeOutlineFrame
public static Frame makeOutlineFrame(Object obj)
- Create a Frame window with an outline for obj
(static method for other tools to call)
makeOutlineFrame
public static Frame makeOutlineFrame(Object obj,
String frameLabel)
makeOutlineFrameImpl
public Frame makeOutlineFrameImpl(Object obj)
- overrideable/extendable implementation method
makeOutlineFrameImpl
public Frame makeOutlineFrameImpl(Object obj,
String frameLabel)
makeOutlineComponent
public static Component makeOutlineComponent(Object obj)
- Generate a new 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)
makeOutlineComponentImpl
public Component makeOutlineComponentImpl(Object obj)
- (overrideable implementation method)
addListeners
public void addListeners(Object object,
Component newComponent)
- initialize object's outline Component by adding mouse event listeners.
Called by makeOutlineComponentImpl; may be extended/overridden to add
other listeners if needed
getMostSpecificGenerator
public IOutlineComponentGenerator getMostSpecificGenerator(Object obj)
- Search class and its interfaces and superclasses for a class/interface
which has a generator, and return the first generator found
(most specific).
getMostSpecificGeneratorImpl
public IOutlineComponentGenerator getMostSpecificGeneratorImpl(Object obj)
- (overrideable implementation method)
getAllGenerators
public Vector getAllGenerators(Object obj)
- Search class and its interfaces and superclasses for a class/interface
which has a generator, and return the first generator found
(most specific).
getExactOutlineGenerator
public IOutlineComponentGenerator getExactOutlineGenerator(Class anInterface)
- Get the generator for exactly this interface or class
(not super-interfaces or super-classes)
putOutlineGenerator
public static void putOutlineGenerator(Class forInterface,
IOutlineComponentGenerator generator)
- Put a outline component generator for objects with this interface
in table.
- Parameters:
- forInterface - Objects with this interface or class will be
outlined with this function (unless a more specific one applies)
- generator - should return a java.awt.Component,
typically an OutlineTree or a subclass.
removeOutlineGenerator
public static void removeOutlineGenerator(Class forInterface)
- Remove the generator specific for this interface or class
(not super-interfaces or super-classes)
addPopupMenuItems
public void addPopupMenuItems(PopupMenu menu,
Object obj,
Component component)
- addPopUpMenuItems, adds menu items to every components in
outline, such as "Display item in own frame". If there are any
alternate applicable outline component generators, for each
it adds a menu item to regenerate outline with that generator
All Packages Class Hierarchy This Package Previous Next Index