All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Webcrawler.Visualizer.VisualNodeHelper

java.lang.Object
   |
   +----Webcrawler.Visualizer.VisualNodeHelper

public class VisualNodeHelper
extends Object
This class helps with drawing URLNodes/LoadableNodes/HTMLNodes. It contains the icons for those nodes, so that they only need to be loaded once. The VisualizerCellRenderer and the NodeViewer need this class for displaying node-information.

See Also:
VisualizerCellRenderer, NodeViewer

Variable Index

 o applicationIcon
 o audioIcon
 o collapsedIcon
 o deadIcon
 o expandedIcon
 o imageIcon
 o mailIcon
 o malformedIcon
 o otherIcon
 o recursiveIcon

Constructor Index

 o VisualNodeHelper()

Method Index

 o getBackground(URLNode)
This method is used for drawing a node in the VisualizerCellRenderer.
 o getDrawBox(URLNode)
The VisualizerCellRenderer also needs this method to determine whether a box should be drawn around the node.
 o getIcon(URLNode)
Same as getIcon(n,true,true).
 o getIcon(URLNode, boolean, boolean)
Gets the right icon for the URLNode n.

Variables

 o collapsedIcon
 static ImageIcon collapsedIcon
 o expandedIcon
 static ImageIcon expandedIcon
 o deadIcon
 static ImageIcon deadIcon
 o malformedIcon
 static ImageIcon malformedIcon
 o mailIcon
 static ImageIcon mailIcon
 o recursiveIcon
 static ImageIcon recursiveIcon
 o imageIcon
 static ImageIcon imageIcon
 o audioIcon
 static ImageIcon audioIcon
 o applicationIcon
 static ImageIcon applicationIcon
 o otherIcon
 static ImageIcon otherIcon

Constructors

 o VisualNodeHelper
 public VisualNodeHelper()

Methods

 o getIcon
 public ImageIcon getIcon(URLNode n,
                          boolean expanded,
                          boolean leaf)
Gets the right icon for the URLNode n. The VisualizerCellRenderer also sends the expanded and leaf information. This way a different icon can be used for expanded and collapsed nodes in the visualisation.

Returns:
the appropriate icon for the URLNode n
 o getIcon
 public ImageIcon getIcon(URLNode n)
Same as getIcon(n,true,true). The NodeViewer uses this simple method for displaying the correct icon.

Returns:
the appropriate icon for the URLNode n
 o getBackground
 public Color getBackground(URLNode n)
This method is used for drawing a node in the VisualizerCellRenderer. The background-color depends on the NodeState as well as the URLType (in case of LoadableNodes).

 o getDrawBox
 public boolean getDrawBox(URLNode n)
The VisualizerCellRenderer also needs this method to determine whether a box should be drawn around the node.


All Packages  Class Hierarchy  This Package  Previous  Next  Index