Class JDPMethodExplorer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----JDPMethodExplorer

public class JDPMethodExplorer
extends Panel
implements Runnable
Class JDPMethodExplorer represents a graphical perspective of methods and how they interact with each other.


Constructor Index

 o JDPMethodExplorer(JDPUser)
Creates a Method Explorer.

Method Index

 o addNode(JDPSourceItem)
Add a node to the Explorer
 o addNode(String, String)
Add a node to the Explorer
 o addRelation(JDPMethodNode, JDPMethodNode)
Add a node to the Explorer
 o addRelation(JDPMethodNode, String)
Add a node to the Explorer
 o addRelation(String, String)
Add a node to the Explorer
 o addRightRelation(JDPMethodNode, JDPMethodNode)
Refresh the right hand relations of a node
 o clear()
Clear all the nodes from the Explorer
 o getDescription(JDPMethodNode)
Get the formatted text for this node.
 o getMinimumHeight()
Get the minimum height of the grid
 o getMinimumWidth()
Get the minimum width of the grid
 o getNode(JDPSourceItem)
Get the handle to the node based on the supplied name
 o getNode(String)
Get the handle to the node based on the supplied key
 o getNodeHorizontalGap()
Get the number of pixels between nodes in the Horizonal direction.
 o getNodeVerticalGap()
Get the number of pixels between nodes in the Vertical direction.
 o getScrollEastDisabled()
Get whether the east scrollbar has been removed
 o getScrollSouthDisabled()
Get whether the south scrollbar has been removed
 o getSelectedItem()
Get the handle to the source item that is currently selected.
 o getSelectedNode()
Get the handle to the node that is currently selected.
 o getShowGlobals()
Get whether globals should be displayed
 o getShowNames()
Get whether node names should be displayed
 o getShowText()
Get whether node text should be displayed
 o handleEvent(Event)
 o layout()
 o loadSource(String)
Load the source for the specified file.
 o loadSource(String, JDPMethodTree)
Load the source for the specified file.
 o makeVisible(JDPSourceItem)
Make this item visible.
 o minimumSize()
 o paint(Graphics)
 o preferredSize()
 o reDraw()
Redraw the explorer.
 o refreshAllNodes()
Refresh all of the nodes from their corresponding item.
 o refreshAllRelations(JDPSourceItem)
Refresh the relations between all of the nodes.
 o refreshNodeFromItem(JDPSourceItem)
Refresh the details of a node from the item.
 o refreshRelations(JDPSourceItem)
Refresh the relations between this item and the items that call it.
 o removeNode(JDPMethodNode)
Remove a node from the Explorer
 o run()
 o setClassDescriptor(JDPSourceItem)
Load the explorer using the class header source item and it child constructors, methods and global variables.
 o setIconImagePath(String)
Set the path for the image that conatins the button icons.
 o setMinimumHeight(int)
Set the minimum height of the grid
 o setMinimumWidth(int)
Set the minimum width of the grid
 o setNodeHorizontalGap(int)
Set the number of pixels between nodes in the Horizonal direction.
 o setNodeVerticalGap(int)
Set the number of pixels between nodes in the Vertical direction.
 o setRootNode(JDPSourceItem)
Set the currently displayed root node.
 o setRootNode(String)
Set the currently displayed root node.
 o setScrollEastDisabled(boolean)
Set whether the east scrollbar should be disabled
 o setScrollSouthDisabled(boolean)
Set whether the south scrollbar should be disabled
 o setShowGlobals(boolean)
Set whether globals should be displayed
 o setShowNames(boolean)
Set whether node names should be displayed
 o setShowText(boolean)
Set whether node text should be displayed
 o update(Graphics)

Constructors

 o JDPMethodExplorer
 public JDPMethodExplorer(JDPUser user)
Creates a Method Explorer.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.
chartParms - an list of the chart paramaters.

Methods

 o run
 public void run()
 o loadSource
 public void loadSource(String fullPathName,
                        JDPMethodTree methodTree)
Load the source for the specified file.

Parameters:
fullPathName - the path to the source file to load.
methodTree - the tree to load with the source items.
 o loadSource
 public void loadSource(String fullPathName)
Load the source for the specified file.

Parameters:
fullPathName - the path to the source file to load.
 o setClassDescriptor
 public void setClassDescriptor(JDPSourceItem classHeader)
Load the explorer using the class header source item and it child constructors, methods and global variables.

Parameters:
classHeader - the header for this class.
 o refreshAllRelations
 public void refreshAllRelations(JDPSourceItem classHeader)
Refresh the relations between all of the nodes.

 o refreshRelations
 public void refreshRelations(JDPSourceItem thisItem)
Refresh the relations between this item and the items that call it.

Parameters:
thisItem - the source item to refresh.
 o setIconImagePath
 public void setIconImagePath(String thisImageLoc)
Set the path for the image that conatins the button icons. This class has a default image call JDPBUTNS.gif that may be overidden. To create your own icon image use the JDPBUTNS.gif as a template.

Parameters:
thisImageLoc - the full or partial path to the new image.
 o layout
 public void layout()
Overrides:
layout in class Container
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Container
 o update
 public void update(Graphics g)
Overrides:
update in class Component
 o reDraw
 public void reDraw()
Redraw the explorer.

 o handleEvent
 public boolean handleEvent(Event evt)
Overrides:
handleEvent in class Component
 o clear
 public void clear()
Clear all the nodes from the Explorer

 o addNode
 public void addNode(String name,
                     String description)
Add a node to the Explorer

Parameters:
name - the name of this node.
description - the detailed description of this node.
 o addNode
 public void addNode(JDPSourceItem item)
Add a node to the Explorer

Parameters:
name - the name of this node.
description - the detailed description of this node.
 o removeNode
 public void removeNode(JDPMethodNode node)
Remove a node from the Explorer

Parameters:
name - the name of this node.
 o addRelation
 public boolean addRelation(String sourceKey,
                            String sinkKey)
Add a node to the Explorer

Parameters:
sourceKey - the key of this node.
sinkKey - the key of the node that connects on the right to the source Node.
Returns:
whether relation was successfully created.
 o addRelation
 public boolean addRelation(JDPMethodNode source,
                            String sinkKey)
Add a node to the Explorer

Parameters:
sourceItem - the source item of this node.
sinkItem - the source item of the node that connects on the right to the source Node.
Returns:
whether relation was successfully created.
 o addRelation
 public boolean addRelation(JDPMethodNode source,
                            JDPMethodNode sink)
Add a node to the Explorer

Parameters:
sourceName - the name of this node.
sinkName - the name of the node that connects on the right to the source Node.
Returns:
whether relation was successfully created.
 o addRightRelation
 public boolean addRightRelation(JDPMethodNode source,
                                 JDPMethodNode sink)
Refresh the right hand relations of a node

Parameters:
sourceName - the name of this node.
sinkName - the name of the node that connects on the right to the source Node.
Returns:
whether relation was successfully created.
 o getNode
 public JDPMethodNode getNode(String key)
Get the handle to the node based on the supplied key

Parameters:
key - the key of this node.
Returns:
the handle to this node.
 o getNode
 public JDPMethodNode getNode(JDPSourceItem item)
Get the handle to the node based on the supplied name

Parameters:
item - the source item of this node.
Returns:
the handle to this node.
 o getDescription
 public String getDescription(JDPMethodNode node)
Get the formatted text for this node.

Parameters:
node - the handle of this node.
Returns:
the formatted text for this node.
 o setRootNode
 public boolean setRootNode(String key)
Set the currently displayed root node.

Parameters:
key - the key of the node to set to the root node.
Returns:
whether the node existed.
 o setRootNode
 public boolean setRootNode(JDPSourceItem item)
Set the currently displayed root node.

Parameters:
item - the source item of the node to set to the root node.
Returns:
whether the node existed.
 o makeVisible
 public boolean makeVisible(JDPSourceItem item)
Make this item visible.

Parameters:
item - the source item of the node to set to the root node.
Returns:
whether the node existed.
 o getSelectedNode
 public JDPMethodNode getSelectedNode()
Get the handle to the node that is currently selected.

Returns:
the handle to this node.
 o getSelectedItem
 public JDPSourceItem getSelectedItem()
Get the handle to the source item that is currently selected.

Returns:
the handle to this source item.
 o refreshAllNodes
 public void refreshAllNodes()
Refresh all of the nodes from their corresponding item.

 o refreshNodeFromItem
 public void refreshNodeFromItem(JDPSourceItem item)
Refresh the details of a node from the item.

Parameters:
item - the item to refresh.
 o setShowNames
 public void setShowNames(boolean display)
Set whether node names should be displayed

Parameters:
display - display names of nodes.
 o getShowNames
 public boolean getShowNames()
Get whether node names should be displayed

Returns:
whether whether node names should be displayed.
 o setShowText
 public void setShowText(boolean display)
Set whether node text should be displayed

Parameters:
display - display text of nodes.
 o getShowText
 public boolean getShowText()
Get whether node text should be displayed

Returns:
whether whether node text should be displayed.
 o setShowGlobals
 public void setShowGlobals(boolean display)
Set whether globals should be displayed

Parameters:
display - display globals referenced by methods.
 o getShowGlobals
 public boolean getShowGlobals()
Get whether globals should be displayed

Returns:
whether whether globals should be displayed.
 o setNodeHorizontalGap
 public void setNodeHorizontalGap(int gap)
Set the number of pixels between nodes in the Horizonal direction.

Parameters:
gap - the number of pixels between nodes in the Horizonal direction.
 o getNodeHorizontalGap
 public int getNodeHorizontalGap()
Get the number of pixels between nodes in the Horizonal direction.

Returns:
the number of pixels between nodes in the Horizonal direction.
 o setNodeVerticalGap
 public void setNodeVerticalGap(int gap)
Set the number of pixels between nodes in the Vertical direction.

Parameters:
gap - the number of pixels between nodes in the Vertical direction.
 o getNodeVerticalGap
 public int getNodeVerticalGap()
Get the number of pixels between nodes in the Vertical direction.

Returns:
the number of pixels between nodes in the Vertical direction.
 o setScrollEastDisabled
 public void setScrollEastDisabled(boolean disabled)
Set whether the east scrollbar should be disabled

Parameters:
disabled - flag.
 o getScrollEastDisabled
 public boolean getScrollEastDisabled()
Get whether the east scrollbar has been removed

Returns:
whether disabled or not.
 o setScrollSouthDisabled
 public void setScrollSouthDisabled(boolean disabled)
Set whether the south scrollbar should be disabled

Parameters:
disabled - flag.
 o getScrollSouthDisabled
 public boolean getScrollSouthDisabled()
Get whether the south scrollbar has been removed

Returns:
whether disabled or not.
 o setMinimumWidth
 public void setMinimumWidth(int width)
Set the minimum width of the grid

Parameters:
the - width in pixels.
 o getMinimumWidth
 public int getMinimumWidth()
Get the minimum width of the grid

Returns:
the width in pixels.
 o setMinimumHeight
 public void setMinimumHeight(int height)
Set the minimum height of the grid

Parameters:
the - height in pixels.
 o getMinimumHeight
 public int getMinimumHeight()
Get the minimum height of the grid

Returns:
the height in pixels.
 o preferredSize
 public Dimension preferredSize()
Overrides:
preferredSize in class Container
 o minimumSize
 public Dimension minimumSize()
Overrides:
minimumSize in class Container