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